| 1 | #ifndef __glut_h__
|
|---|
| 2 | #define __glut_h__
|
|---|
| 3 |
|
|---|
| 4 | /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
|
|---|
| 5 |
|
|---|
| 6 | /* This program is freely distributable without licensing fees and is
|
|---|
| 7 | provided without guarantee or warrantee expressed or implied. This
|
|---|
| 8 | program is -not- in the public domain. */
|
|---|
| 9 |
|
|---|
| 10 | #include <GL/gl.h>
|
|---|
| 11 | #include <GL/glu.h>
|
|---|
| 12 |
|
|---|
| 13 | #ifdef __cplusplus
|
|---|
| 14 | extern "C" {
|
|---|
| 15 | #endif
|
|---|
| 16 |
|
|---|
| 17 | #if defined(_WIN32)
|
|---|
| 18 |
|
|---|
| 19 | /* GLUT 3.7 now tries to avoid including <windows.h>
|
|---|
| 20 | to avoid name space pollution, but Win32's <GL/gl.h>
|
|---|
| 21 | needs APIENTRY and WINGDIAPI defined properly.
|
|---|
| 22 |
|
|---|
| 23 | tjump@spgs.com contributes:
|
|---|
| 24 | If users are building glut code on MS Windows, then they should
|
|---|
| 25 | make sure they include windows.h early, let's not get into a
|
|---|
| 26 | header definitions war since MS has proven it's capability to
|
|---|
| 27 | change header dependencies w/o publishing they have done so.
|
|---|
| 28 |
|
|---|
| 29 | So, let's not include windows.h here, as it's not really required and
|
|---|
| 30 | MS own gl/gl.h *should* include it if the dependency is there. */
|
|---|
| 31 |
|
|---|
| 32 | /* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
|
|---|
| 33 | in your compile preprocessor options. */
|
|---|
| 34 | # if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
|
|---|
| 35 | # pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
|
|---|
| 36 | /* To enable automatic SGI OpenGL for Windows library usage for GLUT,
|
|---|
| 37 | define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */
|
|---|
| 38 | # ifdef GLUT_USE_SGI_OPENGL
|
|---|
| 39 | # pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */
|
|---|
| 40 | # pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */
|
|---|
| 41 | # pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */
|
|---|
| 42 | # else
|
|---|
| 43 | # pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
|
|---|
| 44 | # pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */
|
|---|
| 45 | # pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
|
|---|
| 46 | # endif
|
|---|
| 47 | # endif
|
|---|
| 48 |
|
|---|
| 49 | /* To disable supression of annoying warnings about floats being promoted
|
|---|
| 50 | to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
|
|---|
| 51 | options. */
|
|---|
| 52 | # ifndef GLUT_NO_WARNING_DISABLE
|
|---|
| 53 | # pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */
|
|---|
| 54 | # pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
|
|---|
| 55 | # endif
|
|---|
| 56 |
|
|---|
| 57 | /* Win32 has an annoying issue where there are multiple C run-time
|
|---|
| 58 | libraries (CRTs). If the executable is linked with a different CRT
|
|---|
| 59 | from the GLUT DLL, the GLUT DLL will not share the same CRT static
|
|---|
| 60 | data seen by the executable. In particular, atexit callbacks registered
|
|---|
| 61 | in the executable will not be called if GLUT calls its (different)
|
|---|
| 62 | exit routine). GLUT is typically built with the
|
|---|
| 63 | "/MD" option (the CRT with multithreading DLL support), but the Visual
|
|---|
| 64 | C++ linker default is "/ML" (the single threaded CRT).
|
|---|
| 65 |
|
|---|
| 66 | One workaround to this issue is requiring users to always link with
|
|---|
| 67 | the same CRT as GLUT is compiled with. That requires users supply a
|
|---|
| 68 | non-standard option. GLUT 3.7 has its own built-in workaround where
|
|---|
| 69 | the executable's "exit" function pointer is covertly passed to GLUT.
|
|---|
| 70 | GLUT then calls the executable's exit function pointer to ensure that
|
|---|
| 71 | any "atexit" calls registered by the application are called if GLUT
|
|---|
| 72 | needs to exit.
|
|---|
| 73 |
|
|---|
| 74 | Note that the __glut*WithExit routines should NEVER be called directly.
|
|---|
| 75 | To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
|---|
| 76 |
|
|---|
| 77 | /* XXX This is from Win32's <process.h> */
|
|---|
| 78 | # if !defined(_MSC_VER) && !defined(__cdecl)
|
|---|
| 79 | /* Define __cdecl for non-Microsoft compilers. */
|
|---|
| 80 | # define __cdecl
|
|---|
| 81 | # define GLUT_DEFINED___CDECL
|
|---|
| 82 | # endif
|
|---|
| 83 | # ifndef _CRTIMP
|
|---|
| 84 | # ifdef _NTSDK
|
|---|
| 85 | /* Definition compatible with NT SDK */
|
|---|
| 86 | # define _CRTIMP
|
|---|
| 87 | # else
|
|---|
| 88 | /* Current definition */
|
|---|
| 89 | # ifdef _DLL
|
|---|
| 90 | # define _CRTIMP __declspec(dllimport)
|
|---|
| 91 | # else
|
|---|
| 92 | # define _CRTIMP
|
|---|
| 93 | # endif
|
|---|
| 94 | # endif
|
|---|
| 95 | # define GLUT_DEFINED__CRTIMP
|
|---|
| 96 | # endif
|
|---|
| 97 | # ifndef GLUT_BUILDING_LIB
|
|---|
| 98 | extern _CRTIMP void __cdecl exit(int);
|
|---|
| 99 | # endif
|
|---|
| 100 |
|
|---|
| 101 | /* GLUT callback calling convention for Win32. */
|
|---|
| 102 | # define GLUTCALLBACK __cdecl
|
|---|
| 103 |
|
|---|
| 104 | /* for callback/function pointer defs */
|
|---|
| 105 | # define GLUTAPIENTRYV __cdecl
|
|---|
| 106 |
|
|---|
| 107 | /* glut-win32 specific macros, defined to prevent collision with
|
|---|
| 108 | and redifinition of Windows system defs, also removes requirement of
|
|---|
| 109 | pretty much any standard windows header from this file */
|
|---|
| 110 |
|
|---|
| 111 | #if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
|---|
| 112 | # define GLUTAPIENTRY __stdcall
|
|---|
| 113 | #else
|
|---|
| 114 | # define GLUTAPIENTRY
|
|---|
| 115 | #endif
|
|---|
| 116 |
|
|---|
| 117 | /* GLUT API entry point declarations for Win32. */
|
|---|
| 118 | #if defined(GLUT_BUILDING_LIB) && defined(_DLL)
|
|---|
| 119 | # define GLUTAPI __declspec(dllexport)
|
|---|
| 120 | #elif defined(_DLL)
|
|---|
| 121 | # define GLUTAPI __declspec(dllimport)
|
|---|
| 122 | #else
|
|---|
| 123 | # define GLUTAPI extern
|
|---|
| 124 | #endif
|
|---|
| 125 |
|
|---|
| 126 | #if defined(_WIN32) && !defined(_WINDEF_) && !defined(MESA)
|
|---|
| 127 | # if !defined(MESA_MINWARN)
|
|---|
| 128 | # pragma message( "note: WINDOWS.H not included, providing Mesa definition of CALLBACK macro" )
|
|---|
| 129 | # pragma message( "----: and PROC typedef. If you receive compiler warnings about either ")
|
|---|
| 130 | # pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" )
|
|---|
| 131 | # endif
|
|---|
| 132 | # define CALLBACK __stdcall
|
|---|
| 133 | typedef int (GLUTAPIENTRY *PROC)();
|
|---|
| 134 | typedef void *HGLRC;
|
|---|
| 135 | typedef void *HDC;
|
|---|
| 136 | typedef unsigned long COLORREF;
|
|---|
| 137 | #endif
|
|---|
| 138 |
|
|---|
| 139 | #if defined(_WIN32) && !defined(_WINGDI_) && !defined(MESA)
|
|---|
| 140 | # if !defined(MESA_MINWARN)
|
|---|
| 141 | # pragma message( "note: WINDOWS.H not included, providing Mesa definition of wgl functions" )
|
|---|
| 142 | # pragma message( "----: and macros. If you receive compiler warnings about any being multiply ")
|
|---|
| 143 | # pragma message( "----: defined you should include WINDOWS.H priot to gl/glut.h" )
|
|---|
| 144 | # endif
|
|---|
| 145 | # define WGL_FONT_LINES 0
|
|---|
| 146 | # define WGL_FONT_POLYGONS 1
|
|---|
| 147 | # ifdef UNICODE
|
|---|
| 148 | # define wglUseFontBitmaps wglUseFontBitmapsW
|
|---|
| 149 | # define wglUseFontOutlines wglUseFontOutlinesW
|
|---|
| 150 | # else
|
|---|
| 151 | # define wglUseFontBitmaps wglUseFontBitmapsA
|
|---|
| 152 | # define wglUseFontOutlines wglUseFontOutlinesA
|
|---|
| 153 | # endif /* !UNICODE */
|
|---|
| 154 | typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
|
|---|
| 155 | typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
|
|---|
| 156 | # pragma warning( push )
|
|---|
| 157 | # pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
|
|---|
| 158 | # define WGLAPI __declspec(dllimport)
|
|---|
| 159 | WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
|
|---|
| 160 | WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
|
|---|
| 161 | WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
|
|---|
| 162 | WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
|
|---|
| 163 | WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
|
|---|
| 164 | WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
|
|---|
| 165 | WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
|
|---|
| 166 | WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
|
|---|
| 167 | WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
|
|---|
| 168 | WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
|
|---|
| 169 | WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
|
|---|
| 170 | WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
|
|---|
| 171 | WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
|
|---|
| 172 | WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
|
|---|
| 173 | WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
|
|---|
| 174 | WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
|
|---|
| 175 | WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
|
|---|
| 176 | WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
|
|---|
| 177 | WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
|
|---|
| 178 | WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
|
|---|
| 179 | WGLAPI int GLAPIENTRY wglSwapLayerBuffers(HDC, unsigned int);
|
|---|
| 180 | WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, unsigned long);
|
|---|
| 181 | WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
|
|---|
| 182 | WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
|
|---|
| 183 | WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
|
|---|
| 184 | WGLAPI int GLAPIENTRY SwapBuffers(HDC);
|
|---|
| 185 | WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
|
|---|
| 186 | WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
|
|---|
| 187 | WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
|
|---|
| 188 | WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
|
|---|
| 189 | # undef WGLAPI
|
|---|
| 190 | # pragma warning( pop )
|
|---|
| 191 | #endif
|
|---|
| 192 |
|
|---|
| 193 | #else /* _WIN32 not defined */
|
|---|
| 194 | #if defined(__WIN32OS2__)
|
|---|
| 195 | /* GLUT callback calling convention for Odin. */
|
|---|
| 196 | #define GLUTCALLBACK __cdecl
|
|---|
| 197 |
|
|---|
| 198 | /* for callback/function pointer defs */
|
|---|
| 199 | #define GLUTAPIENTRYV __cdecl
|
|---|
| 200 |
|
|---|
| 201 | #define GLUTAPIENTRY __stdcall
|
|---|
| 202 |
|
|---|
| 203 | #define GLUTAPI extern
|
|---|
| 204 |
|
|---|
| 205 | #else
|
|---|
| 206 | /* Define GLUTAPIENTRY and GLUTCALLBACK to nothing if we aren't on Win32. */
|
|---|
| 207 | # define GLUTAPIENTRY
|
|---|
| 208 | # define GLUTAPIENTRYV
|
|---|
| 209 | # define GLUT_APIENTRY_DEFINED
|
|---|
| 210 | # define GLUTCALLBACK
|
|---|
| 211 | # define GLUTAPI extern
|
|---|
| 212 | /* Prototype exit for the non-Win32 case (see above). */
|
|---|
| 213 | extern void exit(int);
|
|---|
| 214 | #endif
|
|---|
| 215 |
|
|---|
| 216 | #endif
|
|---|
| 217 |
|
|---|
| 218 |
|
|---|
| 219 | /**
|
|---|
| 220 | GLUT API revision history:
|
|---|
| 221 |
|
|---|
| 222 | GLUT_API_VERSION is updated to reflect incompatible GLUT
|
|---|
| 223 | API changes (interface changes, semantic changes, deletions,
|
|---|
| 224 | or additions).
|
|---|
| 225 |
|
|---|
| 226 | GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
|
|---|
| 227 |
|
|---|
| 228 | GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
|
|---|
| 229 | extension. Supports new input devices like tablet, dial and button
|
|---|
| 230 | box, and Spaceball. Easy to query OpenGL extensions.
|
|---|
| 231 |
|
|---|
| 232 | GLUT_API_VERSION=3 glutMenuStatus added.
|
|---|
| 233 |
|
|---|
| 234 | GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
|
|---|
| 235 | glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
|
|---|
| 236 | video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
|
|---|
| 237 | glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
|
|---|
| 238 | glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!).
|
|---|
| 239 | **/
|
|---|
| 240 | #ifndef GLUT_API_VERSION /* allow this to be overriden */
|
|---|
| 241 | #define GLUT_API_VERSION 3
|
|---|
| 242 | #endif
|
|---|
| 243 |
|
|---|
| 244 | /**
|
|---|
| 245 | GLUT implementation revision history:
|
|---|
| 246 |
|
|---|
| 247 | GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
|
|---|
| 248 | API revisions and implementation revisions (ie, bug fixes).
|
|---|
| 249 |
|
|---|
| 250 | GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
|
|---|
| 251 | GLUT Xlib-based implementation. 11/29/94
|
|---|
| 252 |
|
|---|
| 253 | GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
|
|---|
| 254 | GLUT Xlib-based implementation providing GLUT version 2
|
|---|
| 255 | interfaces.
|
|---|
| 256 |
|
|---|
| 257 | GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
|
|---|
| 258 |
|
|---|
| 259 | GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
|
|---|
| 260 |
|
|---|
| 261 | GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
|
|---|
| 262 |
|
|---|
| 263 | GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
|
|---|
| 264 |
|
|---|
| 265 | GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
|
|---|
| 266 | and video resize. 1/3/97
|
|---|
| 267 |
|
|---|
| 268 | GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
|
|---|
| 269 |
|
|---|
| 270 | GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
|
|---|
| 271 |
|
|---|
| 272 | GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
|
|---|
| 273 |
|
|---|
| 274 | GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support.
|
|---|
| 275 |
|
|---|
| 276 | GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface.
|
|---|
| 277 |
|
|---|
| 278 | GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
|
|---|
| 279 | **/
|
|---|
| 280 | #ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
|
|---|
| 281 | #define GLUT_XLIB_IMPLEMENTATION 15
|
|---|
| 282 | #endif
|
|---|
| 283 |
|
|---|
| 284 | /* Display mode bit masks. */
|
|---|
| 285 | #define GLUT_RGB 0
|
|---|
| 286 | #define GLUT_RGBA GLUT_RGB
|
|---|
| 287 | #define GLUT_INDEX 1
|
|---|
| 288 | #define GLUT_SINGLE 0
|
|---|
| 289 | #define GLUT_DOUBLE 2
|
|---|
| 290 | #define GLUT_ACCUM 4
|
|---|
| 291 | #define GLUT_ALPHA 8
|
|---|
| 292 | #define GLUT_DEPTH 16
|
|---|
| 293 | #define GLUT_STENCIL 32
|
|---|
| 294 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 295 | #define GLUT_MULTISAMPLE 128
|
|---|
| 296 | #define GLUT_STEREO 256
|
|---|
| 297 | #endif
|
|---|
| 298 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 299 | #define GLUT_LUMINANCE 512
|
|---|
| 300 | #endif
|
|---|
| 301 |
|
|---|
| 302 | /* Mouse buttons. */
|
|---|
| 303 | #define GLUT_LEFT_BUTTON 0
|
|---|
| 304 | #define GLUT_MIDDLE_BUTTON 1
|
|---|
| 305 | #define GLUT_RIGHT_BUTTON 2
|
|---|
| 306 |
|
|---|
| 307 | /* Mouse button state. */
|
|---|
| 308 | #define GLUT_DOWN 0
|
|---|
| 309 | #define GLUT_UP 1
|
|---|
| 310 |
|
|---|
| 311 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 312 | /* function keys */
|
|---|
| 313 | #define GLUT_KEY_F1 1
|
|---|
| 314 | #define GLUT_KEY_F2 2
|
|---|
| 315 | #define GLUT_KEY_F3 3
|
|---|
| 316 | #define GLUT_KEY_F4 4
|
|---|
| 317 | #define GLUT_KEY_F5 5
|
|---|
| 318 | #define GLUT_KEY_F6 6
|
|---|
| 319 | #define GLUT_KEY_F7 7
|
|---|
| 320 | #define GLUT_KEY_F8 8
|
|---|
| 321 | #define GLUT_KEY_F9 9
|
|---|
| 322 | #define GLUT_KEY_F10 10
|
|---|
| 323 | #define GLUT_KEY_F11 11
|
|---|
| 324 | #define GLUT_KEY_F12 12
|
|---|
| 325 | /* directional keys */
|
|---|
| 326 | #define GLUT_KEY_LEFT 100
|
|---|
| 327 | #define GLUT_KEY_UP 101
|
|---|
| 328 | #define GLUT_KEY_RIGHT 102
|
|---|
| 329 | #define GLUT_KEY_DOWN 103
|
|---|
| 330 | #define GLUT_KEY_PAGE_UP 104
|
|---|
| 331 | #define GLUT_KEY_PAGE_DOWN 105
|
|---|
| 332 | #define GLUT_KEY_HOME 106
|
|---|
| 333 | #define GLUT_KEY_END 107
|
|---|
| 334 | #define GLUT_KEY_INSERT 108
|
|---|
| 335 | #endif
|
|---|
| 336 |
|
|---|
| 337 | /* Entry/exit state. */
|
|---|
| 338 | #define GLUT_LEFT 0
|
|---|
| 339 | #define GLUT_ENTERED 1
|
|---|
| 340 |
|
|---|
| 341 | /* Menu usage state. */
|
|---|
| 342 | #define GLUT_MENU_NOT_IN_USE 0
|
|---|
| 343 | #define GLUT_MENU_IN_USE 1
|
|---|
| 344 |
|
|---|
| 345 | /* Visibility state. */
|
|---|
| 346 | #define GLUT_NOT_VISIBLE 0
|
|---|
| 347 | #define GLUT_VISIBLE 1
|
|---|
| 348 |
|
|---|
| 349 | /* Window status state. */
|
|---|
| 350 | #define GLUT_HIDDEN 0
|
|---|
| 351 | #define GLUT_FULLY_RETAINED 1
|
|---|
| 352 | #define GLUT_PARTIALLY_RETAINED 2
|
|---|
| 353 | #define GLUT_FULLY_COVERED 3
|
|---|
| 354 |
|
|---|
| 355 | /* Color index component selection values. */
|
|---|
| 356 | #define GLUT_RED 0
|
|---|
| 357 | #define GLUT_GREEN 1
|
|---|
| 358 | #define GLUT_BLUE 2
|
|---|
| 359 |
|
|---|
| 360 | /* Layers for use. */
|
|---|
| 361 | #define GLUT_NORMAL 0
|
|---|
| 362 | #define GLUT_OVERLAY 1
|
|---|
| 363 |
|
|---|
| 364 | #if defined(_WIN32) || defined(__WIN32OS2__)
|
|---|
| 365 | /* Stroke font constants (use these in GLUT program). */
|
|---|
| 366 | #define GLUT_STROKE_ROMAN ((void*)0)
|
|---|
| 367 | #define I_GLUT_STROKE_ROMAN 0
|
|---|
| 368 | #define GLUT_STROKE_MONO_ROMAN ((void*)1)
|
|---|
| 369 | #define I_GLUT_STROKE_MONO_ROMAN 1
|
|---|
| 370 |
|
|---|
| 371 | /* Bitmap font constants (use these in GLUT program). */
|
|---|
| 372 | #define GLUT_BITMAP_9_BY_15 ((void*)2)
|
|---|
| 373 | #define I_GLUT_BITMAP_9_BY_15 2
|
|---|
| 374 | #define GLUT_BITMAP_8_BY_13 ((void*)3)
|
|---|
| 375 | #define I_GLUT_BITMAP_8_BY_13 3
|
|---|
| 376 | #define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
|
|---|
| 377 | #define I_GLUT_BITMAP_TIMES_ROMAN_10 4
|
|---|
| 378 | #define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
|
|---|
| 379 | #define I_GLUT_BITMAP_TIMES_ROMAN_24 5
|
|---|
| 380 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 381 | #define GLUT_BITMAP_HELVETICA_10 ((void*)6)
|
|---|
| 382 | #define I_GLUT_BITMAP_HELVETICA_10 6
|
|---|
| 383 | #define GLUT_BITMAP_HELVETICA_12 ((void*)7)
|
|---|
| 384 | #define I_GLUT_BITMAP_HELVETICA_12 7
|
|---|
| 385 | #define GLUT_BITMAP_HELVETICA_18 ((void*)8)
|
|---|
| 386 | #define I_GLUT_BITMAP_HELVETICA_18 8
|
|---|
| 387 | #endif
|
|---|
| 388 | #else
|
|---|
| 389 | /* Stroke font opaque addresses (use constants instead in source code). */
|
|---|
| 390 | GLUTAPI void *glutStrokeRoman;
|
|---|
| 391 | GLUTAPI void *glutStrokeMonoRoman;
|
|---|
| 392 |
|
|---|
| 393 | /* Stroke font constants (use these in GLUT program). */
|
|---|
| 394 | #define GLUT_STROKE_ROMAN (&glutStrokeRoman)
|
|---|
| 395 | #define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
|
|---|
| 396 |
|
|---|
| 397 | /* Bitmap font opaque addresses (use constants instead in source code). */
|
|---|
| 398 | GLUTAPI void *glutBitmap9By15;
|
|---|
| 399 | GLUTAPI void *glutBitmap8By13;
|
|---|
| 400 | GLUTAPI void *glutBitmapTimesRoman10;
|
|---|
| 401 | GLUTAPI void *glutBitmapTimesRoman24;
|
|---|
| 402 | GLUTAPI void *glutBitmapHelvetica10;
|
|---|
| 403 | GLUTAPI void *glutBitmapHelvetica12;
|
|---|
| 404 | GLUTAPI void *glutBitmapHelvetica18;
|
|---|
| 405 |
|
|---|
| 406 | /* Bitmap font constants (use these in GLUT program). */
|
|---|
| 407 | #define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
|
|---|
| 408 | #define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
|
|---|
| 409 | #define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
|
|---|
| 410 | #define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
|
|---|
| 411 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 412 | #define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
|
|---|
| 413 | #define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
|
|---|
| 414 | #define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
|
|---|
| 415 | #endif
|
|---|
| 416 | #endif
|
|---|
| 417 |
|
|---|
| 418 | /* glutGet parameters. */
|
|---|
| 419 | #define GLUT_WINDOW_X 100
|
|---|
| 420 | #define GLUT_WINDOW_Y 101
|
|---|
| 421 | #define GLUT_WINDOW_WIDTH 102
|
|---|
| 422 | #define GLUT_WINDOW_HEIGHT 103
|
|---|
| 423 | #define GLUT_WINDOW_BUFFER_SIZE 104
|
|---|
| 424 | #define GLUT_WINDOW_STENCIL_SIZE 105
|
|---|
| 425 | #define GLUT_WINDOW_DEPTH_SIZE 106
|
|---|
| 426 | #define GLUT_WINDOW_RED_SIZE 107
|
|---|
| 427 | #define GLUT_WINDOW_GREEN_SIZE 108
|
|---|
| 428 | #define GLUT_WINDOW_BLUE_SIZE 109
|
|---|
| 429 | #define GLUT_WINDOW_ALPHA_SIZE 110
|
|---|
| 430 | #define GLUT_WINDOW_ACCUM_RED_SIZE 111
|
|---|
| 431 | #define GLUT_WINDOW_ACCUM_GREEN_SIZE 112
|
|---|
| 432 | #define GLUT_WINDOW_ACCUM_BLUE_SIZE 113
|
|---|
| 433 | #define GLUT_WINDOW_ACCUM_ALPHA_SIZE 114
|
|---|
| 434 | #define GLUT_WINDOW_DOUBLEBUFFER 115
|
|---|
| 435 | #define GLUT_WINDOW_RGBA 116
|
|---|
| 436 | #define GLUT_WINDOW_PARENT 117
|
|---|
| 437 | #define GLUT_WINDOW_NUM_CHILDREN 118
|
|---|
| 438 | #define GLUT_WINDOW_COLORMAP_SIZE 119
|
|---|
| 439 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 440 | #define GLUT_WINDOW_NUM_SAMPLES 120
|
|---|
| 441 | #define GLUT_WINDOW_STEREO 121
|
|---|
| 442 | #endif
|
|---|
| 443 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 444 | #define GLUT_WINDOW_CURSOR 122
|
|---|
| 445 | #endif
|
|---|
| 446 | #define GLUT_SCREEN_WIDTH 200
|
|---|
| 447 | #define GLUT_SCREEN_HEIGHT 201
|
|---|
| 448 | #define GLUT_SCREEN_WIDTH_MM 202
|
|---|
| 449 | #define GLUT_SCREEN_HEIGHT_MM 203
|
|---|
| 450 | #define GLUT_MENU_NUM_ITEMS 300
|
|---|
| 451 | #define GLUT_DISPLAY_MODE_POSSIBLE 400
|
|---|
| 452 | #define GLUT_INIT_WINDOW_X 500
|
|---|
| 453 | #define GLUT_INIT_WINDOW_Y 501
|
|---|
| 454 | #define GLUT_INIT_WINDOW_WIDTH 502
|
|---|
| 455 | #define GLUT_INIT_WINDOW_HEIGHT 503
|
|---|
| 456 | #define GLUT_INIT_DISPLAY_MODE 504
|
|---|
| 457 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 458 | #define GLUT_ELAPSED_TIME 700
|
|---|
| 459 | #endif
|
|---|
| 460 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
|---|
| 461 | #define GLUT_WINDOW_FORMAT_ID 123
|
|---|
| 462 | #endif
|
|---|
| 463 |
|
|---|
| 464 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 465 | /* glutDeviceGet parameters. */
|
|---|
| 466 | #define GLUT_HAS_KEYBOARD 600
|
|---|
| 467 | #define GLUT_HAS_MOUSE 601
|
|---|
| 468 | #define GLUT_HAS_SPACEBALL 602
|
|---|
| 469 | #define GLUT_HAS_DIAL_AND_BUTTON_BOX 603
|
|---|
| 470 | #define GLUT_HAS_TABLET 604
|
|---|
| 471 | #define GLUT_NUM_MOUSE_BUTTONS 605
|
|---|
| 472 | #define GLUT_NUM_SPACEBALL_BUTTONS 606
|
|---|
| 473 | #define GLUT_NUM_BUTTON_BOX_BUTTONS 607
|
|---|
| 474 | #define GLUT_NUM_DIALS 608
|
|---|
| 475 | #define GLUT_NUM_TABLET_BUTTONS 609
|
|---|
| 476 | #endif
|
|---|
| 477 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
|---|
| 478 | #define GLUT_DEVICE_IGNORE_KEY_REPEAT 610
|
|---|
| 479 | #define GLUT_DEVICE_KEY_REPEAT 611
|
|---|
| 480 | #define GLUT_HAS_JOYSTICK 612
|
|---|
| 481 | #define GLUT_OWNS_JOYSTICK 613
|
|---|
| 482 | #define GLUT_JOYSTICK_BUTTONS 614
|
|---|
| 483 | #define GLUT_JOYSTICK_AXES 615
|
|---|
| 484 | #define GLUT_JOYSTICK_POLL_RATE 616
|
|---|
| 485 | #endif
|
|---|
| 486 |
|
|---|
| 487 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 488 | /* glutLayerGet parameters. */
|
|---|
| 489 | #define GLUT_OVERLAY_POSSIBLE 800
|
|---|
| 490 | #define GLUT_LAYER_IN_USE 801
|
|---|
| 491 | #define GLUT_HAS_OVERLAY 802
|
|---|
| 492 | #define GLUT_TRANSPARENT_INDEX 803
|
|---|
| 493 | #define GLUT_NORMAL_DAMAGED 804
|
|---|
| 494 | #define GLUT_OVERLAY_DAMAGED 805
|
|---|
| 495 |
|
|---|
| 496 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 497 | /* glutVideoResizeGet parameters. */
|
|---|
| 498 | #define GLUT_VIDEO_RESIZE_POSSIBLE 900
|
|---|
| 499 | #define GLUT_VIDEO_RESIZE_IN_USE 901
|
|---|
| 500 | #define GLUT_VIDEO_RESIZE_X_DELTA 902
|
|---|
| 501 | #define GLUT_VIDEO_RESIZE_Y_DELTA 903
|
|---|
| 502 | #define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904
|
|---|
| 503 | #define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905
|
|---|
| 504 | #define GLUT_VIDEO_RESIZE_X 906
|
|---|
| 505 | #define GLUT_VIDEO_RESIZE_Y 907
|
|---|
| 506 | #define GLUT_VIDEO_RESIZE_WIDTH 908
|
|---|
| 507 | #define GLUT_VIDEO_RESIZE_HEIGHT 909
|
|---|
| 508 | #endif
|
|---|
| 509 |
|
|---|
| 510 | /* glutUseLayer parameters. */
|
|---|
| 511 | #define GLUT_NORMAL 0
|
|---|
| 512 | #define GLUT_OVERLAY 1
|
|---|
| 513 |
|
|---|
| 514 | /* glutGetModifiers return mask. */
|
|---|
| 515 | #define GLUT_ACTIVE_SHIFT 1
|
|---|
| 516 | #define GLUT_ACTIVE_CTRL 2
|
|---|
| 517 | #define GLUT_ACTIVE_ALT 4
|
|---|
| 518 |
|
|---|
| 519 | /* glutSetCursor parameters. */
|
|---|
| 520 | /* Basic arrows. */
|
|---|
| 521 | #define GLUT_CURSOR_RIGHT_ARROW 0
|
|---|
| 522 | #define GLUT_CURSOR_LEFT_ARROW 1
|
|---|
| 523 | /* Symbolic cursor shapes. */
|
|---|
| 524 | #define GLUT_CURSOR_INFO 2
|
|---|
| 525 | #define GLUT_CURSOR_DESTROY 3
|
|---|
| 526 | #define GLUT_CURSOR_HELP 4
|
|---|
| 527 | #define GLUT_CURSOR_CYCLE 5
|
|---|
| 528 | #define GLUT_CURSOR_SPRAY 6
|
|---|
| 529 | #define GLUT_CURSOR_WAIT 7
|
|---|
| 530 | #define GLUT_CURSOR_TEXT 8
|
|---|
| 531 | #define GLUT_CURSOR_CROSSHAIR 9
|
|---|
| 532 | /* Directional cursors. */
|
|---|
| 533 | #define GLUT_CURSOR_UP_DOWN 10
|
|---|
| 534 | #define GLUT_CURSOR_LEFT_RIGHT 11
|
|---|
| 535 | /* Sizing cursors. */
|
|---|
| 536 | #define GLUT_CURSOR_TOP_SIDE 12
|
|---|
| 537 | #define GLUT_CURSOR_BOTTOM_SIDE 13
|
|---|
| 538 | #define GLUT_CURSOR_LEFT_SIDE 14
|
|---|
| 539 | #define GLUT_CURSOR_RIGHT_SIDE 15
|
|---|
| 540 | #define GLUT_CURSOR_TOP_LEFT_CORNER 16
|
|---|
| 541 | #define GLUT_CURSOR_TOP_RIGHT_CORNER 17
|
|---|
| 542 | #define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
|
|---|
| 543 | #define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
|
|---|
| 544 | /* Inherit from parent window. */
|
|---|
| 545 | #define GLUT_CURSOR_INHERIT 100
|
|---|
| 546 | /* Blank cursor. */
|
|---|
| 547 | #define GLUT_CURSOR_NONE 101
|
|---|
| 548 | /* Fullscreen crosshair (if available). */
|
|---|
| 549 | #define GLUT_CURSOR_FULL_CROSSHAIR 102
|
|---|
| 550 | #endif
|
|---|
| 551 |
|
|---|
| 552 | /* GLUT initialization sub-API. */
|
|---|
| 553 | GLUTAPI void GLUTAPIENTRY glutInit(int *argcp, char **argv);
|
|---|
| 554 | #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
|---|
| 555 | GLUTAPI void GLUTAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
|
|---|
| 556 | #ifndef GLUT_BUILDING_LIB
|
|---|
| 557 | static void GLUTAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
|
|---|
| 558 | #define glutInit glutInit_ATEXIT_HACK
|
|---|
| 559 | #endif
|
|---|
| 560 | #endif
|
|---|
| 561 | GLUTAPI void GLUTAPIENTRY glutInitDisplayMode(unsigned int mode);
|
|---|
| 562 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 563 | GLUTAPI void GLUTAPIENTRY glutInitDisplayString(const char *string);
|
|---|
| 564 | #endif
|
|---|
| 565 | GLUTAPI void GLUTAPIENTRY glutInitWindowPosition(int x, int y);
|
|---|
| 566 | GLUTAPI void GLUTAPIENTRY glutInitWindowSize(int width, int height);
|
|---|
| 567 | GLUTAPI void GLUTAPIENTRY glutMainLoop(void);
|
|---|
| 568 |
|
|---|
| 569 | /* GLUT window sub-API. */
|
|---|
| 570 | GLUTAPI int GLUTAPIENTRY glutCreateWindow(const char *title);
|
|---|
| 571 | #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
|---|
| 572 | GLUTAPI int GLUTAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
|
|---|
| 573 | #ifndef GLUT_BUILDING_LIB
|
|---|
| 574 | static int GLUTAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
|
|---|
| 575 | #define glutCreateWindow glutCreateWindow_ATEXIT_HACK
|
|---|
| 576 | #endif
|
|---|
| 577 | #endif
|
|---|
| 578 | GLUTAPI int GLUTAPIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
|
|---|
| 579 | GLUTAPI void GLUTAPIENTRY glutDestroyWindow(int win);
|
|---|
| 580 | GLUTAPI void GLUTAPIENTRY glutPostRedisplay(void);
|
|---|
| 581 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
|---|
| 582 | GLUTAPI void GLUTAPIENTRY glutPostWindowRedisplay(int win);
|
|---|
| 583 | #endif
|
|---|
| 584 | GLUTAPI void GLUTAPIENTRY glutSwapBuffers(void);
|
|---|
| 585 | GLUTAPI int GLUTAPIENTRY glutGetWindow(void);
|
|---|
| 586 | GLUTAPI void GLUTAPIENTRY glutSetWindow(int win);
|
|---|
| 587 | GLUTAPI void GLUTAPIENTRY glutSetWindowTitle(const char *title);
|
|---|
| 588 | GLUTAPI void GLUTAPIENTRY glutSetIconTitle(const char *title);
|
|---|
| 589 | GLUTAPI void GLUTAPIENTRY glutPositionWindow(int x, int y);
|
|---|
| 590 | GLUTAPI void GLUTAPIENTRY glutReshapeWindow(int width, int height);
|
|---|
| 591 | GLUTAPI void GLUTAPIENTRY glutPopWindow(void);
|
|---|
| 592 | GLUTAPI void GLUTAPIENTRY glutPushWindow(void);
|
|---|
| 593 | GLUTAPI void GLUTAPIENTRY glutIconifyWindow(void);
|
|---|
| 594 | GLUTAPI void GLUTAPIENTRY glutShowWindow(void);
|
|---|
| 595 | GLUTAPI void GLUTAPIENTRY glutHideWindow(void);
|
|---|
| 596 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 597 | GLUTAPI void GLUTAPIENTRY glutFullScreen(void);
|
|---|
| 598 | GLUTAPI void GLUTAPIENTRY glutSetCursor(int cursor);
|
|---|
| 599 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 600 | GLUTAPI void GLUTAPIENTRY glutWarpPointer(int x, int y);
|
|---|
| 601 | #endif
|
|---|
| 602 |
|
|---|
| 603 | /* GLUT overlay sub-API. */
|
|---|
| 604 | GLUTAPI void GLUTAPIENTRY glutEstablishOverlay(void);
|
|---|
| 605 | GLUTAPI void GLUTAPIENTRY glutRemoveOverlay(void);
|
|---|
| 606 | GLUTAPI void GLUTAPIENTRY glutUseLayer(GLenum layer);
|
|---|
| 607 | GLUTAPI void GLUTAPIENTRY glutPostOverlayRedisplay(void);
|
|---|
| 608 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
|
|---|
| 609 | GLUTAPI void GLUTAPIENTRY glutPostWindowOverlayRedisplay(int win);
|
|---|
| 610 | #endif
|
|---|
| 611 | GLUTAPI void GLUTAPIENTRY glutShowOverlay(void);
|
|---|
| 612 | GLUTAPI void GLUTAPIENTRY glutHideOverlay(void);
|
|---|
| 613 | #endif
|
|---|
| 614 |
|
|---|
| 615 | /* GLUT menu sub-API. */
|
|---|
| 616 | GLUTAPI int GLUTAPIENTRY glutCreateMenu(void (* GLUTCALLBACK func)(int));
|
|---|
| 617 | #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
|
|---|
| 618 | GLUTAPI int GLUTAPIENTRY __glutCreateMenuWithExit(void (* GLUTCALLBACK func)(int), void (__cdecl *exitfunc)(int));
|
|---|
| 619 | #ifndef GLUT_BUILDING_LIB
|
|---|
| 620 | static int GLUTAPIENTRY glutCreateMenu_ATEXIT_HACK(void (* GLUTCALLBACK func)(int)) { return __glutCreateMenuWithExit(func, exit); }
|
|---|
| 621 | #define glutCreateMenu glutCreateMenu_ATEXIT_HACK
|
|---|
| 622 | #endif
|
|---|
| 623 | #endif
|
|---|
| 624 | GLUTAPI void GLUTAPIENTRY glutDestroyMenu(int menu);
|
|---|
| 625 | GLUTAPI int GLUTAPIENTRY glutGetMenu(void);
|
|---|
| 626 | GLUTAPI void GLUTAPIENTRY glutSetMenu(int menu);
|
|---|
| 627 | GLUTAPI void GLUTAPIENTRY glutAddMenuEntry(const char *label, int value);
|
|---|
| 628 | GLUTAPI void GLUTAPIENTRY glutAddSubMenu(const char *label, int submenu);
|
|---|
| 629 | GLUTAPI void GLUTAPIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
|
|---|
| 630 | GLUTAPI void GLUTAPIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
|
|---|
| 631 | GLUTAPI void GLUTAPIENTRY glutRemoveMenuItem(int item);
|
|---|
| 632 | GLUTAPI void GLUTAPIENTRY glutAttachMenu(int button);
|
|---|
| 633 | GLUTAPI void GLUTAPIENTRY glutDetachMenu(int button);
|
|---|
| 634 |
|
|---|
| 635 | /* GLUT window callback sub-API. */
|
|---|
| 636 | GLUTAPI void GLUTAPIENTRY glutDisplayFunc(void (* GLUTCALLBACK func)(void));
|
|---|
| 637 | GLUTAPI void GLUTAPIENTRY glutReshapeFunc(void (* GLUTCALLBACK func)(int width, int height));
|
|---|
| 638 | GLUTAPI void GLUTAPIENTRY glutKeyboardFunc(void (* GLUTCALLBACK func)(unsigned char key, int x, int y));
|
|---|
| 639 | GLUTAPI void GLUTAPIENTRY glutMouseFunc(void (* GLUTCALLBACK func)(int button, int state, int x, int y));
|
|---|
| 640 | GLUTAPI void GLUTAPIENTRY glutMotionFunc(void (* GLUTCALLBACK func)(int x, int y));
|
|---|
| 641 | GLUTAPI void GLUTAPIENTRY glutPassiveMotionFunc(void (* GLUTCALLBACK func)(int x, int y));
|
|---|
| 642 | GLUTAPI void GLUTAPIENTRY glutEntryFunc(void (* GLUTCALLBACK func)(int state));
|
|---|
| 643 | GLUTAPI void GLUTAPIENTRY glutVisibilityFunc(void (* GLUTCALLBACK func)(int state));
|
|---|
| 644 | GLUTAPI void GLUTAPIENTRY glutIdleFunc(void (* GLUTCALLBACK func)(void));
|
|---|
| 645 | GLUTAPI void GLUTAPIENTRY glutTimerFunc(unsigned int millis, void (* GLUTCALLBACK func)(int value), int value);
|
|---|
| 646 | GLUTAPI void GLUTAPIENTRY glutMenuStateFunc(void (* GLUTCALLBACK func)(int state));
|
|---|
| 647 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 648 | GLUTAPI void GLUTAPIENTRY glutSpecialFunc(void (* GLUTCALLBACK func)(int key, int x, int y));
|
|---|
| 649 | GLUTAPI void GLUTAPIENTRY glutSpaceballMotionFunc(void (* GLUTCALLBACK func)(int x, int y, int z));
|
|---|
| 650 | GLUTAPI void GLUTAPIENTRY glutSpaceballRotateFunc(void (* GLUTCALLBACK func)(int x, int y, int z));
|
|---|
| 651 | GLUTAPI void GLUTAPIENTRY glutSpaceballButtonFunc(void (* GLUTCALLBACK func)(int button, int state));
|
|---|
| 652 | GLUTAPI void GLUTAPIENTRY glutButtonBoxFunc(void (* GLUTCALLBACK func)(int button, int state));
|
|---|
| 653 | GLUTAPI void GLUTAPIENTRY glutDialsFunc(void (* GLUTCALLBACK func)(int dial, int value));
|
|---|
| 654 | GLUTAPI void GLUTAPIENTRY glutTabletMotionFunc(void (* GLUTCALLBACK func)(int x, int y));
|
|---|
| 655 | GLUTAPI void GLUTAPIENTRY glutTabletButtonFunc(void (* GLUTCALLBACK func)(int button, int state, int x, int y));
|
|---|
| 656 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 657 | GLUTAPI void GLUTAPIENTRY glutMenuStatusFunc(void (* GLUTCALLBACK func)(int status, int x, int y));
|
|---|
| 658 | GLUTAPI void GLUTAPIENTRY glutOverlayDisplayFunc(void (* GLUTCALLBACK func)(void));
|
|---|
| 659 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 660 | GLUTAPI void GLUTAPIENTRY glutWindowStatusFunc(void (* GLUTCALLBACK func)(int state));
|
|---|
| 661 | #endif
|
|---|
| 662 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
|---|
| 663 | GLUTAPI void GLUTAPIENTRY glutKeyboardUpFunc(void (* GLUTCALLBACK func)(unsigned char key, int x, int y));
|
|---|
| 664 | GLUTAPI void GLUTAPIENTRY glutSpecialUpFunc(void (* GLUTCALLBACK func)(int key, int x, int y));
|
|---|
| 665 | GLUTAPI void GLUTAPIENTRY glutJoystickFunc(void (* GLUTCALLBACK func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
|
|---|
| 666 | #endif
|
|---|
| 667 | #endif
|
|---|
| 668 | #endif
|
|---|
| 669 |
|
|---|
| 670 | /* GLUT color index sub-API. */
|
|---|
| 671 | GLUTAPI void GLUTAPIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
|
|---|
| 672 | GLUTAPI GLfloat GLUTAPIENTRY glutGetColor(int ndx, int component);
|
|---|
| 673 | GLUTAPI void GLUTAPIENTRY glutCopyColormap(int win);
|
|---|
| 674 |
|
|---|
| 675 | /* GLUT state retrieval sub-API. */
|
|---|
| 676 | GLUTAPI int GLUTAPIENTRY glutGet(GLenum type);
|
|---|
| 677 | GLUTAPI int GLUTAPIENTRY glutDeviceGet(GLenum type);
|
|---|
| 678 | #if (GLUT_API_VERSION >= 2)
|
|---|
| 679 | /* GLUT extension support sub-API */
|
|---|
| 680 | GLUTAPI int GLUTAPIENTRY glutExtensionSupported(const char *name);
|
|---|
| 681 | #endif
|
|---|
| 682 | #if (GLUT_API_VERSION >= 3)
|
|---|
| 683 | GLUTAPI int GLUTAPIENTRY glutGetModifiers(void);
|
|---|
| 684 | GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
|
|---|
| 685 | #endif
|
|---|
| 686 |
|
|---|
| 687 | /* GLUT font sub-API */
|
|---|
| 688 | GLUTAPI void GLUTAPIENTRY glutBitmapCharacter(void *font, int character);
|
|---|
| 689 | GLUTAPI int GLUTAPIENTRY glutBitmapWidth(void *font, int character);
|
|---|
| 690 | GLUTAPI void GLUTAPIENTRY glutStrokeCharacter(void *font, int character);
|
|---|
| 691 | GLUTAPI int GLUTAPIENTRY glutStrokeWidth(void *font, int character);
|
|---|
| 692 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 693 | GLUTAPI int GLUTAPIENTRY glutBitmapLength(void *font, const unsigned char *string);
|
|---|
| 694 | GLUTAPI int GLUTAPIENTRY glutStrokeLength(void *font, const unsigned char *string);
|
|---|
| 695 | #endif
|
|---|
| 696 |
|
|---|
| 697 | /* GLUT pre-built models sub-API */
|
|---|
| 698 | GLUTAPI void GLUTAPIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
|
|---|
| 699 | GLUTAPI void GLUTAPIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
|
|---|
| 700 | GLUTAPI void GLUTAPIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
|---|
| 701 | GLUTAPI void GLUTAPIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
|
|---|
| 702 | GLUTAPI void GLUTAPIENTRY glutWireCube(GLdouble size);
|
|---|
| 703 | GLUTAPI void GLUTAPIENTRY glutSolidCube(GLdouble size);
|
|---|
| 704 | GLUTAPI void GLUTAPIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
|---|
| 705 | GLUTAPI void GLUTAPIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
|
|---|
| 706 | GLUTAPI void GLUTAPIENTRY glutWireDodecahedron(void);
|
|---|
| 707 | GLUTAPI void GLUTAPIENTRY glutSolidDodecahedron(void);
|
|---|
| 708 | GLUTAPI void GLUTAPIENTRY glutWireTeapot(GLdouble size);
|
|---|
| 709 | GLUTAPI void GLUTAPIENTRY glutSolidTeapot(GLdouble size);
|
|---|
| 710 | GLUTAPI void GLUTAPIENTRY glutWireOctahedron(void);
|
|---|
| 711 | GLUTAPI void GLUTAPIENTRY glutSolidOctahedron(void);
|
|---|
| 712 | GLUTAPI void GLUTAPIENTRY glutWireTetrahedron(void);
|
|---|
| 713 | GLUTAPI void GLUTAPIENTRY glutSolidTetrahedron(void);
|
|---|
| 714 | GLUTAPI void GLUTAPIENTRY glutWireIcosahedron(void);
|
|---|
| 715 | GLUTAPI void GLUTAPIENTRY glutSolidIcosahedron(void);
|
|---|
| 716 |
|
|---|
| 717 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
|
|---|
| 718 | /* GLUT video resize sub-API. */
|
|---|
| 719 | GLUTAPI int GLUTAPIENTRY glutVideoResizeGet(GLenum param);
|
|---|
| 720 | GLUTAPI void GLUTAPIENTRY glutSetupVideoResizing(void);
|
|---|
| 721 | GLUTAPI void GLUTAPIENTRY glutStopVideoResizing(void);
|
|---|
| 722 | GLUTAPI void GLUTAPIENTRY glutVideoResize(int x, int y, int width, int height);
|
|---|
| 723 | GLUTAPI void GLUTAPIENTRY glutVideoPan(int x, int y, int width, int height);
|
|---|
| 724 |
|
|---|
| 725 | /* GLUT debugging sub-API. */
|
|---|
| 726 | GLUTAPI void GLUTAPIENTRY glutReportErrors(void);
|
|---|
| 727 | #endif
|
|---|
| 728 |
|
|---|
| 729 | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
|
|---|
| 730 | /* GLUT device control sub-API. */
|
|---|
| 731 | /* glutSetKeyRepeat modes. */
|
|---|
| 732 | #define GLUT_KEY_REPEAT_OFF 0
|
|---|
| 733 | #define GLUT_KEY_REPEAT_ON 1
|
|---|
| 734 | #define GLUT_KEY_REPEAT_DEFAULT 2
|
|---|
| 735 |
|
|---|
| 736 | /* Joystick button masks. */
|
|---|
| 737 | #define GLUT_JOYSTICK_BUTTON_A 1
|
|---|
| 738 | #define GLUT_JOYSTICK_BUTTON_B 2
|
|---|
| 739 | #define GLUT_JOYSTICK_BUTTON_C 4
|
|---|
| 740 | #define GLUT_JOYSTICK_BUTTON_D 8
|
|---|
| 741 |
|
|---|
| 742 | GLUTAPI void GLUTAPIENTRY glutIgnoreKeyRepeat(int ignore);
|
|---|
| 743 | GLUTAPI void GLUTAPIENTRY glutSetKeyRepeat(int repeatMode);
|
|---|
| 744 | GLUTAPI void GLUTAPIENTRY glutForceJoystickFunc(void);
|
|---|
| 745 |
|
|---|
| 746 | /* GLUT game mode sub-API. */
|
|---|
| 747 | /* glutGameModeGet. */
|
|---|
| 748 | #define GLUT_GAME_MODE_ACTIVE 0
|
|---|
| 749 | #define GLUT_GAME_MODE_POSSIBLE 1
|
|---|
| 750 | #define GLUT_GAME_MODE_WIDTH 2
|
|---|
| 751 | #define GLUT_GAME_MODE_HEIGHT 3
|
|---|
| 752 | #define GLUT_GAME_MODE_PIXEL_DEPTH 4
|
|---|
| 753 | #define GLUT_GAME_MODE_REFRESH_RATE 5
|
|---|
| 754 | #define GLUT_GAME_MODE_DISPLAY_CHANGED 6
|
|---|
| 755 |
|
|---|
| 756 | GLUTAPI void GLUTAPIENTRY glutGameModeString(const char *string);
|
|---|
| 757 | GLUTAPI int GLUTAPIENTRY glutEnterGameMode(void);
|
|---|
| 758 | GLUTAPI void GLUTAPIENTRY glutLeaveGameMode(void);
|
|---|
| 759 | GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
|
|---|
| 760 | #endif
|
|---|
| 761 |
|
|---|
| 762 | #ifdef __cplusplus
|
|---|
| 763 | }
|
|---|
| 764 | #endif
|
|---|
| 765 |
|
|---|
| 766 | #if 0
|
|---|
| 767 | #ifdef GLUT_APIENTRY_DEFINED
|
|---|
| 768 | # undef GLUT_APIENTRY_DEFINED
|
|---|
| 769 | # undef APIENTRY
|
|---|
| 770 | #endif
|
|---|
| 771 |
|
|---|
| 772 | #ifdef GLUT_WINGDIAPI_DEFINED
|
|---|
| 773 | # undef GLUT_WINGDIAPI_DEFINED
|
|---|
| 774 | # undef WINGDIAPI
|
|---|
| 775 | #endif
|
|---|
| 776 |
|
|---|
| 777 | #ifdef GLUT_DEFINED___CDECL
|
|---|
| 778 | # undef GLUT_DEFINED___CDECL
|
|---|
| 779 | # undef __cdecl
|
|---|
| 780 | #endif
|
|---|
| 781 |
|
|---|
| 782 | #ifdef GLUT_DEFINED__CRTIMP
|
|---|
| 783 | # undef GLUT_DEFINED__CRTIMP
|
|---|
| 784 | # undef _CRTIMP
|
|---|
| 785 | #endif
|
|---|
| 786 | #endif
|
|---|
| 787 |
|
|---|
| 788 | #endif /* __glut_h__ */
|
|---|