[Libreoffice-commits] core.git: Branch 'private/moggi/debug-opengl' - chart2/source

Markus Mohrhard markus.mohrhard at collabora.co.uk
Sat Jan 11 11:01:36 PST 2014


 chart2/source/view/main/OpenGLRender.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 00bfea238c65d925153ab1f637e4bf83bc4ff837
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date:   Sat Jan 11 20:00:48 2014 +0100

    I already know where the error is but want to be sure
    
    Change-Id: Ibe90e99320243aadec2e2d8ab3740567e83f7f56

diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 66b894a..ebb7542 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -571,15 +571,21 @@ int OpenGLRender::RenderLine2FBO(int)
         Line2DPointList &pointList = m_Line2DShapePointList.front();
         //fill vertex buffer
         glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer);
+        CHECK_GL_ERROR();
         glBufferData(GL_ARRAY_BUFFER, pointList.bufLen, pointList.pointBuf, GL_STATIC_DRAW);
+        CHECK_GL_ERROR();
         // Use our shader
         glUseProgram(m_Line2DProID);
+        CHECK_GL_ERROR();
 
         glUniform4fv(m_Line2DColorID, 1, &m_Line2DColor[0]);
+        CHECK_GL_ERROR();
 
         // 1rst attribute buffer : vertices
         glEnableVertexAttribArray(m_Line2DVertexID);
+        CHECK_GL_ERROR();
         glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer);
+        CHECK_GL_ERROR();
         glVertexAttribPointer(
             m_Line2DVertexID,                  // attribute. No particular reason for 0, but must match the layout in the shader.
             2,                  // size
@@ -589,8 +595,11 @@ int OpenGLRender::RenderLine2FBO(int)
             (void*)0            // array buffer offset
             );
         glDrawArrays(GL_LINE_STRIP, 0, pointList.bufLen / sizeof(float) / 2); // 12*3 indices starting at 0 -> 12 triangles
+        CHECK_GL_ERROR();
         glDisableVertexAttribArray(m_Line2DWholeVertexID);
+        CHECK_GL_ERROR();
         glUseProgram(0);
+        CHECK_GL_ERROR();
         free(pointList.pointBuf);
         m_Line2DShapePointList.pop_front();
     }


More information about the Libreoffice-commits mailing list