mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Merge branch 'TrigonometricDecode' into ScanTarget
This commit is contained in:
commit
f373a3fbb1
@ -68,7 +68,7 @@
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableASanStackUseAfterReturn = "YES"
|
||||
|
@ -282,8 +282,8 @@ void ScanTarget::setup_pipeline() {
|
||||
output_shader_ = conversion_shader(modals_.input_data_type, modals_.display_type, modals_.composite_colour_space);
|
||||
glBindVertexArray(line_vertex_array_);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, line_buffer_name_);
|
||||
enable_vertex_attributes(ShaderType::Line, *output_shader_);
|
||||
set_uniforms(ShaderType::Line, *output_shader_);
|
||||
enable_vertex_attributes(ShaderType::Conversion, *output_shader_);
|
||||
set_uniforms(ShaderType::Conversion, *output_shader_);
|
||||
output_shader_->set_uniform("origin", modals_.visible_area.origin.x, modals_.visible_area.origin.y);
|
||||
output_shader_->set_uniform("size", modals_.visible_area.size.width, modals_.visible_area.size.height);
|
||||
output_shader_->set_uniform("textureName", GLint(UnprocessedLineBufferTextureUnit - GL_TEXTURE0));
|
||||
@ -292,8 +292,8 @@ void ScanTarget::setup_pipeline() {
|
||||
input_shader_ = composition_shader(modals_.input_data_type);
|
||||
glBindVertexArray(scan_vertex_array_);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, scan_buffer_name_);
|
||||
enable_vertex_attributes(ShaderType::InputScan, *input_shader_);
|
||||
set_uniforms(ShaderType::InputScan, *input_shader_);
|
||||
enable_vertex_attributes(ShaderType::Composition, *input_shader_);
|
||||
set_uniforms(ShaderType::Composition, *input_shader_);
|
||||
input_shader_->set_uniform("textureName", GLint(SourceDataTextureUnit - GL_TEXTURE0));
|
||||
}
|
||||
|
||||
|
@ -152,9 +152,8 @@ class ScanTarget: public Outputs::Display::ScanTarget {
|
||||
void setup_pipeline();
|
||||
|
||||
enum class ShaderType {
|
||||
InputScan,
|
||||
ProcessedScan,
|
||||
Line
|
||||
Composition,
|
||||
Conversion
|
||||
};
|
||||
|
||||
/*!
|
||||
|
@ -22,8 +22,7 @@ void Outputs::Display::OpenGL::ScanTarget::set_uniforms(ShaderType type, Shader
|
||||
|
||||
void ScanTarget::enable_vertex_attributes(ShaderType type, Shader &target) {
|
||||
switch(type) {
|
||||
case ShaderType::InputScan:
|
||||
case ShaderType::ProcessedScan:
|
||||
case ShaderType::Composition:
|
||||
for(int c = 0; c < 2; ++c) {
|
||||
const std::string prefix = c ? "end" : "start";
|
||||
|
||||
@ -57,7 +56,7 @@ void ScanTarget::enable_vertex_attributes(ShaderType type, Shader &target) {
|
||||
1);
|
||||
break;
|
||||
|
||||
case ShaderType::Line:
|
||||
case ShaderType::Conversion:
|
||||
for(int c = 0; c < 2; ++c) {
|
||||
const std::string prefix = c ? "end" : "start";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user