diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-07 16:11:02 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-07 16:11:20 +0000 |
commit | 78b100ec9cb0db2f7b33ece5ad3287a67a37246f (patch) | |
tree | 09915b94cacc0f590850b2dc5772cff617b46e4b /include/vcl/openglwin.hxx | |
parent | 665844d8dd0cf4b3fc6cdb56f3e155704ba76b00 (diff) |
only init the OpenGL context if we need it
Change-Id: Ia88a1720d204b9933f1476bd703b99180e45abde
Reviewed-on: https://gerrit.libreoffice.org/26023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'include/vcl/openglwin.hxx')
-rw-r--r-- | include/vcl/openglwin.hxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index 6b2e58dd5c40..cac81a6968ea 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -33,7 +33,7 @@ public: class VCL_DLLPUBLIC OpenGLWindow : public vcl::Window { public: - OpenGLWindow(vcl::Window* pParent); + OpenGLWindow(vcl::Window* pParent, bool bInit = true); virtual ~OpenGLWindow(); virtual void dispose() override; @@ -48,6 +48,10 @@ public: virtual void MouseMove( const MouseEvent& rMEvt ) override; virtual void Command( const CommandEvent& rCEvt ) override; + bool IsInitialized() const; + + void Initialize(); + private: std::unique_ptr<OpenGLWindowImpl> mxImpl; IRenderer* mpRenderer; |