@@ -331,7 +331,7 @@ static void fghDrawGeometryWire11(GLfloat *vertices, GLfloat *normals,
331331 GLushort * vertIdxs2 , GLsizei numParts2 , GLsizei numVertPerPart2
332332 )
333333{
334- #ifdef GL_VERSION_1_1
334+ #if defined( GL_VERSION_1_1 ) || defined( GL_VERSION_ES_CM_1_0 )
335335 int i ;
336336
337337 glEnableClientState (GL_VERTEX_ARRAY );
@@ -365,7 +365,7 @@ static void fghDrawGeometryWire11(GLfloat *vertices, GLfloat *normals,
365365static void fghDrawGeometrySolid11 (GLfloat * vertices , GLfloat * normals , GLfloat * textcs , GLsizei numVertices ,
366366 GLushort * vertIdxs , GLsizei numParts , GLsizei numVertIdxsPerPart )
367367{
368- #ifdef GL_VERSION_1_1
368+ #if defined( GL_VERSION_1_1 ) || defined( GL_VERSION_ES_CM_1_0 )
369369 int i ;
370370
371371 glEnableClientState (GL_VERTEX_ARRAY );
@@ -404,6 +404,7 @@ static void fghDrawGeometryWire20(GLfloat *vertices, GLfloat *normals, GLsizei n
404404 GLushort * vertIdxs2 , GLsizei numParts2 , GLsizei numVertPerPart2 ,
405405 GLint attribute_v_coord , GLint attribute_v_normal )
406406{
407+ #if defined(GL_VERSION_1_1 ) || defined(GL_VERSION_ES_CM_1_0 )
407408 GLuint vbo_coords = 0 , vbo_normals = 0 ,
408409 ibo_elements = 0 , ibo_elements2 = 0 ;
409410 GLsizei numVertIdxs = numParts * numVertPerPart ;
@@ -505,6 +506,7 @@ static void fghDrawGeometryWire20(GLfloat *vertices, GLfloat *normals, GLsizei n
505506 fghDeleteBuffers (1 , & ibo_elements );
506507 if (ibo_elements2 != 0 )
507508 fghDeleteBuffers (1 , & ibo_elements2 );
509+ #endif /* GL version at least 1.1 */
508510}
509511
510512
@@ -515,6 +517,7 @@ static void fghDrawGeometrySolid20(GLfloat *vertices, GLfloat *normals, GLfloat
515517 GLushort * vertIdxs , GLsizei numParts , GLsizei numVertIdxsPerPart ,
516518 GLint attribute_v_coord , GLint attribute_v_normal , GLint attribute_v_texture )
517519{
520+ #if defined(GL_VERSION_1_1 ) || defined(GL_VERSION_ES_CM_1_0 )
518521 GLuint vbo_coords = 0 , vbo_normals = 0 , vbo_textcs = 0 , ibo_elements = 0 ;
519522 GLsizei numVertIdxs = numParts * numVertIdxsPerPart ;
520523 int i ;
@@ -624,6 +627,7 @@ static void fghDrawGeometrySolid20(GLfloat *vertices, GLfloat *normals, GLfloat
624627 fghDeleteBuffers (1 , & vbo_textcs );
625628 if (ibo_elements != 0 )
626629 fghDeleteBuffers (1 , & ibo_elements );
630+ #endif /* GL version at least 1.1 */
627631}
628632
629633
@@ -653,7 +657,7 @@ static void fghGenerateNormalVisualization(GLfloat *vertices, GLfloat *normals,
653657 }
654658}
655659
656- #ifndef GL_VERSION_1_1
660+ #if !defined( GL_VERSION_1_1 ) && !defined( GL_VERSION_ES_CM_1_0 )
657661/* Version for OpenGL 1.0 */
658662static void fghDrawNormalVisualization10 (void )
659663{
@@ -679,7 +683,7 @@ static void fghDrawNormalVisualization10(void)
679683/* Version for OpenGL (ES) 1.1 */
680684static void fghDrawNormalVisualization11 (void )
681685{
682- #ifdef GL_VERSION_1_1
686+ #if defined( GL_VERSION_1_1 ) || defined( GL_VERSION_ES_CM_1_0 )
683687 GLfloat currentColor [4 ];
684688 /* Setup draw color: (1,1,1)-shape's color */
685689 glGetFloatv (GL_CURRENT_COLOR ,currentColor );
@@ -703,6 +707,7 @@ static void fghDrawNormalVisualization11(void)
703707/* Version for OpenGL (ES) >= 2.0 */
704708static void fghDrawNormalVisualization20 (GLint attribute_v_coord )
705709{
710+ #if defined(GL_VERSION_1_1 ) || defined(GL_VERSION_ES_CM_1_0 )
706711 GLuint vbo_coords = 0 ;
707712
708713 if (attribute_v_coord != -1 ) {
@@ -737,6 +742,7 @@ static void fghDrawNormalVisualization20(GLint attribute_v_coord)
737742
738743 /* Done, free memory */
739744 free (verticesForNormalVisualization );
745+ #endif /* GL version at least 1.1 */
740746}
741747
742748/**
0 commit comments