summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-01 17:40:29 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:25 +0100
commit6f36ed55115b763cf27acd1a32e0c0576d88582e (patch)
treed6d5725de9755ad5e74b5ad098a101bacc47f0de /chart2
parent0ba9365fd7fa05a8e03b73a91f2356c4c2d6706c (diff)
remove one more unused method
Change-Id: I6801486c09e5fdfe9a7a00c42503c3701f77cd54
Diffstat (limited to 'chart2')
-rwxr-xr-xchart2/source/view/main/OpenGLRender.cxx64
-rwxr-xr-xchart2/source/view/main/OpenGLRender.hxx1
2 files changed, 0 insertions, 65 deletions
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 1b7a4d57a923..93f2fe72617f 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -384,70 +384,6 @@ int OpenGLRender::InitOpenGL(GLWindow aWindow)
return 0;
}
-
-int OpenGLRender::RenderModelf(float *vertexArray, unsigned int vertexArraySize, float *colorArray, unsigned int colorArraySize)
-{
- if (vertexArraySize != colorArraySize)
- {
- return -1;
- }
- glViewport(0, 0, m_iWidth, m_iHeight);
- glClearDepth(1.0f);
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- //fill vertex buffer
- glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer);
- glBufferData(GL_ARRAY_BUFFER, vertexArraySize, vertexArray, GL_STATIC_DRAW);
- //fill color buffer
- glBindBuffer(GL_ARRAY_BUFFER, m_ColorBuffer);
- glBufferData(GL_ARRAY_BUFFER, colorArraySize, colorArray, GL_STATIC_DRAW);
- m_MVP = m_Projection * m_View * m_Model;
- // Clear the screen
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
- // Use our shader
- glUseProgram(m_ProgramID);
-
- // Send our transformation to the currently bound shader,
- // in the "MVP" uniform
- glUniformMatrix4fv(m_MatrixID, 1, GL_FALSE, &m_MVP[0][0]);
-
- // 1rst attribute buffer : vertices
- glEnableVertexAttribArray(m_VertexID);
- glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer);
- glVertexAttribPointer(
- m_VertexID, // attribute. No particular reason for 0, but must match the layout in the shader.
- 3, // size
- GL_FLOAT, // type
- GL_FALSE, // normalized?
- 0, // stride
- (void*)0 // array buffer offset
- );
- // 2nd attribute buffer : colors
- glEnableVertexAttribArray(m_ColorID);
- glBindBuffer(GL_ARRAY_BUFFER, m_ColorBuffer);
- glVertexAttribPointer(
- m_ColorID, // attribute. No particular reason for 1, but must match the layout in the shader.
- 3, // size
- GL_FLOAT, // type
- GL_FALSE, // normalized?
- 0, // stride
- (void*)0 // array buffer offset
- );
- // Draw the triangle !
- glDrawArrays(GL_TRIANGLES, 0, vertexArraySize / sizeof(float)); // 12*3 indices starting at 0 -> 12 triangles
-
- glDisableVertexAttribArray(m_VertexID);
- glDisableVertexAttribArray(m_ColorID);
- glUseProgram(0);
-#if defined( WNT )
- SwapBuffers(glWin.hDC);
- glFlush();
-#elif defined( UNX )
- unx::glXSwapBuffers(glWin.dpy, glWin.win);
-#endif
- return 0;
-}
-
BitmapEx OpenGLRender::GetAsBitmap()
{
boost::scoped_array<sal_uInt8> buf(new sal_uInt8[m_iWidth * m_iHeight * 4]);
diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx
index 0260cc13b758..ec7c6e4de869 100755
--- a/chart2/source/view/main/OpenGLRender.hxx
+++ b/chart2/source/view/main/OpenGLRender.hxx
@@ -126,7 +126,6 @@ public:
int InitOpenGL(GLWindow);
int SetViewPoint(PosVeci3 camPos, PosVeci3 orgPos, int headUpFlag);
int MoveModelf(PosVecf3 trans, PosVecf3 angle, PosVecf3 scale);
- int RenderModelf(float *vertexArray, unsigned int vertexArraySize, float *colorArray, unsigned int colorArraySize);
void SetWidth(int width);
void SetHeight(int height);
int GetWidth();