1
0
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:
Thomas Harte
2026-01-29 15:01:21 -05:00
parent 77a2d2cb3c
commit 53bed7db58
3 changed files with 32 additions and 24 deletions
+7
View File
@@ -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;