Panda3D

mesagsg.h

00001 // Filename: mesagsg.h
00002 // Created by:  drose (09Feb04)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef MESAGSG_H
00016 #define MESAGSG_H
00017 
00018 // This is the actual header file to include if you want to pick up
00019 // any or all of the header files in this directory as compiled to use
00020 // the Mesa library.
00021 
00022 #include "pandabase.h"
00023 #include "config_mesadisplay.h"
00024 
00025 // This stuff seems to crash with Mesa.
00026 #undef HAVE_CG
00027 #undef HAVE_CGGL
00028 
00029 #ifdef MESA_MGL
00030   #define GLP(name) mgl##name
00031   #define GLPREFIX_QUOTED "mgl"
00032   #define USE_MGL_NAMESPACE 1
00033 #else
00034   #define GLP(name) gl##name
00035   #define GLPREFIX_QUOTED "gl"
00036 #endif
00037 #define CLP(name) Mesa##name
00038 #define CLASSPREFIX_QUOTED "Mesa"
00039 #define GLSYSTEM_NAME "Mesa"
00040 #define CONFIGOBJ config_mesadisplay
00041 #define GLCAT mesadisplay_cat
00042 #define EXPCL_GL EXPCL_PANDAMESA
00043 #define EXPTP_GL EXPTP_PANDAMESA
00044 
00045 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 2)
00046 #define EXPECT_GL_VERSION_1_2
00047 #endif
00048 
00049 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 3)
00050 #define EXPECT_GL_VERSION_1_3
00051 #endif
00052 
00053 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 4)
00054 #define EXPECT_GL_VERSION_1_4
00055 #endif
00056 
00057 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 5)
00058 #define EXPECT_GL_VERSION_1_5
00059 #endif
00060 
00061 #if MIN_MESA_VERSION_MAJOR > 2 || (MIN_MESA_VERSION_MAJOR == 2 && MIN_MESA_VERSION_MINOR >= 0)
00062 #define EXPECT_GL_VERSION_2_0
00063 #endif
00064 
00065 #if MIN_MESA_VERSION_MAJOR > 2 || (MIN_MESA_VERSION_MAJOR == 2 && MIN_MESA_VERSION_MINOR >= 1)
00066 #define EXPECT_GL_VERSION_2_1
00067 #endif
00068 
00069 // This prevents glext.h from getting included by gl.h
00070 // That way, we can provide our own, better version.
00071 #define __glext_h_
00072 #define GL_GLEXT_VERSION 0
00073 
00074 #include <GL/gl.h>
00075 #include <GL/osmesa.h>
00076 
00077 #undef GL_GLEXT_VERSION
00078 #include "panda_glext.h"
00079 
00080 #include "glstuff_src.h"
00081 
00082 #endif  // MESAGSG_H
 All Classes Functions Variables Enumerations