Go to the documentation of this file.00001 #ifndef vgui_glut_h
00002 #define vgui_glut_h
00003
00004 #include <vgui/vgui_config.h>
00005 #ifdef HAS_GLUT
00006
00007
00008
00009
00010
00011
00012
00013
00014 # include <vcl_compiler.h>
00015 # include <vgui/vgui_gl.h>
00016 # include <vgui/vgui_glu.h>
00017 #ifdef __APPLE__
00018 # include <glut.h>
00019 #else
00020 # include <GL/glut.h>
00021 #endif
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #if GLUT_XLIB_IMPLEMENTATION <= 5 // fix glut function declarations
00042
00043 inline int vgui_glutCreateWindow( const char* title )
00044 {
00045 return glutCreateWindow( const_cast<char*>(title) );
00046 }
00047 #undef glutCreateWindow
00048 #define glutCreateWindow vgui_glutCreateWindow
00049
00050 inline void vgui_glutSetWindowTitle( const char* title )
00051 {
00052 glutSetWindowTitle( const_cast<char*>(title) );
00053 }
00054 #undef glutSetWindowTitle
00055 #define glutSetWindowTitle vgui_glutSetWindowTitle
00056
00057 inline void vgui_glutSetIconTitle( const char* title )
00058 {
00059 glutSetIconTitle( const_cast<char*>(title) );
00060 }
00061 #undef glutSetIconTitle
00062 #define glutSetIconTitle vgui_glutSetIconTitle
00063
00064 inline void vgui_glutAddMenuEntry( const char* label, int value )
00065 {
00066 glutAddMenuEntry( const_cast<char*>(label), value );
00067 }
00068 #undef glutAddMenuEntry
00069 #define glutAddMenuEntry vgui_glutAddMenuEntry
00070
00071 inline void vgui_glutAddSubMenu( const char* label, int sub )
00072 {
00073 glutAddSubMenu( const_cast<char*>(label), sub );
00074 }
00075 #undef glutAddSubMenu
00076 #define glutAddSubMenu vgui_glutAddSubMenu
00077
00078 inline void vgui_glutChangeToMenuEntry( int item, const char* label, int value )
00079 {
00080 glutChangeToMenuEntry( item, const_cast<char*>(label), value );
00081 }
00082 #undef glutChangeToMenuEntry
00083 #define glutChangeToMenuEntry vgui_glutChangeToMenuEntry
00084
00085 inline void vgui_glutChangeToSubMenu( int item, const char* label, int sub )
00086 {
00087 glutChangeToSubMenu( item, const_cast<char*>(label), sub );
00088 }
00089 #define glutChangeToSubMenu vgui_glutChangeToSubMenu
00090
00091 #if (GLUT_API_VERSION >= 2)
00092 inline int vgui_glutExtensionSupported( const char* name )
00093 {
00094 return glutExtensionSupported( const_cast<char*>(name) );
00095 }
00096 #undef glutExtensionSupported
00097 #define glutExtensionSupported vgui_glutExtensionSupported
00098 #endif
00099
00100 #endif // fix glut function declarations
00101
00102 #else // HAS_GLUT
00103 # error "Trying to use vgui_glut when HAS_GLUT is not defined."
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 #endif // HAS_GLUT
00115
00116 #endif // vgui_glut_h