fg_geometry: add a couple comments
[freeglut] / src / fg_geometry.c
index 01e76fc..572b7e3 100644 (file)
@@ -33,6 +33,7 @@
  */
 
 
+#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
@@ -69,6 +70,7 @@ static void fghDrawGeometrySolid(GLfloat *vertices, GLfloat *normals, GLubyte *v
     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);
@@ -198,7 +200,7 @@ static GLfloat cube_n[CUBE_NUM_FACES*3] =
      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,
@@ -725,11 +727,13 @@ static void fghSierpinskiSponge ( int numLevels, double offset[3], GLfloat scale
         free(normals );
     }
 }
+#endif /* GL_ES_VERSION_2_0 */
 
 
 /* -- INTERFACE FUNCTIONS ---------------------------------------------- */
 
 
+#ifndef EGL_VERSION_1_0
 /*
  * Draws a solid sphere
  */
@@ -1324,6 +1328,7 @@ void FGAPIENTRY glutSolidTorus( double dInnerRadius, double dOuterRadius, GLint
   free ( normal ) ;
   glPopMatrix();
 }
+#endif /* EGL_VERSION_1_0 */