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