Panda3D
glgsg.h
1 // Filename: glgsg.h
2 // Created by: drose (09Feb04)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef GLGSG_H
16 #define GLGSG_H
17 
18 // This is the actual header file to include if you want to pick up
19 // any or all of the header files in this directory as compiled to use
20 // the "true" GL library.
21 
22 #include "pandabase.h"
23 #include "config_glgsg.h"
24 
25 #define GLP(name) gl ## name
26 
27 #ifndef STDFLOAT_DOUBLE
28 #define GLPf(name) gl ## name ## f
29 #define GLPfv(name) gl ## name ## fv
30 #else // STDFLOAT_DOUBLE
31 #define GLPf(name) gl ## name ## d
32 #define GLPfv(name) gl ## name ## dv
33 #endif // STDFLOAT_DOUBLE
34 
35 #define CLP(name) GL ## name
36 #define GLPREFIX_QUOTED "gl"
37 #define CLASSPREFIX_QUOTED "GL"
38 #define GLSYSTEM_NAME "OpenGL"
39 #define CONFIGOBJ config_glgsg
40 #define GLCAT glgsg_cat
41 #define EXPCL_GL EXPCL_PANDAGL
42 #define EXPTP_GL EXPTP_PANDAGL
43 
44 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 2)
45 #define EXPECT_GL_VERSION_1_2
46 #endif
47 
48 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 3)
49 #define EXPECT_GL_VERSION_1_3
50 #endif
51 
52 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 4)
53 #define EXPECT_GL_VERSION_1_4
54 #endif
55 
56 #if MIN_GL_VERSION_MAJOR > 1 || (MIN_GL_VERSION_MAJOR == 1 && MIN_GL_VERSION_MINOR >= 5)
57 #define EXPECT_GL_VERSION_1_5
58 #endif
59 
60 #if MIN_GL_VERSION_MAJOR > 2 || (MIN_GL_VERSION_MAJOR == 2 && MIN_GL_VERSION_MINOR >= 0)
61 #define EXPECT_GL_VERSION_2_0
62 #endif
63 
64 #if MIN_GL_VERSION_MAJOR > 2 || (MIN_GL_VERSION_MAJOR == 2 && MIN_GL_VERSION_MINOR >= 1)
65 #define EXPECT_GL_VERSION_2_1
66 #endif
67 
68 // Before including gl.h, need to include windows.h
69 #if defined(_WIN32)
70 #ifndef WIN32_LEAN_AND_MEAN
71 #define WIN32_LEAN_AND_MEAN 1
72 #endif
73 #include <windows.h>
74 #endif
75 
76 // This prevents glext.h from getting included by gl.h
77 // That way, we can provide our own, better version.
78 #define __glext_h_
79 #define GL_GLEXT_VERSION 0
80 
81 #ifdef IS_OSX
82  #include <OpenGL/gl.h>
83 #else
84  #include <GL/gl.h>
85 #endif
86 
87 #undef GL_GLEXT_VERSION
88 #include "panda_glext.h"
89 
90 #include "glstuff_src.h"
91 
92 #endif // GLGSG_H