📄 glut.h
字号:
inline void glutVisibilityFunc(void (*f)(int s)) {glut_window->visibility=f;}enum {GLUT_NOT_VISIBLE, GLUT_VISIBLE};inline void glutIdleFunc(void (*f)()) {Fl::set_idle(f);}// Warning: this cast may not work on all machines:inline void glutTimerFunc(unsigned int msec, void (*f)(int), int value) { Fl::add_timeout(msec*.001, (void (*)(void *))f, (void *)value);}inline void glutMenuStateFunc(void (*f)(int state)) { glut_menustate_function = f;}inline void glutMenuStatusFunc(void (*f)(int status, int x, int y)) { glut_menustatus_function = f;}enum {GLUT_MENU_NOT_IN_USE, GLUT_MENU_IN_USE};inline void glutSpecialFunc(void (*f)(int key, int x, int y)) { glut_window->special = f;}# define GLUT_KEY_F1 1# define GLUT_KEY_F2 2# define GLUT_KEY_F3 3# define GLUT_KEY_F4 4# define GLUT_KEY_F5 5# define GLUT_KEY_F6 6# define GLUT_KEY_F7 7# define GLUT_KEY_F8 8# define GLUT_KEY_F9 9# define GLUT_KEY_F10 10# define GLUT_KEY_F11 11# define GLUT_KEY_F12 12// WARNING: Different values than GLUT uses:# define GLUT_KEY_LEFT FL_Left# define GLUT_KEY_UP FL_Up# define GLUT_KEY_RIGHT FL_Right# define GLUT_KEY_DOWN FL_Down# define GLUT_KEY_PAGE_UP FL_Page_Up# define GLUT_KEY_PAGE_DOWN FL_Page_Down# define GLUT_KEY_HOME FL_Home# define GLUT_KEY_END FL_End# define GLUT_KEY_INSERT FL_Insert//inline void glutSpaceballMotionFunc(void (*)(int x, int y, int z));//inline void glutSpaceballRotateFunc(void (*)(int x, int y, int z));//inline void glutSpaceballButtonFunc(void (*)(int button, int state));//inline void glutButtonBoxFunc(void (*)(int button, int state));//inline void glutDialsFunc(void (*)(int dial, int value));//inline void glutTabletMotionFunc(void (*)(int x, int y));//inline void glutTabletButtonFunc(void (*)(int button, int state, int x, int y));inline void glutOverlayDisplayFunc(void (*f)()) { glut_window->overlaydisplay = f;}//inline void glutWindowStatusFunc(void (*)(int state));//enum {GLUT_HIDDEN, GLUT_FULLY_RETAINED, GLUT_PARTIALLY_RETAINED,// GLUT_FULLY_COVERED};//inline void glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);//inline GLfloat glutGetColor(int ndx, int component);//#define GLUT_RED 0//#define GLUT_GREEN 1//#define GLUT_BLUE 2//inline void glutCopyColormap(int win);// Warning: values are changed from GLUT!// Also relies on the GL_ symbols having values greater than 100int glutGet(GLenum type);enum { GLUT_RETURN_ZERO = 0, GLUT_WINDOW_X, GLUT_WINDOW_Y, GLUT_WINDOW_WIDTH, GLUT_WINDOW_HEIGHT, GLUT_WINDOW_PARENT,//GLUT_WINDOW_NUM_CHILDREN,//GLUT_WINDOW_CURSOR, GLUT_SCREEN_WIDTH, GLUT_SCREEN_HEIGHT,//GLUT_SCREEN_WIDTH_MM,//GLUT_SCREEN_HEIGHT_MM, GLUT_MENU_NUM_ITEMS, GLUT_DISPLAY_MODE_POSSIBLE, GLUT_INIT_WINDOW_X, GLUT_INIT_WINDOW_Y, GLUT_INIT_WINDOW_WIDTH, GLUT_INIT_WINDOW_HEIGHT, GLUT_INIT_DISPLAY_MODE,//GLUT_ELAPSED_TIME, GLUT_WINDOW_BUFFER_SIZE};# define GLUT_WINDOW_STENCIL_SIZE GL_STENCIL_BITS# define GLUT_WINDOW_DEPTH_SIZE GL_DEPTH_BITS# define GLUT_WINDOW_RED_SIZE GL_RED_BITS# define GLUT_WINDOW_GREEN_SIZE GL_GREEN_BITS# define GLUT_WINDOW_BLUE_SIZE GL_BLUE_BITS# define GLUT_WINDOW_ALPHA_SIZE GL_ALPHA_BITS# define GLUT_WINDOW_ACCUM_RED_SIZE GL_ACCUM_RED_BITS# define GLUT_WINDOW_ACCUM_GREEN_SIZE GL_ACCUM_GREEN_BITS# define GLUT_WINDOW_ACCUM_BLUE_SIZE GL_ACCUM_BLUE_BITS# define GLUT_WINDOW_ACCUM_ALPHA_SIZE GL_ACCUM_ALPHA_BITS# define GLUT_WINDOW_DOUBLEBUFFER GL_DOUBLEBUFFER# define GLUT_WINDOW_RGBA GL_RGBA# define GLUT_WINDOW_COLORMAP_SIZE GL_INDEX_BITS# ifdef GL_SAMPLES_SGIS# define GLUT_WINDOW_NUM_SAMPLES GL_SAMPLES_SGIS# else# define GLUT_WINDOW_NUM_SAMPLES GLUT_RETURN_ZERO# endif# define GLUT_WINDOW_STEREO GL_STEREO//int glutDeviceGet(GLenum type);//#define GLUT_HAS_KEYBOARD 600//#define GLUT_HAS_MOUSE 601//#define GLUT_HAS_SPACEBALL 602//#define GLUT_HAS_DIAL_AND_BUTTON_BOX 603//#define GLUT_HAS_TABLET 604//#define GLUT_NUM_MOUSE_BUTTONS 605//#define GLUT_NUM_SPACEBALL_BUTTONS 606//#define GLUT_NUM_BUTTON_BOX_BUTTONS 607//#define GLUT_NUM_DIALS 608//#define GLUT_NUM_TABLET_BUTTONS 609// WARNING: these values are different than GLUT uses:# define GLUT_ACTIVE_SHIFT FL_SHIFT# define GLUT_ACTIVE_CTRL FL_CTRL# define GLUT_ACTIVE_ALT FL_ALTinline int glutGetModifiers() {return Fl::event_state() & (GLUT_ACTIVE_SHIFT | GLUT_ACTIVE_CTRL | GLUT_ACTIVE_ALT);}int glutLayerGet(GLenum);# define GLUT_OVERLAY_POSSIBLE 800//#define GLUT_LAYER_IN_USE 801//#define GLUT_HAS_OVERLAY 802# define GLUT_TRANSPARENT_INDEX 803# define GLUT_NORMAL_DAMAGED 804# define GLUT_OVERLAY_DAMAGED 805//inline int glutVideoResizeGet(GLenum param);//#define GLUT_VIDEO_RESIZE_POSSIBLE 900//#define GLUT_VIDEO_RESIZE_IN_USE 901//#define GLUT_VIDEO_RESIZE_X_DELTA 902//#define GLUT_VIDEO_RESIZE_Y_DELTA 903//#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 904//#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 905//#define GLUT_VIDEO_RESIZE_X 906//#define GLUT_VIDEO_RESIZE_Y 907//#define GLUT_VIDEO_RESIZE_WIDTH 908//#define GLUT_VIDEO_RESIZE_HEIGHT 909//inline void glutSetupVideoResizing();//inline void glutStopVideoResizing();//inline void glutVideoResize(int x, int y, int width, int height);//inline void glutVideoPan(int x, int y, int width, int height);////////////////////////////////////////////////////////////////// Emulated GLUT drawing functions:// Font argument must be a void* for compatability, so...extern FL_EXPORT struct Glut_Bitmap_Font {uchar font; int size;} glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10, glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12, glutBitmapHelvetica18;# define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)# define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)# define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)# define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)# define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)# define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)# define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)FL_EXPORT void glutBitmapCharacter(void *font, int character);FL_EXPORT int glutBitmapWidth(void *font, int character);////////////////////////////////////////////////////////////////// GLUT drawing functions. These are NOT emulated but you can// link in the glut library to get them. This assumes the object// files in GLUT remain as they currently are so that there are// not symbol conflicts with the above.extern "C" {extern int APIENTRY glutExtensionSupported(char *name);/* Stroke font constants (use these in GLUT program). */# ifdef WIN32# define GLUT_STROKE_ROMAN ((void*)0)# define GLUT_STROKE_MONO_ROMAN ((void*)1)# elseextern void *glutStrokeRoman;# define GLUT_STROKE_ROMAN (&glutStrokeRoman)extern void *glutStrokeMonoRoman;# define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)# endif/* GLUT font sub-API */extern void APIENTRY glutStrokeCharacter(void *font, int character);extern int APIENTRY glutStrokeWidth(void *font, int character);/* GLUT pre-built models sub-API */extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);extern void APIENTRY glutWireCube(GLdouble size);extern void APIENTRY glutSolidCube(GLdouble size);extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);extern void APIENTRY glutWireDodecahedron();extern void APIENTRY glutSolidDodecahedron();extern void APIENTRY glutWireTeapot(GLdouble size);extern void APIENTRY glutSolidTeapot(GLdouble size);extern void APIENTRY glutWireOctahedron();extern void APIENTRY glutSolidOctahedron();extern void APIENTRY glutWireTetrahedron();extern void APIENTRY glutSolidTetrahedron();extern void APIENTRY glutWireIcosahedron();extern void APIENTRY glutSolidIcosahedron();}#endif /* !__glut_h__ *///// End of "$Id: glut.H 4288 2005-04-16 00:13:17Z mike $".//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -