summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorxukai <xukai@multicorewareinc.com>2014-05-05 10:36:32 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-05 17:57:19 +0200
commitbf293da67847f64fc0cf0acd54a9f4e4e76f9da5 (patch)
tree69aef9a50b7a129f91ea60873dc2a34bc96b4421 /chart2
parent4493860167d998cf03274b6acc7c7959d5738c4b (diff)
To implement an abstract method:isOpenGLInitialized
Change-Id: I651c0e5830008fd08ba886ccf1be99d40868bb72
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/GL3DRenderer.hxx4
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx7
2 files changed, 9 insertions, 2 deletions
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx
index 26c971663b6f..049ea67c0639 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -159,7 +159,7 @@ public:
void LoadShaders();
void init();
-
+ bool isOpenGLInitialized();
void Set3DSenceInfo(const glm::vec3& cameraUp, sal_Int32 color, bool twoSidesLighting = false);
void SetLightInfo(bool lightOn, sal_Int32 color, const glm::vec4& direction);
void AddShapePolygon3DObject(sal_Int32 color, bool lineOnly, sal_Int32 lineColor,
@@ -227,7 +227,7 @@ private:
glm::mat4 m_Model;
// Our ModelViewProjection : multiplication of our 3 matrices
glm::mat4 m_MVP;
-
+ bool m_IsOpenglInit;
#if 0
double m_dFreq;
#endif
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 762c8731905b..5a6e17a4f0b0 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -141,8 +141,15 @@ void OpenGL3DRenderer::init()
m_3DProjection = glm::perspective(30.0f, (float)m_iWidth / (float)m_iHeight, 0.01f, 2000.0f);
LoadShaders();
+ m_IsOpenglInit = true;
}
+bool OpenGL3DRenderer::isOpenGLInitialized()
+{
+ return m_IsOpenglInit;
+}
+
+
void OpenGL3DRenderer::AddVertexData(GLuint vertexBuf)
{
glBindBuffer(GL_ARRAY_BUFFER, vertexBuf);