Add missing call to glReadBuffer() when doing depth-only FBOs

This commit is contained in:
Fernando García Liñán 2021-08-01 08:34:49 +02:00
parent d8874c26b6
commit 2039f49691

View File

@ -395,8 +395,10 @@ PassBuilder::build(Compositor *compositor, const SGPropertyNode *root,
// Explicitly let OpenGL know that there are no color buffers attached.
// This is required on GL <4.2 contexts or the framebuffer will be
// considered incomplete.
if (!color_buffer_present)
if (!color_buffer_present) {
camera->setDrawBuffer(GL_NONE);
camera->setReadBuffer(GL_NONE);
}
}
return pass.release();