To implement an abstract method:isOpenGLInitialized

Change-Id: I651c0e5830008fd08ba886ccf1be99d40868bb72
This commit is contained in:
xukai
2014-05-05 10:36:32 +08:00
committed by Markus Mohrhard
parent 4493860167
commit bf293da678
2 changed files with 9 additions and 2 deletions

View File

@@ -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

View File

@@ -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);