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 
00032 #ifndef STDFLOAT_DOUBLE
00033 #define GLPf(name) mgl ## name ## f
00034 #define GLPfv(name) mgl ## name ## fv
00035 #else  // STDFLOAT_DOUBLE
00036 #define GLPf(name) mgl ## name ## d
00037 #define GLPfv(name) mgl ## name ## dv
00038 #endif  // STDFLOAT_DOUBLE
00039 
00040   #define GLPREFIX_QUOTED "mgl"
00041   #define USE_MGL_NAMESPACE 1
00042 
00043 #else  // MESA_MGL
00044 
00045 #ifndef STDFLOAT_DOUBLE
00046 #define GLPf(name) gl ## name ## f
00047 #define GLPfv(name) gl ## name ## fv
00048 #else  // STDFLOAT_DOUBLE
00049 #define GLPf(name) gl ## name ## d
00050 #define GLPfv(name) gl ## name ## dv
00051 #endif  // STDFLOAT_DOUBLE
00052 
00053   #define GLP(name) gl##name
00054   #define GLPREFIX_QUOTED "gl"
00055 
00056 #endif  // MESA_MGL
00057 
00058 #define CLP(name) Mesa##name
00059 #define CLASSPREFIX_QUOTED "Mesa"
00060 #define GLSYSTEM_NAME "Mesa"
00061 #define CONFIGOBJ config_mesadisplay
00062 #define GLCAT mesadisplay_cat
00063 #define EXPCL_GL EXPCL_PANDAMESA
00064 #define EXPTP_GL EXPTP_PANDAMESA
00065 
00066 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 2)
00067 #define EXPECT_GL_VERSION_1_2
00068 #endif
00069 
00070 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 3)
00071 #define EXPECT_GL_VERSION_1_3
00072 #endif
00073 
00074 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 4)
00075 #define EXPECT_GL_VERSION_1_4
00076 #endif
00077 
00078 #if MIN_MESA_VERSION_MAJOR > 1 || (MIN_MESA_VERSION_MAJOR == 1 && MIN_MESA_VERSION_MINOR >= 5)
00079 #define EXPECT_GL_VERSION_1_5
00080 #endif
00081 
00082 #if MIN_MESA_VERSION_MAJOR > 2 || (MIN_MESA_VERSION_MAJOR == 2 && MIN_MESA_VERSION_MINOR >= 0)
00083 #define EXPECT_GL_VERSION_2_0
00084 #endif
00085 
00086 #if MIN_MESA_VERSION_MAJOR > 2 || (MIN_MESA_VERSION_MAJOR == 2 && MIN_MESA_VERSION_MINOR >= 1)
00087 #define EXPECT_GL_VERSION_2_1
00088 #endif
00089 
00090 // This prevents glext.h from getting included by gl.h
00091 // That way, we can provide our own, better version.
00092 #define __glext_h_
00093 #define GL_GLEXT_VERSION 0
00094 
00095 #include <GL/gl.h>
00096 #include <GL/osmesa.h>
00097 
00098 #undef GL_GLEXT_VERSION
00099 #include "panda_glext.h"
00100 
00101 #include "glstuff_src.h"
00102 
00103 #endif  // MESAGSG_H
 All Classes Functions Variables Enumerations