From 32dbfe947d3e47079c9566060b78e39a47ca70fc Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 20 Nov 2016 10:53:35 +0800 Subject: [PATCH] With hindsight, the elimination of this might have been overzealous. --- Outputs/CRT/Internals/CRTOpenGL.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Outputs/CRT/Internals/CRTOpenGL.cpp b/Outputs/CRT/Internals/CRTOpenGL.cpp index 8825fba6b..a2e11a1d9 100644 --- a/Outputs/CRT/Internals/CRTOpenGL.cpp +++ b/Outputs/CRT/Internals/CRTOpenGL.cpp @@ -161,6 +161,7 @@ void OpenGLOutputBuilder::draw_frame(unsigned int output_width, unsigned int out { // switch to the initial texture active_pipeline->target->bind_framebuffer(); + glClearColor(active_pipeline->clear_colour[0], active_pipeline->clear_colour[1], active_pipeline->clear_colour[2], 1.0f); glClear(GL_COLOR_BUFFER_BIT); active_pipeline->shader->bind(); @@ -173,12 +174,11 @@ void OpenGLOutputBuilder::draw_frame(unsigned int output_width, unsigned int out // transfer to framebuffer framebuffer->bind_framebuffer(); + // draw from from the output array buffer with blending + glBindVertexArray(output_vertex_array); glEnable(GL_BLEND); - // Ensure we're back on the output framebuffer, drawing from the output array buffer - glBindVertexArray(output_vertex_array); - - // update uniforms (implicitly binding the shader) + // update uniforms, then bind the thing if(_last_output_width != output_width || _last_output_height != output_height) { output_shader_program->set_output_size(output_width, output_height, _visible_area);