Panda3D
 All Classes Functions Variables Enumerations
glgsg.h
00001 // Filename: glgsg.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 GLGSG_H
00016 #define GLGSG_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 "true" GL library.
00021 
00022 #include "pandabase.h"
00023 #include "config_glgsg.h"
00024 
00025 #define GLP(name) gl ## name
00026 
00027 #ifndef STDFLOAT_DOUBLE
00028 #define GLPf(name) gl ## name ## f
00029 #define GLPfv(name) gl ## name ## fv
00030 #else  // STDFLOAT_DOUBLE
00031 #define GLPf(name) gl ## name ## d
00032 #define GLPfv(name) gl ## name ## dv
00033 #endif  // STDFLOAT_DOUBLE
00034 
00035 #define CLP(name) GL ## name
00036 #define GLPREFIX_QUOTED "gl"
00037 #define CLASSPREFIX_QUOTED "GL"
00038 #define GLSYSTEM_NAME "OpenGL"
00039 #define CONFIGOBJ config_glgsg
00040 #define GLCAT glgsg_cat
00041 #define EXPCL_GL EXPCL_PANDAGL
00042 #define EXPTP_GL EXPTP_PANDAGL
00043 
00044 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 2)
00045 #define EXPECT_GL_VERSION_1_2
00046 #endif
00047 
00048 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 3)
00049 #define EXPECT_GL_VERSION_1_3
00050 #endif
00051 
00052 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 4)
00053 #define EXPECT_GL_VERSION_1_4
00054 #endif
00055 
00056 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 5)
00057 #define EXPECT_GL_VERSION_1_5
00058 #endif
00059 
00060 #if MIN_GL_VERSION_MAJOR > 2 || (MIN_GL_VERSION_MAJOR == 2 && MIN_GL_VERSION_MINOR >= 0)
00061 #define EXPECT_GL_VERSION_2_0
00062 #endif
00063 
00064 #if MIN_GL_VERSION_MAJOR > 2 || (MIN_GL_VERSION_MAJOR == 2 && MIN_GL_VERSION_MINOR >= 1)
00065 #define EXPECT_GL_VERSION_2_1
00066 #endif
00067 
00068 // Before including gl.h, need to include windows.h
00069 #if defined(_WIN32)
00070 #define WIN32_LEAN_AND_MEAN 1
00071 #include <windows.h>
00072 #endif
00073 
00074 // This prevents glext.h from getting included by gl.h
00075 // That way, we can provide our own, better version.
00076 #define __glext_h_
00077 #define GL_GLEXT_VERSION 0
00078 
00079 #ifdef IS_OSX
00080   #include <OpenGL/gl.h>
00081 #else
00082   #include <GL/gl.h>
00083 #endif
00084 
00085 #undef GL_GLEXT_VERSION
00086 #include "panda_glext.h"
00087 
00088 #include "glstuff_src.h"
00089 
00090 #endif  // GLGSG_H
 All Classes Functions Variables Enumerations