summaryrefslogtreecommitdiff
path: root/vcl/inc/opengl
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>2014-11-22 07:58:38 -0500
committerJan Holesovsky <kendy@collabora.com>2014-12-02 15:47:21 +0100
commit8b0954e2619ccd82a8ccb1426734bcab2068f89c (patch)
treea2386f01c82a249eb61342eee10fc19ca7a9ef96 /vcl/inc/opengl
parent260a0b53b758daa79aa6a87d07537841821d25ff (diff)
vcl: Always use the same OpenGL context when drawing in a window
Change-Id: Ief0e947149c133aaa8e81973e088c4df6432bfdc
Diffstat (limited to 'vcl/inc/opengl')
-rw-r--r--vcl/inc/opengl/win/gdiimpl.hxx9
-rw-r--r--vcl/inc/opengl/x11/gdiimpl.hxx6
2 files changed, 14 insertions, 1 deletions
diff --git a/vcl/inc/opengl/win/gdiimpl.hxx b/vcl/inc/opengl/win/gdiimpl.hxx
index 557e58a09af3..66a03332284c 100644
--- a/vcl/inc/opengl/win/gdiimpl.hxx
+++ b/vcl/inc/opengl/win/gdiimpl.hxx
@@ -15,6 +15,8 @@
#include "openglgdiimpl.hxx"
#include "win/salgdi.h"
+class OpenGLContext;
+
class WinOpenGLSalGraphicsImpl : public OpenGLSalGraphicsImpl
{
friend class WinLayout;
@@ -24,9 +26,16 @@ private:
public:
WinOpenGLSalGraphicsImpl(WinSalGraphics& rGraphics);
+ virtual void Init() SAL_OVERRIDE;
+
protected:
virtual GLfloat GetWidth() const SAL_OVERRIDE;
virtual GLfloat GetHeight() const SAL_OVERRIDE;
+ virtual bool IsOffscreen() const SAL_OVERRIDE;
+
+ virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE;
+ virtual bool CompareWinContext( OpenGLContext* pContext ) SAL_OVERRIDE;
+ virtual OpenGLContext* CreatePixmapContext() SAL_OVERRIDE;
public:
virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE;
diff --git a/vcl/inc/opengl/x11/gdiimpl.hxx b/vcl/inc/opengl/x11/gdiimpl.hxx
index d25d5d0212ca..f5e5bfb4f2f4 100644
--- a/vcl/inc/opengl/x11/gdiimpl.hxx
+++ b/vcl/inc/opengl/x11/gdiimpl.hxx
@@ -28,12 +28,16 @@ public:
protected:
GLfloat GetWidth() const SAL_OVERRIDE;
GLfloat GetHeight() const SAL_OVERRIDE;
+ bool IsOffscreen() const SAL_OVERRIDE;
+
+ virtual OpenGLContext* CreateWinContext() SAL_OVERRIDE;
+ virtual bool CompareWinContext( OpenGLContext* pContext ) SAL_OVERRIDE;
+ virtual OpenGLContext* CreatePixmapContext() SAL_OVERRIDE;
public:
// implementation of X11GraphicsImpl
virtual void copyBits( const SalTwoRect& rPosAry, SalGraphics* pSrcGraphics ) SAL_OVERRIDE;
- void Init() SAL_OVERRIDE;
bool FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int nY ) SAL_OVERRIDE;
bool RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* pMask, int nX, int nY ) SAL_OVERRIDE;
};