Axes are not rendered with normals so the normals client state has to be disabled when drawing them.

Thu, 09 Feb 2017 23:50:11 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 09 Feb 2017 23:50:11 +0200
changeset 1120
c3f07620494e
parent 1119
749fdf61b5cd
child 1121
be0b5ad128ea

Axes are not rendered with normals so the normals client state has to be disabled when drawing them.

src/glRenderer.cpp file | annotate | diff | comparison | revisions
--- a/src/glRenderer.cpp	Thu Feb 09 23:46:45 2017 +0200
+++ b/src/glRenderer.cpp	Thu Feb 09 23:50:11 2017 +0200
@@ -455,11 +455,13 @@
 
 		if (m_config->drawAxes())
 		{
+			glDisableClientState (GL_NORMAL_ARRAY);
 			glBindBuffer (GL_ARRAY_BUFFER, m_axesVbo);
 			glVertexPointer (3, GL_FLOAT, 0, NULL);
 			glBindBuffer (GL_ARRAY_BUFFER, m_axesVbo);
 			glColorPointer (3, GL_FLOAT, 0, NULL);
 			glDrawArrays (GL_LINES, 0, 6);
+			glEnableClientState (GL_NORMAL_ARRAY);
 			CHECK_GL_ERROR();
 		}
 	}

mercurial