glut.h | glut.h | |||
---|---|---|---|---|
#ifndef __glut_h__ | #ifndef __glut_h__ | |||
#define __glut_h__ | #define __glut_h__ | |||
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996. */ | /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ | |||
/* This program is freely distributable without licensing fees and is | /* This program is freely distributable without licensing fees and is | |||
provided without guarantee or warrantee expressed or implied. This | provided without guarantee or warrantee expressed or implied. This | |||
program is -not- in the public domain. */ | program is -not- in the public domain. */ | |||
#if defined(WIN32) | #if defined(_WIN32) | |||
#include <windows.h> | ||||
#pragma warning (disable:4244) /* disable bogus conversion warnings | /* GLUT 3.7 now tries to avoid including <windows.h> | |||
*/ | to avoid name space pollution, but Win32's <GL/gl.h> | |||
needs APIENTRY and WINGDIAPI defined properly. */ | ||||
# if 0 | ||||
# define WIN32_LEAN_AND_MEAN | ||||
# include <windows.h> | ||||
# else | ||||
/* XXX This is from Win32's <windef.h> */ | ||||
# ifndef APIENTRY | ||||
# define GLUT_APIENTRY_DEFINED | ||||
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) | ||||
# define APIENTRY __stdcall | ||||
# else | ||||
# define APIENTRY | ||||
# endif | ||||
# endif | ||||
/* XXX This is from Win32's <winnt.h> */ | ||||
# ifndef CALLBACK | ||||
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defi | ||||
ned(_M_PPC)) && !defined(MIDL_PASS) | ||||
# define CALLBACK __stdcall | ||||
# else | ||||
# define CALLBACK | ||||
# endif | ||||
# endif | ||||
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */ | ||||
# ifndef WINGDIAPI | ||||
# define GLUT_WINGDIAPI_DEFINED | ||||
# define WINGDIAPI __declspec(dllimport) | ||||
# endif | ||||
/* XXX This is from Win32's <ctype.h> */ | ||||
# ifndef _WCHAR_T_DEFINED | ||||
typedef unsigned short wchar_t; | ||||
# define _WCHAR_T_DEFINED | ||||
# endif | ||||
# endif | ||||
#pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib | ||||
*/ | ||||
#pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ | ||||
#pragma comment (lib, "glu32.lib") /* link with OpenGL Utility lib */ | ||||
#pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ | ||||
#pragma warning (disable:4244) /* Disable bogus conversion warnings. */ | ||||
#pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ | ||||
#endif | #endif | |||
#include <GL/gl.h> | #include <GL/gl.h> | |||
#include <GL/glu.h> | #include <GL/glu.h> | |||
/* define APIENTRY and CALLBACK to null string if we aren't on Win32 */ | /* define APIENTRY and CALLBACK to null string if we aren't on Win32 */ | |||
#if !defined(WIN32) | #if !defined(_WIN32) | |||
#define APIENTRY | #define APIENTRY | |||
#define GLUT_APIENTRY_DEFINED | ||||
#define CALLBACK | #define CALLBACK | |||
#endif | #endif | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/** | /** | |||
GLUT API revision history: | GLUT API revision history: | |||
skipping to change at line 44 | skipping to change at line 89 | |||
GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 | GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 | |||
GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, | GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, | |||
extension. Supports new input devices like tablet, dial and button | extension. Supports new input devices like tablet, dial and button | |||
box, and Spaceball. Easy to query OpenGL extensions. | box, and Spaceball. Easy to query OpenGL extensions. | |||
GLUT_API_VERSION=3 glutMenuStatus added. | GLUT_API_VERSION=3 glutMenuStatus added. | |||
GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, | GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, | |||
glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic | glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic | |||
video resize subAPI, glutPostWindowRedisplay (NOT FINALIZED!). | video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, | |||
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, | ||||
glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). | ||||
**/ | **/ | |||
#ifndef GLUT_API_VERSION /* allow this to be overriden */ | #ifndef GLUT_API_VERSION /* allow this to be overriden */ | |||
#define GLUT_API_VERSION 3 | #define GLUT_API_VERSION 3 | |||
#endif | #endif | |||
/** | /** | |||
GLUT implementation revision history: | GLUT implementation revision history: | |||
GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT | GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT | |||
API revisions and implementation revisions (ie, bug fixes). | API revisions and implementation revisions (ie, bug fixes). | |||
skipping to change at line 79 | skipping to change at line 126 | |||
GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 | GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 | |||
GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner | GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner | |||
and video resize. 1/3/97 | and video resize. 1/3/97 | |||
GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routin es. | GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routin es. | |||
GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. | GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. | |||
GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routi nes + signal handling. | GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routi nes + signal handling. | |||
GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 release with GameGLUT support. | ||||
**/ | **/ | |||
#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ | #ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ | |||
#define GLUT_XLIB_IMPLEMENTATION 12 | #define GLUT_XLIB_IMPLEMENTATION 13 | |||
#endif | #endif | |||
/* Display mode bit masks. */ | /* Display mode bit masks. */ | |||
#define GLUT_RGB 0 | #define GLUT_RGB 0 | |||
#define GLUT_RGBA GLUT_RGB | #define GLUT_RGBA GLUT_RGB | |||
#define GLUT_INDEX 1 | #define GLUT_INDEX 1 | |||
#define GLUT_SINGLE 0 | #define GLUT_SINGLE 0 | |||
#define GLUT_DOUBLE 2 | #define GLUT_DOUBLE 2 | |||
#define GLUT_ACCUM 4 | #define GLUT_ACCUM 4 | |||
#define GLUT_ALPHA 8 | #define GLUT_ALPHA 8 | |||
skipping to change at line 164 | skipping to change at line 213 | |||
/* Color index component selection values. */ | /* Color index component selection values. */ | |||
#define GLUT_RED 0 | #define GLUT_RED 0 | |||
#define GLUT_GREEN 1 | #define GLUT_GREEN 1 | |||
#define GLUT_BLUE 2 | #define GLUT_BLUE 2 | |||
/* Layers for use. */ | /* Layers for use. */ | |||
#define GLUT_NORMAL 0 | #define GLUT_NORMAL 0 | |||
#define GLUT_OVERLAY 1 | #define GLUT_OVERLAY 1 | |||
#if defined(WIN32) | #if defined(_WIN32) | |||
/* Stroke font constants (use these in GLUT program). */ | /* Stroke font constants (use these in GLUT program). */ | |||
#define GLUT_STROKE_ROMAN ((void*)0) | #define GLUT_STROKE_ROMAN ((void*)0) | |||
#define GLUT_STROKE_MONO_ROMAN ((void*)1) | #define GLUT_STROKE_MONO_ROMAN ((void*)1) | |||
/* Bitmap font constants (use these in GLUT program). */ | /* Bitmap font constants (use these in GLUT program). */ | |||
#define GLUT_BITMAP_9_BY_15 ((void*)2) | #define GLUT_BITMAP_9_BY_15 ((void*)2) | |||
#define GLUT_BITMAP_8_BY_13 ((void*)3) | #define GLUT_BITMAP_8_BY_13 ((void*)3) | |||
#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) | #define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) | |||
#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) | #define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) | |||
#if (GLUT_API_VERSION >= 3) | #if (GLUT_API_VERSION >= 3) | |||
skipping to change at line 251 | skipping to change at line 300 | |||
#define GLUT_MENU_NUM_ITEMS 300 | #define GLUT_MENU_NUM_ITEMS 300 | |||
#define GLUT_DISPLAY_MODE_POSSIBLE 400 | #define GLUT_DISPLAY_MODE_POSSIBLE 400 | |||
#define GLUT_INIT_WINDOW_X 500 | #define GLUT_INIT_WINDOW_X 500 | |||
#define GLUT_INIT_WINDOW_Y 501 | #define GLUT_INIT_WINDOW_Y 501 | |||
#define GLUT_INIT_WINDOW_WIDTH 502 | #define GLUT_INIT_WINDOW_WIDTH 502 | |||
#define GLUT_INIT_WINDOW_HEIGHT 503 | #define GLUT_INIT_WINDOW_HEIGHT 503 | |||
#define GLUT_INIT_DISPLAY_MODE 504 | #define GLUT_INIT_DISPLAY_MODE 504 | |||
#if (GLUT_API_VERSION >= 2) | #if (GLUT_API_VERSION >= 2) | |||
#define GLUT_ELAPSED_TIME 700 | #define GLUT_ELAPSED_TIME 700 | |||
#endif | #endif | |||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) | ||||
#define GLUT_WINDOW_FORMAT_ID 123 | ||||
#endif | ||||
#if (GLUT_API_VERSION >= 2) | #if (GLUT_API_VERSION >= 2) | |||
/* glutDeviceGet parameters. */ | /* glutDeviceGet parameters. */ | |||
#define GLUT_HAS_KEYBOARD 600 | #define GLUT_HAS_KEYBOARD 600 | |||
#define GLUT_HAS_MOUSE 601 | #define GLUT_HAS_MOUSE 601 | |||
#define GLUT_HAS_SPACEBALL 602 | #define GLUT_HAS_SPACEBALL 602 | |||
#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 | #define GLUT_HAS_DIAL_AND_BUTTON_BOX 603 | |||
#define GLUT_HAS_TABLET 604 | #define GLUT_HAS_TABLET 604 | |||
#define GLUT_NUM_MOUSE_BUTTONS 605 | #define GLUT_NUM_MOUSE_BUTTONS 605 | |||
#define GLUT_NUM_SPACEBALL_BUTTONS 606 | #define GLUT_NUM_SPACEBALL_BUTTONS 606 | |||
#define GLUT_NUM_BUTTON_BOX_BUTTONS 607 | #define GLUT_NUM_BUTTON_BOX_BUTTONS 607 | |||
#define GLUT_NUM_DIALS 608 | #define GLUT_NUM_DIALS 608 | |||
#define GLUT_NUM_TABLET_BUTTONS 609 | #define GLUT_NUM_TABLET_BUTTONS 609 | |||
#endif | #endif | |||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) | ||||
#define GLUT_DEVICE_IGNORE_KEY_REPEAT 610 | ||||
#define GLUT_DEVICE_KEY_REPEAT 611 | ||||
#define GLUT_HAS_JOYSTICK 612 | ||||
#define GLUT_OWNS_JOYSTICK 613 | ||||
#define GLUT_JOYSTICK_BUTTONS 614 | ||||
#define GLUT_JOYSTICK_AXES 615 | ||||
#define GLUT_JOYSTICK_POLL_RATE 616 | ||||
#endif | ||||
#if (GLUT_API_VERSION >= 3) | #if (GLUT_API_VERSION >= 3) | |||
/* glutLayerGet parameters. */ | /* glutLayerGet parameters. */ | |||
#define GLUT_OVERLAY_POSSIBLE 800 | #define GLUT_OVERLAY_POSSIBLE 800 | |||
#define GLUT_LAYER_IN_USE 801 | #define GLUT_LAYER_IN_USE 801 | |||
#define GLUT_HAS_OVERLAY 802 | #define GLUT_HAS_OVERLAY 802 | |||
#define GLUT_TRANSPARENT_INDEX 803 | #define GLUT_TRANSPARENT_INDEX 803 | |||
#define GLUT_NORMAL_DAMAGED 804 | #define GLUT_NORMAL_DAMAGED 804 | |||
#define GLUT_OVERLAY_DAMAGED 805 | #define GLUT_OVERLAY_DAMAGED 805 | |||
skipping to change at line 393 | skipping to change at line 454 | |||
extern int APIENTRY glutGetMenu(void); | extern int APIENTRY glutGetMenu(void); | |||
extern void APIENTRY glutSetMenu(int menu); | extern void APIENTRY glutSetMenu(int menu); | |||
extern void APIENTRY glutAddMenuEntry(const char *label, int value); | extern void APIENTRY glutAddMenuEntry(const char *label, int value); | |||
extern void APIENTRY glutAddSubMenu(const char *label, int submenu); | extern void APIENTRY glutAddSubMenu(const char *label, int submenu); | |||
extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); | extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); | |||
extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int s ubmenu); | extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int s ubmenu); | |||
extern void APIENTRY glutRemoveMenuItem(int item); | extern void APIENTRY glutRemoveMenuItem(int item); | |||
extern void APIENTRY glutAttachMenu(int button); | extern void APIENTRY glutAttachMenu(int button); | |||
extern void APIENTRY glutDetachMenu(int button); | extern void APIENTRY glutDetachMenu(int button); | |||
/* GLUT sub-API. */ | /* GLUT window callback sub-API. */ | |||
extern void APIENTRY glutDisplayFunc(void (*)(void)); | extern void APIENTRY glutDisplayFunc(void (*func)(void)); | |||
extern void APIENTRY glutReshapeFunc(void (*)(int width, int height)); | extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height)); | |||
extern void APIENTRY glutKeyboardFunc(void (*)(unsigned char key, int x, in | extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x | |||
t y)); | , int y)); | |||
extern void APIENTRY glutMouseFunc(void (*)(int button, int state, int x, i | extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int | |||
nt y)); | x, int y)); | |||
extern void APIENTRY glutMotionFunc(void (*)(int x, int y)); | extern void APIENTRY glutMotionFunc(void (*func)(int x, int y)); | |||
extern void APIENTRY glutPassiveMotionFunc(void (*)(int x, int y)); | extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y)); | |||
extern void APIENTRY glutEntryFunc(void (*)(int state)); | extern void APIENTRY glutEntryFunc(void (*func)(int state)); | |||
extern void APIENTRY glutVisibilityFunc(void (*)(int state)); | extern void APIENTRY glutVisibilityFunc(void (*func)(int state)); | |||
extern void APIENTRY glutIdleFunc(void (*)(void)); | extern void APIENTRY glutIdleFunc(void (*func)(void)); | |||
extern void APIENTRY glutTimerFunc(unsigned int millis, void (*)(int value) | extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int va | |||
, int value); | lue), int value); | |||
extern void APIENTRY glutMenuStateFunc(void (*)(int state)); | extern void APIENTRY glutMenuStateFunc(void (*func)(int state)); | |||
#if (GLUT_API_VERSION >= 2) | #if (GLUT_API_VERSION >= 2) | |||
extern void APIENTRY glutSpecialFunc(void (*)(int key, int x, int y)); | extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y)); | |||
extern void APIENTRY glutSpaceballMotionFunc(void (*)(int x, int y, int z)) | extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int | |||
; | z)); | |||
extern void APIENTRY glutSpaceballRotateFunc(void (*)(int x, int y, int z)) | extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int | |||
; | z)); | |||
extern void APIENTRY glutSpaceballButtonFunc(void (*)(int button, int state | extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int s | |||
)); | tate)); | |||
extern void APIENTRY glutButtonBoxFunc(void (*)(int button, int state)); | extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state)) | |||
extern void APIENTRY glutDialsFunc(void (*)(int dial, int value)); | ; | |||
extern void APIENTRY glutTabletMotionFunc(void (*)(int x, int y)); | extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value)); | |||
extern void APIENTRY glutTabletButtonFunc(void (*)(int button, int state, i | extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y)); | |||
nt x, int y)); | extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int stat | |||
e, int x, int y)); | ||||
#if (GLUT_API_VERSION >= 3) | #if (GLUT_API_VERSION >= 3) | |||
extern void APIENTRY glutMenuStatusFunc(void (*)(int status, int x, int y)) | extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int | |||
; | y)); | |||
extern void APIENTRY glutOverlayDisplayFunc(void (*)(void)); | extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void)); | |||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) | |||
extern void APIENTRY glutWindowStatusFunc(void (*)(int state)); | extern void APIENTRY glutWindowStatusFunc(void (*func)(int state)); | |||
#endif | ||||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) | ||||
extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int | ||||
x, int y)); | ||||
extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y)) | ||||
; | ||||
extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, | ||||
int x, int y, int z), int pollInterval); | ||||
#endif | #endif | |||
#endif | #endif | |||
#endif | #endif | |||
/* GLUT color index sub-API. */ | /* GLUT color index sub-API. */ | |||
extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); | extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); | |||
extern GLfloat APIENTRY glutGetColor(int ndx, int component); | extern GLfloat APIENTRY glutGetColor(int ndx, int component); | |||
extern void APIENTRY glutCopyColormap(int win); | extern void APIENTRY glutCopyColormap(int win); | |||
/* GLUT state retrieval sub-API. */ | /* GLUT state retrieval sub-API. */ | |||
skipping to change at line 482 | skipping to change at line 548 | |||
extern int APIENTRY glutVideoResizeGet(GLenum param); | extern int APIENTRY glutVideoResizeGet(GLenum param); | |||
extern void APIENTRY glutSetupVideoResizing(void); | extern void APIENTRY glutSetupVideoResizing(void); | |||
extern void APIENTRY glutStopVideoResizing(void); | extern void APIENTRY glutStopVideoResizing(void); | |||
extern void APIENTRY glutVideoResize(int x, int y, int width, int height); | extern void APIENTRY glutVideoResize(int x, int y, int width, int height); | |||
extern void APIENTRY glutVideoPan(int x, int y, int width, int height); | extern void APIENTRY glutVideoPan(int x, int y, int width, int height); | |||
/* GLUT debugging sub-API. */ | /* GLUT debugging sub-API. */ | |||
extern void APIENTRY glutReportErrors(void); | extern void APIENTRY glutReportErrors(void); | |||
#endif | #endif | |||
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) | ||||
/* GLUT device control sub-API. */ | ||||
/* glutSetKeyRepeat modes. */ | ||||
#define GLUT_KEY_REPEAT_OFF 0 | ||||
#define GLUT_KEY_REPEAT_ON 1 | ||||
#define GLUT_KEY_REPEAT_DEFAULT 2 | ||||
/* Joystick button masks. */ | ||||
#define GLUT_JOYSTICK_BUTTON_A 1 | ||||
#define GLUT_JOYSTICK_BUTTON_B 2 | ||||
#define GLUT_JOYSTICK_BUTTON_C 4 | ||||
#define GLUT_JOYSTICK_BUTTON_D 8 | ||||
extern void APIENTRY glutIgnoreKeyRepeat(int ignore); | ||||
extern void APIENTRY glutSetKeyRepeat(int repeatMode); | ||||
extern void APIENTRY glutForceJoystickFunc(void); | ||||
/* GLUT game mode sub-API. */ | ||||
/* glutGameModeGet. */ | ||||
#define GLUT_GAME_MODE_ACTIVE 0 | ||||
#define GLUT_GAME_MODE_POSSIBLE 1 | ||||
#define GLUT_GAME_MODE_WIDTH 2 | ||||
#define GLUT_GAME_MODE_HEIGHT 3 | ||||
#define GLUT_GAME_MODE_PIXEL_DEPTH 4 | ||||
#define GLUT_GAME_MODE_REFRESH_RATE 5 | ||||
#define GLUT_GAME_MODE_DISPLAY_CHANGED 6 | ||||
extern void APIENTRY glutGameModeString(const char *string); | ||||
extern int APIENTRY glutEnterGameMode(void); | ||||
extern void APIENTRY glutLeaveGameMode(void); | ||||
extern int APIENTRY glutGameModeGet(GLenum mode); | ||||
#endif | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#ifdef GLUT_APIENTRY_DEFINED | ||||
# undef GLUT_APIENTRY_DEFINED | ||||
# undef APIENTRY | ||||
#endif | ||||
#ifdef GLUT_WINGDIAPI_DEFINED | ||||
# undef GLUT_WINGDIAPI_DEFINED | ||||
# undef WINGDIAPI | ||||
#endif | ||||
#endif /* __glut_h__ */ | #endif /* __glut_h__ */ | |||
End of changes. 17 change blocks. | ||||
40 lines changed or deleted | 155 lines changed or added | |||
tube.h | tube.h | |||
---|---|---|---|---|
skipping to change at line 20 | skipping to change at line 20 | |||
* Linas Vepstas 1990, 1991 | * Linas Vepstas 1990, 1991 | |||
*/ | */ | |||
#ifndef __TUBE_H__ | #ifndef __TUBE_H__ | |||
#define __TUBE_H__ | #define __TUBE_H__ | |||
#ifdef __cplusplus | #ifdef __cplusplus | |||
extern "C" { | extern "C" { | |||
#endif | #endif | |||
/** | ||||
GLE API revision history: | ||||
GLE_API_VERSION is updated to reflect GLE API changes (interface | ||||
changes, semantic changes, deletions, or additions). | ||||
GLE_API_VERSION=228 GLUT 3.7 release of GLE. | ||||
**/ | ||||
#ifndef GLE_API_VERSION /* allow this to be overriden */ | ||||
#define GLE_API_VERSION 228 | ||||
#endif | ||||
/* some types */ | /* some types */ | |||
#define gleDouble double | #define gleDouble double | |||
typedef gleDouble gleAffine[2][3]; | typedef gleDouble gleAffine[2][3]; | |||
/* ====================================================== */ | /* ====================================================== */ | |||
/* defines for tubing join styles */ | /* defines for tubing join styles */ | |||
#define TUBE_JN_RAW 0x1 | #define TUBE_JN_RAW 0x1 | |||
#define TUBE_JN_ANGLE 0x2 | #define TUBE_JN_ANGLE 0x2 | |||
#define TUBE_JN_CUT 0x3 | #define TUBE_JN_CUT 0x3 | |||
skipping to change at line 77 | skipping to change at line 89 | |||
#define gleSuperExtrusion super_extrusion | #define gleSuperExtrusion super_extrusion | |||
#define gleTwistExtrusion twist_extrusion | #define gleTwistExtrusion twist_extrusion | |||
#define gleSpiral spiral | #define gleSpiral spiral | |||
#define gleLathe lathe | #define gleLathe lathe | |||
#define gleHelicoid helicoid | #define gleHelicoid helicoid | |||
#define gleToroid toroid | #define gleToroid toroid | |||
#define gleScrew screw | #define gleScrew screw | |||
#endif /* GL_32 */ | #endif /* GL_32 */ | |||
#ifdef _NO_PROTO /* NO ANSI C PROTOTYPING */ | ||||
extern int gleGetJoinStyle (); | ||||
extern void gleSetJoinStyle (); | ||||
extern void glePolyCone (); | ||||
extern void glePolyCylinder (); | ||||
extern void gleExtrusion (); | ||||
extern void gleSuperExtrusion (); | ||||
extern void gleTwistExtrusion (); | ||||
extern void gleSpiral (); | ||||
extern void gleLathe (); | ||||
extern void gleHelicoid (); | ||||
extern void gleToroid (); | ||||
extern void gleScrew (); | ||||
#else /* _NO_PROTO */ /* ANSI C PROTOTYPING */ | ||||
extern int gleGetJoinStyle (void); | extern int gleGetJoinStyle (void); | |||
extern void gleSetJoinStyle (int style); /* bitwise OR of flags */ | extern void gleSetJoinStyle (int style); /* bitwise OR of flags */ | |||
extern int gleGetNumSlices(void); | ||||
extern void gleSetNumSlices(int slices); | ||||
/* draw polyclinder, specified as a polyline */ | /* draw polyclinder, specified as a polyline */ | |||
extern void glePolyCylinder (int npoints, /* num points in polyline */ | extern void glePolyCylinder (int npoints, /* num points in polyline */ | |||
gleDouble point_array[][3], /* polyline vertces */ | gleDouble point_array[][3], /* polyline vertces */ | |||
float color_array[][3], /* colors at polyline verts */ | float color_array[][3], /* colors at polyline verts */ | |||
gleDouble radius); /* radius of polycylinder */ | gleDouble radius); /* radius of polycylinder */ | |||
/* draw polycone, specified as a polyline with radii */ | /* draw polycone, specified as a polyline with radii */ | |||
extern void glePolyCone (int npoints, /* numpoints in poly-line */ | extern void glePolyCone (int npoints, /* numpoints in poly-line */ | |||
gleDouble point_array[][3], /* polyline vertices */ | gleDouble point_array[][3], /* polyline vertices */ | |||
skipping to change at line 199 | skipping to change at line 196 | |||
extern void gleScrew (int ncp, /* number of contour points */ | extern void gleScrew (int ncp, /* number of contour points */ | |||
gleDouble contour[][2], /* 2D contour */ | gleDouble contour[][2], /* 2D contour */ | |||
gleDouble cont_normal[][2], /* 2D contour normals */ | gleDouble cont_normal[][2], /* 2D contour normals */ | |||
gleDouble up[3], /* up vector for contour */ | gleDouble up[3], /* up vector for contour */ | |||
gleDouble startz, /* start of segment */ | gleDouble startz, /* start of segment */ | |||
gleDouble endz, /* end of segment */ | gleDouble endz, /* end of segment */ | |||
gleDouble twist); /* number of rotations */ | gleDouble twist); /* number of rotations */ | |||
extern void gleTextureMode (int mode); | extern void gleTextureMode (int mode); | |||
#endif /* _NO_PROTO */ | ||||
#ifdef __cplusplus | #ifdef __cplusplus | |||
} | } | |||
#endif | #endif | |||
#endif /* __TUBE_H__ */ | #endif /* __TUBE_H__ */ | |||
/* ================== END OF FILE ======================= */ | /* ================== END OF FILE ======================= */ | |||
End of changes. 4 change blocks. | ||||
19 lines changed or deleted | 14 lines changed or added | |||