mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-20 18:27:33 +00:00
Only the final intermediate buffer needs clearing, on reflection.
This commit is contained in:
@@ -161,8 +161,11 @@ void OpenGLOutputBuilder::draw_frame(unsigned int output_width, unsigned int out
|
|||||||
{
|
{
|
||||||
// switch to the initial texture
|
// switch to the initial texture
|
||||||
active_pipeline->target->bind_framebuffer();
|
active_pipeline->target->bind_framebuffer();
|
||||||
|
if(!active_pipeline[1].target)
|
||||||
|
{
|
||||||
glClearColor(active_pipeline->clear_colour[0], active_pipeline->clear_colour[1], active_pipeline->clear_colour[2], 1.0f);
|
glClearColor(active_pipeline->clear_colour[0], active_pipeline->clear_colour[1], active_pipeline->clear_colour[2], 1.0f);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
active_pipeline->shader->bind();
|
active_pipeline->shader->bind();
|
||||||
|
|
||||||
// draw as desired
|
// draw as desired
|
||||||
|
Reference in New Issue
Block a user