IF(NOT FREEGLUT_GLES2 AND NOT FREEGLUT_GLES1)
LIST(APPEND FREEGLUT_SRCS
src/fg_font.c
- src/fg_geometry.c
src/fg_menu.c
src/fg_teapot.c
src/fg_teapot_data.h
)
ELSE()
LIST(APPEND FREEGLUT_SRCS
+ src/fg_geometry.c
src/gles_stubs.c
)
ENDIF()
/*
* Geometry functions, see freeglut_geometry.c
*/
+#ifndef GL_ES_VERSION_2_0
FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void );
FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void );
FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, double offset[3], double scale );
FGAPI void FGAPIENTRY glutWireCylinder( double radius, double height, GLint slices, GLint stacks);
FGAPI void FGAPIENTRY glutSolidCylinder( double radius, double height, GLint slices, GLint stacks);
+#endif
/*
* Extension functions, see freeglut_ext.c
* Geometry functions, see freeglut_geometry.c
*/
+#ifndef GL_ES_VERSION_2_0
FGAPI void FGAPIENTRY glutWireCube( double size );
FGAPI void FGAPIENTRY glutSolidCube( double size );
+#endif
+#ifndef EGL_VERSION_1_0
FGAPI void FGAPIENTRY glutWireSphere( double radius, GLint slices, GLint stacks );
FGAPI void FGAPIENTRY glutSolidSphere( double radius, GLint slices, GLint stacks );
FGAPI void FGAPIENTRY glutWireCone( double base, double height, GLint slices, GLint stacks );
FGAPI void FGAPIENTRY glutSolidCone( double base, double height, GLint slices, GLint stacks );
+#endif
+#ifndef GL_ES_VERSION_2_0
FGAPI void FGAPIENTRY glutWireTorus( double innerRadius, double outerRadius, GLint sides, GLint rings );
FGAPI void FGAPIENTRY glutSolidTorus( double innerRadius, double outerRadius, GLint sides, GLint rings );
FGAPI void FGAPIENTRY glutWireDodecahedron( void );
FGAPI void FGAPIENTRY glutSolidTetrahedron( void );
FGAPI void FGAPIENTRY glutWireIcosahedron( void );
FGAPI void FGAPIENTRY glutSolidIcosahedron( void );
+#endif
/*
* Teapot rendering functions, found in freeglut_teapot.c
*/
+/* TODO: doesn't work with GLES1 yet */
+#ifndef EGL_VERSION_1_0
FGAPI void FGAPIENTRY glutWireTeapot( double size );
FGAPI void FGAPIENTRY glutSolidTeapot( double size );
+#endif
/*
* Game mode functions, see freeglut_gamemode.c
CHECK_NAME(glutStrokeWidth);
CHECK_NAME(glutBitmapLength);
CHECK_NAME(glutStrokeLength);
+#ifndef EGL_VERSION_1_0
CHECK_NAME(glutWireSphere);
CHECK_NAME(glutSolidSphere);
CHECK_NAME(glutWireCone);
CHECK_NAME(glutSolidCone);
- CHECK_NAME(glutWireCube);
- CHECK_NAME(glutSolidCube);
CHECK_NAME(glutWireTorus);
CHECK_NAME(glutSolidTorus);
- CHECK_NAME(glutWireDodecahedron);
- CHECK_NAME(glutSolidDodecahedron);
+ CHECK_NAME(glutWireCylinder);
+ CHECK_NAME(glutSolidCylinder);
CHECK_NAME(glutWireTeapot);
CHECK_NAME(glutSolidTeapot);
+#endif
+#ifndef GL_ES_VERSION_2_0
+ CHECK_NAME(glutWireCube);
+ CHECK_NAME(glutSolidCube);
+ CHECK_NAME(glutWireDodecahedron);
+ CHECK_NAME(glutSolidDodecahedron);
CHECK_NAME(glutWireOctahedron);
CHECK_NAME(glutSolidOctahedron);
CHECK_NAME(glutWireTetrahedron);
CHECK_NAME(glutSolidTetrahedron);
CHECK_NAME(glutWireIcosahedron);
CHECK_NAME(glutSolidIcosahedron);
+ CHECK_NAME(glutWireRhombicDodecahedron);
+ CHECK_NAME(glutSolidRhombicDodecahedron);
+ CHECK_NAME(glutWireSierpinskiSponge);
+ CHECK_NAME(glutSolidSierpinskiSponge);
+#endif
CHECK_NAME(glutVideoResizeGet);
CHECK_NAME(glutSetupVideoResizing);
CHECK_NAME(glutStopVideoResizing);
CHECK_NAME(glutStrokeHeight);
CHECK_NAME(glutBitmapString);
CHECK_NAME(glutStrokeString);
- CHECK_NAME(glutWireRhombicDodecahedron);
- CHECK_NAME(glutSolidRhombicDodecahedron);
- CHECK_NAME(glutWireSierpinskiSponge);
- CHECK_NAME(glutSolidSierpinskiSponge);
- CHECK_NAME(glutWireCylinder);
- CHECK_NAME(glutSolidCylinder);
CHECK_NAME(glutGetProcAddress);
CHECK_NAME(glutMouseWheelFunc);
CHECK_NAME(glutJoystickGetNumAxes);
*/
+#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
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 */
+/* TODO: implement me! */
+
#include <GL/freeglut.h>
#include "fg_internal.h"
int mouse_x, int mouse_y ) {
fprintf(stderr, "fgCheckActiveMenu: STUB\n");
}
+
+int glutCreateMenu( void (* callback)( int menu ) ) {}
+void glutDestroyMenu( int menu ) {}
+int glutGetMenu( void ) {}
+void glutSetMenu( int menu ) {}
+void glutAddMenuEntry( const char* label, int value ) {}
+void glutAddSubMenu( const char* label, int subMenu ) {}
+void glutChangeToMenuEntry( int item, const char* label, int value ) {}
+void glutChangeToSubMenu( int item, const char* label, int value ) {}
+void glutRemoveMenuItem( int item ) {}
+void glutAttachMenu( int button ) {}
+void glutDetachMenu( int button ) {}
+
+void glutBitmapCharacter( void* font, int character ) {}
+int glutBitmapWidth( void* font, int character ) {}
+void glutStrokeCharacter( void* font, int character ) {}
+int glutStrokeWidth( void* font, int character ) {}
+int glutBitmapLength( void* font, const unsigned char* string ) {}
+int glutStrokeLength( void* font, const unsigned char* string ) {}
+
+void *glutGetMenuData( void ) {}
+void glutSetMenuData(void* data) {}
+
+int glutBitmapHeight( void* font ) {}
+GLfloat glutStrokeHeight( void* font ) {}
+void glutBitmapString( void* font, const unsigned char *string ) {}
+void glutStrokeString( void* font, const unsigned char *string ) {}
+
+void glutWireTeapot( double size ){}
+void glutSolidTeapot( double size ){}