From 5ace9183ba92ad44207f8f8e57a1665bd52062ae Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Fri, 8 Aug 2014 04:52:38 +0200 Subject: 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 --- include/vcl/opengl/OpenGLHelper.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/vcl/opengl') 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(); -- cgit