HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RE_OGL.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: RE_OGL.h (C++)
7  *
8  * COMMENTS: Cross-platform wrapper for OpenGL
9  *
10  */
11 
12 #ifndef __RE_OGL_h__
13 #define __RE_OGL_h__
14 
15 #include <glcorearb.h>
16 
17 // Prevent GL.h from being included.
18 #define __gl_h_
19 #define __GL_H__
20 
21 #ifndef GL_POLYGON
22 #define GL_POLYGON 9
23 #endif
24 
25 #include <stddef.h>
26 
27 #include <SYS/SYS_Types.h>
28 
29 // Direct State access
30 typedef void (APIENTRYP RE_PFNGLBINDMULTITEXTUREEXTPROC) (GLenum texunit, GLenum target, GLuint texture);
31 
32 #ifndef GL_TEXTURE_MAX_ANISOTROPY
33 #define GL_TEXTURE_MAX_ANISOTROPY 0x84FE
34 #endif
35 #ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY
36 #define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF
37 #endif
38 
39 #ifndef GL_VBO_FREE_MEMORY_ATI
40 #define GL_VBO_FREE_MEMORY_ATI 0x87FB
41 #endif
42 #ifndef GL_TEXTURE_FREE_MEMORY_ATI
43 #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
44 #endif
45 #ifndef GL_RENDERBUFFER_FREE_MEMORY_ATI
46 #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
47 #endif
48 
49 #ifndef GL_GPU_MEM_INFO_TOTAL_AVAILABLE_MEM_NVX
50 #define GL_GPU_MEM_INFO_TOTAL_AVAILABLE_MEM_NVX 0x9048
51 #endif
52 
53 #ifndef GL_POINT_SPRITE
54 #define GL_POINT_SPRITE 0x8861
55 #endif
56 
57 #ifndef GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX
58 #define GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX 0x9049
59 #endif
60 #ifndef GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB
61 #define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
62 #endif
63 #ifndef GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB
64 #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
65 #endif
66 #ifndef GLX_NO_RESET_NOTIFICATION_ARB
67 #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
68 #endif
69 #ifndef GLX_LOSE_CONTEXT_ON_RESET_ARB
70 #define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
71 #endif
72 
73 #ifdef WIN32
74 typedef const char * (APIENTRYP RE_PFNWGLGETEXTENSIONSSTRINGPROC)(void);
75 typedef const char * (APIENTRYP RE_PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
76 typedef BOOL (APIENTRYP RE_PFNWGLSWAPINTERVALPROC) (int);
77 typedef BOOL (APIENTRYP RE_PFNWGLCHOOSEPIXELFORMATARBPROC)
78  (HDC hdc, const int *piAttribIList,
79  const FLOAT *pfAttribFList,
80  UINT nMaxFormats,
81  int *piFormats,
82  UINT *nNumFormats);
83 #else
84 #ifndef PFNGLXSWAPINTERVALSGIPROC
85 typedef int (APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int);
86 #else
87 #define RE_PFNGLXSWAPINTERVALSGIPROC PFNGLXSWAPINTERVALSGIPROC
88 #endif
89 #endif
90 
91 // For wglChoosePixelFormat()
92 #if defined(WIN32) && !defined(WGL_NUMBER_PIXEL_FORMATS_ARB)
93 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
94 #define WGL_DRAW_TO_WINDOW_ARB 0x2001
95 #define WGL_DRAW_TO_BITMAP_ARB 0x2002
96 #define WGL_ACCELERATION_ARB 0x2003
97 #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
98 #define WGL_SWAP_METHOD_ARB 0x2007
99 #define WGL_SUPPORT_OPENGL_ARB 0x2010
100 #define WGL_DOUBLE_BUFFER_ARB 0x2011
101 #define WGL_COLOR_BITS_ARB 0x2014
102 #define WGL_RED_BITS_ARB 0x2015
103 #define WGL_RED_SHIFT_ARB 0x2016
104 #define WGL_GREEN_BITS_ARB 0x2017
105 #define WGL_GREEN_SHIFT_ARB 0x2018
106 #define WGL_BLUE_BITS_ARB 0x2019
107 #define WGL_BLUE_SHIFT_ARB 0x201A
108 #define WGL_ALPHA_BITS_ARB 0x201B
109 #define WGL_ALPHA_SHIFT_ARB 0x201C
110 #define WGL_ACCUM_BITS_ARB 0x201D
111 #define WGL_ACCUM_RED_BITS_ARB 0x201E
112 #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
113 #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
114 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
115 #define WGL_DEPTH_BITS_ARB 0x2022
116 #define WGL_STENCIL_BITS_ARB 0x2023
117 #define WGL_FULL_ACCELERATION_ARB 0x2027
118 #define WGL_SWAP_EXCHANGE_ARB 0x2028
119 #define WGL_SAMPLE_BUFFERS_ARB 0x2041
120 #define WGL_SAMPLES_ARB 0x2042
121 #endif
122 
123 #ifndef GL_SHADING_LANGUAGE_VERSION
124 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
125 #endif
126 
127 #ifdef WIN32
128 #ifndef WGL_CONTEXT_MAJOR_VERSION_ARB
129 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
130 #endif
131 #ifndef WGL_CONTEXT_MINOR_VERSION_ARB
132 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
133 #endif
134 #ifndef WGL_CONTEXT_LAYER_PLANE_ARB
135 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
136 #endif
137 #ifndef WGL_CONTEXT_FLAGS_ARB
138 #define WGL_CONTEXT_FLAGS_ARB 0x2094
139 #endif
140 #ifndef WGL_CONTEXT_PROFILE_MASK_ARB
141 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
142 #endif
143 #ifndef WGL_CONTEXT_DEBUG_BIT_ARB
144 #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
145 #endif
146 #ifndef WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
147 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
148 #endif
149 #ifndef WGL_CONTEXT_CORE_PROFILE_BIT_ARB
150 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
151 #endif
152 #ifndef WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB
153 #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
154 #endif
155 #ifndef ERROR_INVALID_VERSION_ARB
156 #define ERROR_INVALID_VERSION_ARB 0x2095
157 #endif
158 
159 typedef HGLRC (APIENTRYP RE_PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hdc,
160  HGLRC share,
161  const int *attrib_list);
162 
163 #endif
164 
165 #endif // __RE_OGL_h__
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
GLenum target
Definition: RE_OGL.h:30
unsigned int GLuint
Definition: cl.hpp:167
unsigned int GLenum
Definition: cl.hpp:166
typedef void(APIENTRYP RE_PFNGLBINDMULTITEXTUREEXTPROC)(GLenum texunit
#define APIENTRYP
Definition: glcorearb.h:54
GLenum GLuint texture
Definition: RE_OGL.h:30