diff options
author | Louis-Francis Ratté-Boulianne <lfrb@collabora.com> | 2014-11-26 09:22:25 -0500 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-12-02 15:47:30 +0100 |
commit | 512bbf6105dcebe8a0a466395b15f4c47d1a2cac (patch) | |
tree | b273902645c2d26c043e0a89e3ec13b745d9e069 /include | |
parent | 8296e1d191e5f58977b6aafebf6da77129219ecb (diff) |
vcl: Use the current OpenGL context for VirtualDevice and Bitmap if possible
Conflicts:
include/vcl/opengl/OpenGLContext.hxx
vcl/inc/openglgdiimpl.hxx
vcl/opengl/gdiimpl.cxx
vcl/opengl/x11/gdiimpl.cxx
vcl/source/opengl/OpenGLContext.cxx
Change-Id: I17f6ce66fb8b5bc027d35b4016ae56c24ee0a738
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/opengl/OpenGLContext.hxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 7931f4b26e4d..6d9948864bdf 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 { @@ -175,6 +178,13 @@ public: bool init( HDC hDC, HWND hWnd ); #endif + // 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(); @@ -226,6 +236,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; |