*/
+#ifndef GL_ES_VERSION_2_0
/* General functions for drawing geometry
* Solids are drawn by glDrawArrays if composed of triangles, or by
* glDrawElements if consisting of squares or pentagons that were
if (numEdgePerFace==3)
glDrawArrays(GL_TRIANGLES, 0, numVertices);
else
+ /* The number of elements is passed as numVertices */
glDrawElements(GL_TRIANGLES, numVertices, GL_UNSIGNED_BYTE, vertIdxs);
glDisableClientState(GL_VERTEX_ARRAY);
0.0f, 0.0f,-1.0f
};
-/* Vertex indices */
+/* Vertex indices, as quads, before triangulation */
static GLubyte cube_vi[CUBE_VERT_PER_OBJ] =
{
0,1,2,3,
free(normals );
}
}
+#endif /* GL_ES_VERSION_2_0 */
/* -- INTERFACE FUNCTIONS ---------------------------------------------- */
+#ifndef EGL_VERSION_1_0
/*
* Draws a solid sphere
*/
free ( normal ) ;
glPopMatrix();
}
+#endif /* EGL_VERSION_1_0 */