summaryrefslogtreecommitdiff
path: root/include/vcl/opengl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-08-08 04:52:38 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-08-08 09:24:00 +0200
commit5ace9183ba92ad44207f8f8e57a1665bd52062ae (patch)
tree46a0d16ff40be5bb26940847ddf54e367a65cc1e /include/vcl/opengl
parent779ae371b152748aecf2ea81eca1bdbbf0226389 (diff)
add possibility to generate FBO with texture
The caller is responsible to delete the buffers. Depending on bRenderbuffer either with glDeleteRenderbuffers or with glDeleteTextures. Change-Id: I5ccbd49862c381abf04e812765cced485a083f89
Diffstat (limited to 'include/vcl/opengl')
-rw-r--r--include/vcl/opengl/OpenGLHelper.hxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index f80d34b887fb..01346974f9e6 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -30,9 +30,11 @@ public:
/**
* The caller is responsible for deleting the buffer objects identified by
* nFramebufferId, nRenderbufferDepthId and nRenderbufferColorId
+ * @param bRenderbuffer true => off-screen rendering, false => rendering to texture
+ * This also affects whether to free with glDeleteRenderbuffers or glDeleteTextures
*/
- static void createFramebuffer(long nWidth, long nHeight,
- GLuint& nFramebufferId, GLuint& nRenderbufferTextId, GLuint& nRenderbufferColorId);
+ static void createFramebuffer(long nWidth, long nHeight, GLuint& nFramebufferId,
+ GLuint& nRenderbufferTextId, GLuint& nRenderbufferColorId, bool bRenderbuffer = true);
// Get OpenGL version (needs a context)
static float getGLVersion();