HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 // NV Depth buffer float
33 typedef void (APIENTRYP RE_PFNGLDEPTHRANGEDNVPROC) (GLdouble near, GLdouble far);
34 typedef void (APIENTRYP RE_PFNGLDEPTHBOUNDSDNVPROC) (GLdouble near,GLdouble far);
35 typedef void (APIENTRYP RE_PFNGLCLEARDEPTHDNVPROC) (GLdouble value);
36 
37 #ifndef GL_TEXTURE_MAX_ANISOTROPY
38 #define GL_TEXTURE_MAX_ANISOTROPY 0x84FE
39 #endif
40 #ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY
41 #define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF
42 #endif
43 
44 #ifndef GL_VBO_FREE_MEMORY_ATI
45 #define GL_VBO_FREE_MEMORY_ATI 0x87FB
46 #endif
47 #ifndef GL_TEXTURE_FREE_MEMORY_ATI
48 #define GL_TEXTURE_FREE_MEMORY_ATI 0x87FC
49 #endif
50 #ifndef GL_RENDERBUFFER_FREE_MEMORY_ATI
51 #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD
52 #endif
53 
54 #ifndef GL_GPU_MEM_INFO_TOTAL_AVAILABLE_MEM_NVX
55 #define GL_GPU_MEM_INFO_TOTAL_AVAILABLE_MEM_NVX 0x9048
56 #endif
57 
58 #ifndef GL_POINT_SPRITE
59 #define GL_POINT_SPRITE 0x8861
60 #endif
61 
62 #ifndef GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX
63 #define GL_GPU_MEM_INFO_CURRENT_AVAILABLE_MEM_NVX 0x9049
64 #endif
65 #ifndef GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB
66 #define GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB 0x00000004
67 #endif
68 #ifndef GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB
69 #define GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
70 #endif
71 #ifndef GLX_NO_RESET_NOTIFICATION_ARB
72 #define GLX_NO_RESET_NOTIFICATION_ARB 0x8261
73 #endif
74 #ifndef GLX_LOSE_CONTEXT_ON_RESET_ARB
75 #define GLX_LOSE_CONTEXT_ON_RESET_ARB 0x8252
76 #endif
77 
78 #ifdef WIN32
79 typedef const char * (APIENTRYP RE_PFNWGLGETEXTENSIONSSTRINGPROC)(void);
80 typedef const char * (APIENTRYP RE_PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc);
81 typedef BOOL (APIENTRYP RE_PFNWGLSWAPINTERVALPROC) (int);
82 typedef BOOL (APIENTRYP RE_PFNWGLCHOOSEPIXELFORMATARBPROC)
83  (HDC hdc, const int *piAttribIList,
84  const FLOAT *pfAttribFList,
86  int *piFormats,
87  UINT *nNumFormats);
88 #else
89 #ifndef PFNGLXSWAPINTERVALSGIPROC
90 typedef int (APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int);
91 #else
92 #define RE_PFNGLXSWAPINTERVALSGIPROC PFNGLXSWAPINTERVALSGIPROC
93 #endif
94 #endif
95 
96 // For wglChoosePixelFormat()
97 #if defined(WIN32) && !defined(WGL_NUMBER_PIXEL_FORMATS_ARB)
98 #define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
99 #define WGL_DRAW_TO_WINDOW_ARB 0x2001
100 #define WGL_DRAW_TO_BITMAP_ARB 0x2002
101 #define WGL_ACCELERATION_ARB 0x2003
102 #define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
103 #define WGL_SWAP_METHOD_ARB 0x2007
104 #define WGL_SUPPORT_OPENGL_ARB 0x2010
105 #define WGL_DOUBLE_BUFFER_ARB 0x2011
106 #define WGL_COLOR_BITS_ARB 0x2014
107 #define WGL_RED_BITS_ARB 0x2015
108 #define WGL_RED_SHIFT_ARB 0x2016
109 #define WGL_GREEN_BITS_ARB 0x2017
110 #define WGL_GREEN_SHIFT_ARB 0x2018
111 #define WGL_BLUE_BITS_ARB 0x2019
112 #define WGL_BLUE_SHIFT_ARB 0x201A
113 #define WGL_ALPHA_BITS_ARB 0x201B
114 #define WGL_ALPHA_SHIFT_ARB 0x201C
115 #define WGL_ACCUM_BITS_ARB 0x201D
116 #define WGL_ACCUM_RED_BITS_ARB 0x201E
117 #define WGL_ACCUM_GREEN_BITS_ARB 0x201F
118 #define WGL_ACCUM_BLUE_BITS_ARB 0x2020
119 #define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
120 #define WGL_DEPTH_BITS_ARB 0x2022
121 #define WGL_STENCIL_BITS_ARB 0x2023
122 #define WGL_FULL_ACCELERATION_ARB 0x2027
123 #define WGL_SWAP_EXCHANGE_ARB 0x2028
124 #define WGL_SAMPLE_BUFFERS_ARB 0x2041
125 #define WGL_SAMPLES_ARB 0x2042
126 #endif
127 
128 #ifndef GL_SHADING_LANGUAGE_VERSION
129 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
130 #endif
131 
132 #ifdef WIN32
133 #ifndef WGL_CONTEXT_MAJOR_VERSION_ARB
134 #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
135 #endif
136 #ifndef WGL_CONTEXT_MINOR_VERSION_ARB
137 #define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
138 #endif
139 #ifndef WGL_CONTEXT_LAYER_PLANE_ARB
140 #define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
141 #endif
142 #ifndef WGL_CONTEXT_FLAGS_ARB
143 #define WGL_CONTEXT_FLAGS_ARB 0x2094
144 #endif
145 #ifndef WGL_CONTEXT_PROFILE_MASK_ARB
146 #define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
147 #endif
148 #ifndef WGL_CONTEXT_DEBUG_BIT_ARB
149 #define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
150 #endif
151 #ifndef WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
152 #define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
153 #endif
154 #ifndef WGL_CONTEXT_CORE_PROFILE_BIT_ARB
155 #define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
156 #endif
157 #ifndef WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB
158 #define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
159 #endif
160 #ifndef ERROR_INVALID_VERSION_ARB
161 #define ERROR_INVALID_VERSION_ARB 0x2095
162 #endif
163 
164 typedef HGLRC (APIENTRYP RE_PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hdc,
165  HGLRC share,
166  const int *attrib_list);
167 
168 #endif
169 
170 #endif // __RE_OGL_h__
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
const int const FLOAT UINT int UINT * nNumFormats
Definition: wglew.h:389
GLuint GLenum texunit
Definition: glew.h:9286
typedef HDC(WINAPI *PFNWGLGETCURRENTREADDCARBPROC)(VOID)
GLenum target
Definition: RE_OGL.h:30
unsigned int GLuint
Definition: cl.hpp:167
const int const FLOAT UINT int * piFormats
Definition: wglew.h:389
unsigned int GLenum
Definition: cl.hpp:166
typedef void(APIENTRYP RE_PFNGLBINDMULTITEXTUREEXTPROC)(GLenum texunit
typedef BOOL(WINAPI *PFNWGLSETSTEREOEMITTERSTATE3DLPROC)(HDC hDC
const int const FLOAT * pfAttribFList
Definition: wglew.h:389
const int const FLOAT UINT nMaxFormats
Definition: wglew.h:389
double GLdouble
Definition: glcorearb.h:92
#define APIENTRYP
Definition: glcorearb.h:54
GLsizei const GLfloat * value
Definition: glcorearb.h:823
const int * piAttribIList
Definition: wglew.h:389
typedef HGLRC(WINAPI *PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC)(UINT id)
GLdouble far
Definition: RE_OGL.h:33
GLenum GLuint texture
Definition: RE_OGL.h:30