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
This commit is contained in:
committed by
Markus Mohrhard
parent
83c97b2a1c
commit
d6b51a87b4
@@ -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;
|
||||
|
Reference in New Issue
Block a user