GLES1 and GLES2 versions are now compiled with -DFREEGLUT_GLES1 and -DFREEGLUT_GLES2...
[freeglut] / include / GL / freeglut_std.h
index 9a18554..f77497e 100644 (file)
 #  ifndef WIN32_LEAN_AND_MEAN
 #    define WIN32_LEAN_AND_MEAN 1
 #  endif
-#   define NOMINMAX
-#   include <Windows.h>
+#  ifndef NOMINMAX
+#    define NOMINMAX
+#  endif
+#   include <windows.h>
 
 /* Windows static library */
 #   ifdef FREEGLUT_STATIC
 /*
  * Always include OpenGL and GLU headers
  */
-#include <GL/gl.h>
-#include <GL/glu.h>
+#ifdef FREEGLUT_GLES2
+#   include <EGL/egl.h>
+#   include <GLES2/gl2.h>
+#elif FREEGLUT_GLES1
+#   include <EGL/egl.h>
+#   include <GLES/gl.h>
+#else
+#   include <GL/gl.h>
+#   include <GL/glu.h>
+#endif
 
 /*
  * GLUT API macro definitions -- the special key codes:
@@ -511,6 +521,11 @@ FGAPI int     FGAPIENTRY glutStrokeLength( void* font, const unsigned char* stri
 /*
  * Geometry functions, see freeglut_geometry.c
  */
+#ifdef EGL_VERSION_1_0
+/* TODO: temporary work-around for missing GLdouble in GLES */
+#   define GLdouble     GLfloat  
+#endif
+
 FGAPI void    FGAPIENTRY glutWireCube( GLdouble size );
 FGAPI void    FGAPIENTRY glutSolidCube( GLdouble size );
 FGAPI void    FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );