1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Ensures the SVideo shader gets all proper enable_vertex_attribute_with_pointers.

This commit is contained in:
Thomas Harte 2018-04-05 21:12:28 -04:00
parent bab1440f5c
commit ec72fb3baf

View File

@ -348,34 +348,33 @@ void OpenGLOutputBuilder::prepare_source_vertex_array() {
}
using Shader = OpenGL::IntermediateShader;
if(composite_input_shader_program_) {
composite_input_shader_program_->enable_vertex_attribute_with_pointer(
OpenGL::IntermediateShader *const shaders[] = {
composite_input_shader_program_.get(),
svideo_input_shader_program_.get()
};
for(int c = 0; c < 2; ++c) {
if(!shaders[c]) continue;
shaders[c]->enable_vertex_attribute_with_pointer(
Shader::get_input_name(Shader::Input::InputStart),
2, GL_UNSIGNED_SHORT, GL_FALSE, SourceVertexSize,
(void *)SourceVertexOffsetOfInputStart, 1);
composite_input_shader_program_->enable_vertex_attribute_with_pointer(
shaders[c]->enable_vertex_attribute_with_pointer(
Shader::get_input_name(Shader::Input::OutputStart),
2, GL_UNSIGNED_SHORT, GL_FALSE, SourceVertexSize,
(void *)SourceVertexOffsetOfOutputStart, 1);
composite_input_shader_program_->enable_vertex_attribute_with_pointer(
shaders[c]->enable_vertex_attribute_with_pointer(
Shader::get_input_name(Shader::Input::Ends),
2, GL_UNSIGNED_SHORT, GL_FALSE, SourceVertexSize,
(void *)SourceVertexOffsetOfEnds, 1);
composite_input_shader_program_->enable_vertex_attribute_with_pointer(
shaders[c]->enable_vertex_attribute_with_pointer(
Shader::get_input_name(Shader::Input::PhaseTimeAndAmplitude),
3, GL_UNSIGNED_BYTE, GL_FALSE, SourceVertexSize,
(void *)SourceVertexOffsetOfPhaseTimeAndAmplitude, 1);
}
if(svideo_input_shader_program_) {
svideo_input_shader_program_->enable_vertex_attribute_with_pointer(
Shader::get_input_name(Shader::Input::InputStart),
2, GL_UNSIGNED_SHORT, GL_FALSE, SourceVertexSize,
(void *)SourceVertexOffsetOfInputStart, 1);
}
}
void OpenGLOutputBuilder::prepare_output_shader() {