summaryrefslogtreecommitdiff
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-02 03:42:03 +0200
commitaff868fb3a240d176372fa5771c86a7ee993caff (patch)
tree0102f68a30d3ba29c26a1441d6d4bd8ce5b9ccb0
parentb48f11667dc28abf8fbbb0c4136909a437c0e00b (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
-rw-r--r--include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx5
-rw-r--r--include/svx/svdoopengl.hxx10
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx3
3 files changed, 11 insertions, 7 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
diff --git a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
index 1689468993b1..2cf0086287f8 100644
--- a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx
@@ -18,9 +18,6 @@ ViewObjectContactOfOpenGLObj::ViewObjectContactOfOpenGLObj(
ObjectContact& rObjectContact, ViewContact& rViewContact )
: ViewObjectContactOfSdrObj( rObjectContact, rViewContact )
{
- m_aOpenGLContext.init(getWindow());
- // Set a dummy size to make the window visible
- m_aOpenGLContext.setWinSize(Size(200,200));
}
ViewObjectContactOfOpenGLObj::~ViewObjectContactOfOpenGLObj()