1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-26 09:29:45 +00:00

Only the final intermediate buffer needs clearing, on reflection.

This commit is contained in:
Thomas Harte 2016-11-21 11:26:07 +08:00
parent c89345c639
commit d7d0ed378a

View File

@ -161,8 +161,11 @@ 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);
if(!active_pipeline[1].target)
{
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();
// draw as desired