X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=include%2FGL%2Ffreeglut_std.h;h=573243a5d766563f4642406fcb9375e1d4da7645;hb=4e946b7659667446ff0b30460a96c3b431750e76;hp=32489299bcdb06817a7bb90e8a815c834bf1d25f;hpb=8fb7b342a32cb2336b5c3752c68714b47ac7c63e;p=freeglut diff --git a/include/GL/freeglut_std.h b/include/GL/freeglut_std.h index 3248929..573243a 100644 --- a/include/GL/freeglut_std.h +++ b/include/GL/freeglut_std.h @@ -43,7 +43,7 @@ */ /* Define FREEGLUT_LIB_PRAGMAS to 1 to include library - * pragmas or to 1 to exclude library pragmas. + * pragmas or to 0 to exclude library pragmas. * The default behavior depends on the compiler/platform. */ # ifndef FREEGLUT_LIB_PRAGMAS @@ -57,8 +57,10 @@ # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN 1 # endif -# define NOMINMAX -# include +# ifndef NOMINMAX +# define NOMINMAX +# endif +# include /* Windows static library */ # ifdef FREEGLUT_STATIC @@ -117,8 +119,20 @@ /* * Always include OpenGL and GLU headers */ -#include -#include +#ifdef ANDROID +/* Use EGL (implies OpenGL ES) */ +/* TODO: EGL/GLES builds should be more generally defined, possibly by + generating this file dynamically */ +# include +/* TODO: we probably need 2 builds: -lGLESv1 and -lGLESv2 */ +/* #include */ +# include +/* TODO: temporary work-around for e.g. glutWireCube */ +# define GLdouble GLfloat +#else +# include +# include +#endif /* * GLUT API macro definitions -- the special key codes: @@ -171,8 +185,6 @@ #define GLUT_MULTISAMPLE 0x0080 #define GLUT_STEREO 0x0100 #define GLUT_LUMINANCE 0x0200 -#define GLUT_CAPTIONLESS 0x0400 -#define GLUT_BORDERLESS 0x0800 /* * GLUT API macro definitions -- windows and menu related definitions @@ -599,16 +611,21 @@ FGAPI void FGAPIENTRY glutReportErrors( void ); /* to get the prototype for exit() */ #include -#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__) FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int)); #ifndef FREEGLUT_BUILDING_LIB -static void FGAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#if defined(__GNUC__) +#define FGUNUSED __attribute__((unused)) +#else +#define FGUNUSED +#endif +static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } #define glutInit glutInit_ATEXIT_HACK -static int FGAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } #define glutCreateWindow glutCreateWindow_ATEXIT_HACK -static int FGAPIENTRY glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } +static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } #define glutCreateMenu glutCreateMenu_ATEXIT_HACK #endif #endif