Move framebuffer unbinding to GLState
This commit is contained in:
@@ -120,6 +120,9 @@ public class GLState
|
||||
|
||||
public void RestoreFrameBuffer()
|
||||
{
|
||||
// explicitly unbinding the frame buffer is necessary to prevent GL_CLEAR calls from hitting the wrong buffer
|
||||
GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, 0);
|
||||
|
||||
for (int i = 0; i < FBO_MAX; i++)
|
||||
{
|
||||
int buffer = this.fbo[i];
|
||||
|
||||
-3
@@ -116,9 +116,6 @@ public abstract class AbstractShaderRenderer
|
||||
GL32.glBlendFunc(GL32.GL_SRC_ALPHA, GL32.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL32.glDrawArrays(GL32.GL_TRIANGLES, 0, 6);
|
||||
|
||||
// explicitly unbinding the frame buffer is necessary to prevent GL_CLEAR calls from hitting the wrong buffer
|
||||
GL32.glBindFramebuffer(GL32.GL_FRAMEBUFFER, 0);
|
||||
|
||||
state.restore();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user