Eventually tracked down nasty Android bug

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1260 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
beuc 2012-04-21 20:19:31 +00:00
parent d554cb9ab1
commit 97a9318a81

View File

@ -237,6 +237,11 @@ static void fghDrawGeometrySolid20(GLfloat *vertices, GLfloat *normals, GLubyte
glDrawElements(GL_TRIANGLES, numVertIdxs, GL_UNSIGNED_BYTE, 0); glDrawElements(GL_TRIANGLES, numVertIdxs, GL_UNSIGNED_BYTE, 0);
} }
/* Clean existing bindings before clean-up */
/* Android showed instability otherwise */
fghBindBuffer(FGH_ARRAY_BUFFER, 0);
fghBindBuffer(FGH_ELEMENT_ARRAY_BUFFER, 0);
if (vbo_coords != 0) if (vbo_coords != 0)
fghDisableVertexAttribArray(attribute_v_coord); fghDisableVertexAttribArray(attribute_v_coord);
if (vbo_normals != 0) if (vbo_normals != 0)