summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-10-25 02:16:51 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-10-25 02:16:51 +0200
commite4a5ba4a97320e696e3c7f4a3a870264602f211a (patch)
tree97bfcc99dc271174f03e33eb0facfd96537c04c9
parente5be87590e237225077e847b972af043d600a01e (diff)
add OpenGLContext to OpenGL vcl rendering code
Change-Id: I05d1033c04d892638262d4a6a3e76897470e1467
-rw-r--r--vcl/inc/openglgdiimpl.hxx2
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx9
2 files changed, 11 insertions, 0 deletions
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index 6ce94cb6dbe8..1a3b6e746d38 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -34,6 +34,8 @@ private:
public:
virtual ~OpenGLSalGraphicsImpl ();
+ OpenGLContext& GetOpenGLContext() { return maContext; }
+
virtual void freeResources() SAL_OVERRIDE;
virtual bool setClipRegion( const vcl::Region& ) SAL_OVERRIDE;
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 65a9ab622096..94d03a90918b 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -151,6 +151,15 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
pImpl->mnPenPixel = GetPixel( pImpl->mnPenColor );
pImpl->mnBrushPixel = GetPixel( pImpl->mnBrushColor );
}
+ else
+ {
+ OpenGLSalGraphicsImpl* pOpenGLImpl = dynamic_cast<OpenGLSalGraphicsImpl*>(mpImpl.get());
+ if (pOpenGLImpl)
+ {
+ pOpenGLImpl->GetOpenGLContext().init(GetXDisplay(),
+ GetDisplay()->GetDrawable(m_nXScreen), m_nXScreen.getXScreen());
+ }
+ }
nTextPixel_ = GetPixel( nTextColor_ );
}
}