core/vgui/vgui_gl.h
Go to the documentation of this file.
00001 #ifndef vgui_gl_h
00002 #define vgui_gl_h
00003 //:
00004 // \file
00005 
00006 #include <vcl_compiler.h>
00007 #include <vgui/vgui_config.h>
00008 
00009 #if defined(VCL_WIN32) && !defined(__CYGWIN__)
00010 // fix windows gl.h :
00011 # include <windows.h>
00012 # ifdef VCL_VC // exclude when using MinGW
00013 #  pragma warning (disable:4244) // disable bogus conversion warnings
00014 # endif
00015 # include <GL/gl.h>
00016 # undef min
00017 # undef max
00018 // Fix wxWidgets incompatibility with windows.h. Some macros defined by
00019 // windows.h have the same name as wxWidgets classes.
00020 # ifdef __WXMSW__
00021 #  include <wx/msw/winundef.h>
00022 # endif
00023 #elif defined(__APPLE__)
00024 #include <OpenGL/gl.h>
00025 #else
00026 // no need to fix :
00027 # include <GL/gl.h>
00028 #endif
00029 
00030 // If the value is defined from outside, don't try to guess
00031 #ifndef VGUI_MESA
00032 #  define VGUI_MESA 0
00033 #  if (defined(MESA) || defined(GL_MESA_window_pos) || defined(GL_MESA_resize_buffers))
00034     // xmesa.h is not distributed with Cygwin
00035 #    ifndef __CYGWIN__
00036 #    ifndef NO_MESA
00037 #      undef VGUI_MESA
00038 #      define VGUI_MESA 1
00039 #    endif
00040 #    endif
00041 #  endif
00042 #endif
00043 
00044 // capes - Some defines for OpenGL < v1.2 implementations
00045 // The numbers are those in the GL 1.2 spec.
00046 // These are only used in mapping between GL formats and
00047 // accelerated renderers, so no harm done...
00048 #ifndef GL_ABGR_EXT
00049 #  define GL_ABGR_EXT 0x8000
00050 #endif
00051 #ifndef GL_BGR
00052 #  define GL_BGR 0x80E0
00053 #endif
00054 #ifndef GL_BGRA
00055 #  define GL_BGRA 0x80E1
00056 #endif
00057 #ifndef GL_UNSIGNED_SHORT_5_6_5
00058 #  define GL_UNSIGNED_SHORT_5_6_5 0x8363
00059 #endif
00060 
00061 // awf: more (similar) defines for win32...
00062 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
00063 #  define GL_UNSIGNED_SHORT_5_5_5_1  0x8034
00064 #endif
00065 #ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV
00066 #  define GL_UNSIGNED_SHORT_1_5_5_5_REV  0x8066
00067 #endif
00068 
00069 #endif // vgui_gl_h