summaryrefslogtreecommitdiff
path: root/include/vcl/opengl/OpenGLContext.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/vcl/opengl/OpenGLContext.hxx')
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 9be9c593b362..1b2185175fe7 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -55,6 +55,9 @@ class NSOpenGLView;
#include <tools/gen.hxx>
#include <vcl/syschild.hxx>
+class OpenGLFramebuffer;
+class OpenGLTexture;
+
/// Holds the information of our new child window
struct GLWindow
{
@@ -177,6 +180,13 @@ public:
void AddRef();
void DeRef();
+ // use these methods right after setting a context to make sure drawing happens
+ // in the right FBO (default one is for onscreen painting)
+ bool AcquireDefaultFramebuffer();
+ bool AcquireFramebuffer( OpenGLFramebuffer* pFramebuffer );
+ OpenGLFramebuffer* AcquireFramebuffer( const OpenGLTexture& rTexture );
+ void ReleaseFramebuffer( OpenGLFramebuffer* pFramebuffer );
+
void makeCurrent();
void resetCurrent();
void swapBuffers();
@@ -229,6 +239,11 @@ private:
bool mbPixmap; // is a pixmap instead of a window
#endif
+ int mnFramebufferCount;
+ OpenGLFramebuffer* mpCurrentFramebuffer;
+ OpenGLFramebuffer* mpFirstFramebuffer;
+ OpenGLFramebuffer* mpLastFramebuffer;
+
public:
vcl::Region maClipRegion;
int mnPainting;