summaryrefslogtreecommitdiffstats
path: root/src/render/graphicshelpers/graphicshelpergl4.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/graphicshelpers/graphicshelpergl4.cpp')
-rw-r--r--src/render/graphicshelpers/graphicshelpergl4.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/render/graphicshelpers/graphicshelpergl4.cpp b/src/render/graphicshelpers/graphicshelpergl4.cpp
index 9cb1f02ee..badbaf67d 100644
--- a/src/render/graphicshelpers/graphicshelpergl4.cpp
+++ b/src/render/graphicshelpers/graphicshelpergl4.cpp
@@ -652,9 +652,20 @@ void GraphicsHelperGL4::releaseFrameBufferObject(GLuint frameBufferId)
m_funcs->glDeleteFramebuffers(1, &frameBufferId);
}
-void GraphicsHelperGL4::bindFrameBufferObject(GLuint frameBufferId)
-{
- m_funcs->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferId);
+void GraphicsHelperGL4::bindFrameBufferObject(GLuint frameBufferId, FBOBindMode mode)
+{
+ switch (mode) {
+ case FBODraw:
+ m_funcs->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBufferId);
+ return;
+ case FBORead:
+ m_funcs->glBindFramebuffer(GL_READ_FRAMEBUFFER, frameBufferId);
+ return;
+ case FBOReadAndDraw:
+ default:
+ m_funcs->glBindFramebuffer(GL_FRAMEBUFFER, frameBufferId);
+ return;
+ }
}
GLuint GraphicsHelperGL4::boundFrameBufferObject()