/** * GLUT compatibility stubs for Android * Copyright (C) 2012 Sylvain Beucler * Released under the same license as FreeGLUT */ #ifndef __GLUT_H__ #define __GLUT_H__ /* * freeglut_std.h * * The GLUT-compatible part of the freeglut library include file * * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. * Written by Pawel W. Olszta, * Creation date: Thu Dec 2 1999 * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifdef __cplusplus extern "C" { #endif /* Non-Windows definition of FGAPI and FGAPIENTRY */ # define FGAPI # define FGAPIENTRY FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv ); FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion ); FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ); FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height ); FGAPI void FGAPIENTRY glutMainLoop( void ); FGAPI int FGAPIENTRY glutCreateWindow( const char* title ); FGAPI void FGAPIENTRY glutPostRedisplay( void ); FGAPI void FGAPIENTRY glutSwapBuffers( void ); FGAPI void FGAPIENTRY glutWarpPointer( int x, int y ); FGAPI void FGAPIENTRY glutSetCursor( int cursor ); FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) ); FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ); FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) ); FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) ); FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) ); FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) ); FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ); FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) ); FGAPI int FGAPIENTRY glutGet( GLenum query ); FGAPI int FGAPIENTRY glutGetModifiers( void ); /* * GLUT API macro definitions -- the special key codes: */ #define GLUT_KEY_F1 0x0001 #define GLUT_KEY_F2 0x0002 #define GLUT_KEY_F3 0x0003 #define GLUT_KEY_F4 0x0004 #define GLUT_KEY_F5 0x0005 #define GLUT_KEY_F6 0x0006 #define GLUT_KEY_F7 0x0007 #define GLUT_KEY_F8 0x0008 #define GLUT_KEY_F9 0x0009 #define GLUT_KEY_F10 0x000A #define GLUT_KEY_F11 0x000B #define GLUT_KEY_F12 0x000C #define GLUT_KEY_LEFT 0x0064 #define GLUT_KEY_UP 0x0065 #define GLUT_KEY_RIGHT 0x0066 #define GLUT_KEY_DOWN 0x0067 #define GLUT_KEY_PAGE_UP 0x0068 #define GLUT_KEY_PAGE_DOWN 0x0069 #define GLUT_KEY_HOME 0x006A #define GLUT_KEY_END 0x006B #define GLUT_KEY_INSERT 0x006C /* * GLUT API macro definitions -- mouse state definitions */ #define GLUT_LEFT_BUTTON 0x0000 #define GLUT_MIDDLE_BUTTON 0x0001 #define GLUT_RIGHT_BUTTON 0x0002 #define GLUT_DOWN 0x0000 #define GLUT_UP 0x0001 #define GLUT_LEFT 0x0000 #define GLUT_ENTERED 0x0001 /* * GLUT API macro definitions -- the display mode definitions */ #define GLUT_RGB 0x0000 #define GLUT_RGBA 0x0000 #define GLUT_INDEX 0x0001 #define GLUT_SINGLE 0x0000 #define GLUT_DOUBLE 0x0002 #define GLUT_ACCUM 0x0004 #define GLUT_ALPHA 0x0008 #define GLUT_DEPTH 0x0010 #define GLUT_STENCIL 0x0020 #define GLUT_MULTISAMPLE 0x0080 #define GLUT_STEREO 0x0100 #define GLUT_LUMINANCE 0x0200 /* * GLUT API macro definitions -- the glutGet parameters */ #define GLUT_WINDOW_WIDTH 0x0066 #define GLUT_WINDOW_HEIGHT 0x0067 #define GLUT_ELAPSED_TIME 0x02BC /* * GLUT API macro definitions -- the glutGetModifiers parameters */ #define GLUT_ACTIVE_SHIFT 0x0001 #define GLUT_ACTIVE_CTRL 0x0002 #define GLUT_ACTIVE_ALT 0x0004 /* * GLUT API macro definitions -- the glutSetCursor parameters */ #define GLUT_CURSOR_RIGHT_ARROW 0x0000 #define GLUT_CURSOR_LEFT_ARROW 0x0001 #define GLUT_CURSOR_INFO 0x0002 #define GLUT_CURSOR_DESTROY 0x0003 #define GLUT_CURSOR_HELP 0x0004 #define GLUT_CURSOR_CYCLE 0x0005 #define GLUT_CURSOR_SPRAY 0x0006 #define GLUT_CURSOR_WAIT 0x0007 #define GLUT_CURSOR_TEXT 0x0008 #define GLUT_CURSOR_CROSSHAIR 0x0009 #define GLUT_CURSOR_UP_DOWN 0x000A #define GLUT_CURSOR_LEFT_RIGHT 0x000B #define GLUT_CURSOR_TOP_SIDE 0x000C #define GLUT_CURSOR_BOTTOM_SIDE 0x000D #define GLUT_CURSOR_LEFT_SIDE 0x000E #define GLUT_CURSOR_RIGHT_SIDE 0x000F #define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010 #define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011 #define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012 #define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013 #define GLUT_CURSOR_INHERIT 0x0064 #define GLUT_CURSOR_NONE 0x0065 #define GLUT_CURSOR_FULL_CROSSHAIR 0x0066 #ifdef __cplusplus } #endif #endif /* __GLUT_H__ */