mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-02 16:38:51 +00:00
Corrects QAM texture generation logic.
This commit is contained in:
parent
1cd6d58f17
commit
b3b4b7cf0c
@ -308,20 +308,20 @@ void ScanTarget::setup_pipeline() {
|
||||
|
||||
// Destroy or create a QAM buffer and shader, if appropriate.
|
||||
const bool needs_qam_buffer = (modals_.display_type == DisplayType::CompositeColour || modals_.display_type == DisplayType::SVideo);
|
||||
if(needs_qam_buffer && !qam_chroma_texture_) {
|
||||
qam_chroma_texture_.reset(new TextureTarget(LineBufferWidth, LineBufferHeight, QAMChromaTextureUnit, GL_NEAREST, false));
|
||||
} else {
|
||||
qam_chroma_texture_.reset();
|
||||
qam_separation_shader_.reset();
|
||||
}
|
||||
|
||||
if(needs_qam_buffer) {
|
||||
if(!qam_chroma_texture_) {
|
||||
qam_chroma_texture_.reset(new TextureTarget(LineBufferWidth, LineBufferHeight, QAMChromaTextureUnit, GL_NEAREST, false));
|
||||
}
|
||||
|
||||
qam_separation_shader_ = qam_separation_shader();
|
||||
glBindVertexArray(line_vertex_array_);
|
||||
glBindBuffer(GL_ARRAY_BUFFER, line_buffer_name_);
|
||||
enable_vertex_attributes(ShaderType::QAMSeparation, *qam_separation_shader_);
|
||||
set_uniforms(ShaderType::QAMSeparation, *qam_separation_shader_);
|
||||
qam_separation_shader_->set_uniform("textureName", GLint(UnprocessedLineBufferTextureUnit - GL_TEXTURE0));
|
||||
} else {
|
||||
qam_chroma_texture_.reset();
|
||||
qam_separation_shader_.reset();
|
||||
}
|
||||
|
||||
// Establish an output shader.
|
||||
|
Loading…
x
Reference in New Issue
Block a user