summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-04-02 03:42:03 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-04-08 04:38:21 +0200
commit6948bf58ce181b17f60ef81f10205ef4dac50cc6 (patch)
tree0440c3772a67d09ff28c3bb2528583e59e1c7fa9 /include
parentb458c16a431010712b0d5e18b125a9ec897372c9 (diff)
move the OpenGLContext to the model object
In the next step we need to initialize it again but in the ViewContact it gets destroyed several times which is a problem. Change-Id: I3efe4311bfb279b7407eabd0dd673f33603d8e9b
Diffstat (limited to 'include')
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx5
-rw-r--r--include/svx/svdoopengl.hxx10
2 files changed, 11 insertions, 4 deletions
diff --git a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
index 00e1dffde835..f540624c44f9 100644
--- a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
+++ b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
@@ -24,11 +24,8 @@ public:
ViewObjectContactOfOpenGLObj(ObjectContact& rObjectContact, ViewContact& rViewContact);
virtual ~ViewObjectContactOfOpenGLObj();
-protected:
- Window* getWindow() const;
-
private:
- OpenGLContext m_aOpenGLContext;
+ Window* getWindow() const;
};
} // namespace sdr
diff --git a/include/svx/svdoopengl.hxx b/include/svx/svdoopengl.hxx
index 857e313ae2bc..4510f56327a8 100644
--- a/include/svx/svdoopengl.hxx
+++ b/include/svx/svdoopengl.hxx
@@ -12,6 +12,7 @@
#include <svx/svdobj.hxx>
#include <svx/sdr/contact/viewcontactofopenglobj.hxx>
+#include <vcl/OpenGLContext.hxx>
class SVX_DLLPUBLIC SdrOpenGLObj : public SdrObject
{
@@ -20,6 +21,15 @@ public:
{
return new sdr::contact::ViewContactOfOpenGLObj(*this);
}
+
+ OpenGLContext& getOpenGLContext()
+ {
+ return maContext;
+ }
+
+private:
+
+ OpenGLContext maContext;
};
#endif