diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-07 04:16:54 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-07 21:23:04 +0200 |
commit | 67c134d4e26fca9317157f634bed1fff6a3093e4 (patch) | |
tree | 66dbdcd98fbb37ba74fe70669deb95aa7e5dbd62 /include | |
parent | a8e66dd657dff28ef7ae9cfbe15ea43e4c08aefd (diff) |
avoid linking against the OpenGL libs when only using the window
This lets us avoid to link libsclo against all the OpenGL libraries and
only link against libvcl_opengl. Only code actually using the context
will need to link against the OpenGL libs.
Change-Id: Ia47f4c651702a7fb8517073cda6fb113e7e26e50
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/openglwin.hxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/vcl/openglwin.hxx b/include/vcl/openglwin.hxx index 5c57d4507926..9c4e6113c18e 100644 --- a/include/vcl/openglwin.hxx +++ b/include/vcl/openglwin.hxx @@ -11,16 +11,23 @@ #define INCLUDED_VCL_OPENGLWIN_HXX #include <vcl/syschild.hxx> -#include <vcl/opengl/OpenGLContext.hxx> +#include <vcl/vclopengl_dllapi.hxx> -class OpenGLWindow : public SystemChildWindow +#include <boost/scoped_ptr.hpp> + +class OpenGLContext; +class OpenGLWindowImpl; + +// pImpl Pattern to avoid linking against OpenGL libs when using the class without the context +class VCLOPENGL_DLLPUBLIC OpenGLWindow : public SystemChildWindow { public: OpenGLWindow(Window* pParent); - OpenGLContext& getContext(); + ~OpenGLWindow(); + OpenGLContext* getContext(); private: - OpenGLContext maContext; + boost::scoped_ptr<OpenGLWindowImpl> mpImpl; }; #endif |