[Libreoffice-commits] core.git: Branch 'private/moggi/opengl-3D-bar-rendering' - include/svx svx/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Tue Apr 1 18:45:27 PDT 2014
include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx | 5 +----
include/svx/svdoopengl.hxx | 10 ++++++++++
svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx | 3 ---
3 files changed, 11 insertions(+), 7 deletions(-)
New commits:
commit aff868fb3a240d176372fa5771c86a7ee993caff
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Wed Apr 2 03:42:03 2014 +0200
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
diff --git a/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx b/include/svx/sdr/contact/viewobjectcontactofopenglobj.hxx
index 00e1dff..f540624c 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 857e313..4510f56 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 1689468..2cf0086 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()
More information about the Libreoffice-commits
mailing list