mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-19 19:16:34 +00:00
Introduce a temporary vertex array to avoid replacement binding.
This commit is contained in:
@@ -257,6 +257,11 @@ void ScanTarget::setup_pipeline() {
|
||||
existing_modals_->display_type != modals.display_type ||
|
||||
existing_modals_->composite_colour_space != modals.composite_colour_space
|
||||
) {
|
||||
// TODO: a temporary vertex array is created here for now, to avoid messing
|
||||
// with the bindings of the real scan vertex array. Move past that.
|
||||
GLuint sbn, sva;
|
||||
allocate_buffer(scan_buffer_, sbn, sva);
|
||||
test_gl(glBindVertexArray, sva);
|
||||
composition_shader_ = OpenGL::composition_shader(
|
||||
api_,
|
||||
modals.input_data_type,
|
||||
@@ -267,6 +272,8 @@ void ScanTarget::setup_pipeline() {
|
||||
buffer_width, 2048,
|
||||
GL_TEXTURE0
|
||||
);
|
||||
glDeleteBuffers(1, &sbn);
|
||||
glDeleteVertexArrays(1, &sva);
|
||||
}
|
||||
|
||||
existing_modals_ = modals;
|
||||
|
||||
Reference in New Issue
Block a user