Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
glext_funcs.h
Go to the documentation of this file.
1 /* Copyright (c) 2011 Wildfire Games
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining
4  * a copy of this software and associated documentation files (the
5  * "Software"), to deal in the Software without restriction, including
6  * without limitation the rights to use, copy, modify, merge, publish,
7  * distribute, sublicense, and/or sell copies of the Software, and to
8  * permit persons to whom the Software is furnished to do so, subject to
9  * the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 /*
24  * OpenGL extension function declarations (X macros).
25  */
26 
27 #include "lib/config2.h" // CONFIG2_GLES
28 
29 #if CONFIG2_GLES
30 # include <GLES2/gl2ext.h>
31 #elif OS_MACOSX
32 # include <OpenGL/glext.h>
33 #else
34 # include <GL/glext.h>
35 #endif
36 
37 #if OS_WIN
38 # include <GL/wglext.h>
39 #endif
40 
41 /*
42 
43 FUNC is used for functions that are only extensions.
44 FUNC2 is used for functions that have been promoted to core features.
45 FUNC3 is used for functions that have been promoted to core features
46 but have slightly changed semantics and need to be referred to by their
47 core name instead of extension name.
48 
49 The FUNC2/FUNC3 calls include the version of OpenGL in which the extension was promoted,
50 and the pre- and post-promotion names (e.g. "glBindBufferARB" vs "glBindBuffer").
51 
52 If the GL driver is advertising a sufficiently high version, we load the promoted
53 name; otherwise we use the *ARB name. (The spec says:
54  "GL implementations of such later revisions should continue to export the name
55  strings of promoted extensions in the EXTENSIONS string, and continue to support
56  the ARB-affixed versions of functions and enumerants as a transition aid."
57 but some drivers might be stupid/buggy and fail to do that, so we don't just use
58 the ARB names unconditionally.)
59 
60 The names are made accessible to engine code only via the ARB name, to make it
61 obvious that care must be taken (i.e. by being certain that the extension is
62 actually supported).
63 
64 */
65 
66 #if CONFIG2_GLES
67 
68 // no GLES extensions used yet
69 
70 // some functions that are extensions in GL are core functions in GLES,
71 // so we should use them without the function pointer indirection
72 #define pglActiveTextureARB glActiveTexture
73 #define pglBlendColorEXT glBlendColor
74 #define pglBlendEquationEXT glBlendEquation
75 #define pglClientActiveTextureARB glClientActiveTexture
76 #define pglCompressedTexImage2DARB glCompressedTexImage2D
77 
78 #define pglAttachObjectARB glAttachShader
79 #define pglBindAttribLocationARB glBindAttribLocation
80 #define pglCompileShaderARB glCompileShader
81 #define pglCreateProgramObjectARB glCreateProgram
82 #define pglCreateShaderObjectARB glCreateShader
83 #define pglDeleteProgram glDeleteProgram
84 #define pglDeleteShader glDeleteShader
85 #define pglDisableVertexAttribArrayARB glDisableVertexAttribArray
86 #define pglEnableVertexAttribArrayARB glEnableVertexAttribArray
87 #define pglGetActiveUniformARB glGetActiveUniform
88 #define pglGetProgramiv glGetProgramiv
89 #define pglGetProgramInfoLog glGetProgramInfoLog
90 #define pglGetShaderiv glGetShaderiv
91 #define pglGetShaderInfoLog glGetShaderInfoLog
92 #define pglGetUniformLocationARB glGetUniformLocation
93 #define pglLinkProgramARB glLinkProgram
94 #define pglShaderSourceARB glShaderSource
95 #define pglUniform1fARB glUniform1i
96 #define pglUniform2fARB glUniform2f
97 #define pglUniform3fARB glUniform3f
98 #define pglUniform4fARB glUniform4f
99 #define pglUniform1iARB glUniform1i
100 #define pglUniformMatrix4fvARB glUniformMatrix4fv
101 #define pglUseProgramObjectARB glUseProgram
102 #define pglVertexAttribPointerARB glVertexAttribPointer
103 
104 #define pglBindBufferARB glBindBuffer
105 #define pglBufferDataARB glBufferData
106 #define pglBufferSubDataARB glBufferSubData
107 #define pglDeleteBuffersARB glDeleteBuffers
108 #define pglGenBuffersARB glGenBuffers
109 
110 #define pglBindFramebufferEXT glBindFramebuffer
111 #define pglCheckFramebufferStatusEXT glCheckFramebufferStatus
112 #define pglDeleteFramebuffersEXT glDeleteFramebuffers
113 #define pglFramebufferTexture2DEXT glFramebufferTexture2D
114 #define pglGenFramebuffersEXT glGenFramebuffers
115 
116 #define GL_DEPTH_ATTACHMENT_EXT GL_DEPTH_ATTACHMENT
117 #define GL_COLOR_ATTACHMENT0_EXT GL_COLOR_ATTACHMENT0
118 #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE
119 #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER
120 
121 #define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE // TODO: should fix code that relies on GL_CLAMP_TO_BORDER
122 
123 typedef GLuint GLhandleARB;
124 
125 #else
126 
127 // were these defined as real functions in gl.h already?
128 
129 // GL_EXT_draw_range_elements / GL1.2:
130 FUNC2(void, glDrawRangeElementsEXT, glDrawRangeElements, "1.2", (GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid*))
131 
132 // GL_ARB_multitexture / GL1.3:
133 FUNC2(void, glMultiTexCoord2fARB, glMultiTexCoord2f, "1.3", (int, float, float))
134 FUNC2(void, glMultiTexCoord3fARB, glMultiTexCoord3f, "1.3", (int, float, float, float))
135 FUNC2(void, glActiveTextureARB, glActiveTexture, "1.3", (int))
136 FUNC2(void, glClientActiveTextureARB, glClientActiveTexture, "1.3", (int))
137 
138 // GL_EXT_blend_color / GL1.4 (optional in 1.2):
139 FUNC2(void, glBlendColorEXT, glBlendColor, "1.4", (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha))
140 
141 // GL_EXT_blend_minmax / GL1.4 (optional in 1.2):
142 FUNC2(void, glBlendEquationEXT, glBlendEquation, "1.4", (GLenum mode))
143 
144 // GL_ARB_vertex_buffer_object / GL1.5:
145 FUNC2(void, glBindBufferARB, glBindBuffer, "1.5", (int target, GLuint buffer))
146 FUNC2(void, glDeleteBuffersARB, glDeleteBuffers, "1.5", (GLsizei n, const GLuint* buffers))
147 FUNC2(void, glGenBuffersARB, glGenBuffers, "1.5", (GLsizei n, GLuint* buffers))
148 FUNC2(bool, glIsBufferARB, glIsBuffer, "1.5", (GLuint buffer))
149 FUNC2(void, glBufferDataARB, glBufferData, "1.5", (int target, GLsizeiptrARB size, const void* data, int usage))
150 FUNC2(void, glBufferSubDataARB, glBufferSubData, "1.5", (int target, GLintptrARB offset, GLsizeiptrARB size, const void* data))
151 FUNC2(void, glGetBufferSubDataARB, glGetBufferSubData, "1.5", (int target, GLintptrARB offset, GLsizeiptrARB size, void* data))
152 FUNC2(void*, glMapBufferARB, glMapBuffer, "1.5", (int target, int access))
153 FUNC2(bool, glUnmapBufferARB, glUnmapBuffer, "1.5", (int target))
154 FUNC2(void, glGetBufferParameterivARB, glGetBufferParameteriv, "1.5", (int target, int pname, int* params))
155 FUNC2(void, glGetBufferPointervARB, glGetBufferPointerv, "1.5", (int target, int pname, void** params))
156 
157 // GL_ARB_texture_compression / GL1.3
158 FUNC2(void, glCompressedTexImage3DARB, glCompressedTexImage3D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))
159 FUNC2(void, glCompressedTexImage2DARB, glCompressedTexImage2D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*))
160 FUNC2(void, glCompressedTexImage1DARB, glCompressedTexImage1D, "1.3", (GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid*))
161 FUNC2(void, glCompressedTexSubImage3DARB, glCompressedTexSubImage3D, "1.3", (GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))
162 FUNC2(void, glCompressedTexSubImage2DARB, glCompressedTexSubImage2D, "1.3", (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*))
163 FUNC2(void, glCompressedTexSubImage1DARB, glCompressedTexSubImage1D, "1.3", (GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid*))
164 FUNC2(void, glGetCompressedTexImageARB, glGetCompressedTexImage, "1.3", (GLenum, GLint, GLvoid*))
165 
166 // GL_EXT_framebuffer_object
167 FUNC(GLboolean, glIsRenderbufferEXT, (GLuint renderbuffer))
168 FUNC(void, glBindRenderbufferEXT, (GLenum target, GLuint renderbuffer))
169 FUNC(void, glDeleteRenderbuffersEXT, (GLsizei n, const GLuint *renderbuffers))
170 FUNC(void, glGenRenderbuffersEXT, (GLsizei n, GLuint *renderbuffers))
171 FUNC(void, glRenderbufferStorageEXT, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height))
172 FUNC(void, glGetRenderbufferParameterivEXT, (GLenum target, GLenum pname, GLint *params))
173 FUNC(GLboolean, glIsFramebufferEXT, (GLuint framebuffer))
174 FUNC(void, glBindFramebufferEXT, (GLenum target, GLuint framebuffer))
175 FUNC(void, glDeleteFramebuffersEXT, (GLsizei n, const GLuint *framebuffers))
176 FUNC(void, glGenFramebuffersEXT, (GLsizei n, GLuint *framebuffers))
177 FUNC(GLenum, glCheckFramebufferStatusEXT, (GLenum target))
178 FUNC(void, glFramebufferTexture1DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level))
179 FUNC(void, glFramebufferTexture2DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level))
180 FUNC(void, glFramebufferTexture3DEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset))
181 FUNC(void, glFramebufferRenderbufferEXT, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer))
182 FUNC(void, glGetFramebufferAttachmentParameterivEXT, (GLenum target, GLenum attachment, GLenum pname, GLint *params))
183 FUNC(void, glGenerateMipmapEXT, (GLenum target))
184 FUNC(void, glBlitFramebufferEXT, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter))
185 FUNC(void, glDrawBuffers, (GLsizei n, const GLenum *bufs))
186 
187 // GL_ARB_vertex_program, GL_ARB_fragment_program
188 FUNC(void, glProgramStringARB, (GLenum target, GLenum format, GLsizei len, const GLvoid *string))
189 FUNC(void, glBindProgramARB, (GLenum target, GLuint program))
190 FUNC(void, glDeleteProgramsARB, (GLsizei n, const GLuint *programs))
191 FUNC(void, glGenProgramsARB, (GLsizei n, GLuint *programs))
192 FUNC(void, glProgramEnvParameter4dARB, (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
193 FUNC(void, glProgramEnvParameter4dvARB, (GLenum target, GLuint index, const GLdouble *params))
194 FUNC(void, glProgramEnvParameter4fARB, (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
195 FUNC(void, glProgramEnvParameter4fvARB, (GLenum target, GLuint index, const GLfloat *params))
196 FUNC(void, glProgramLocalParameter4dARB, (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w))
197 FUNC(void, glProgramLocalParameter4dvARB, (GLenum target, GLuint index, const GLdouble *params))
198 FUNC(void, glProgramLocalParameter4fARB, (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w))
199 FUNC(void, glProgramLocalParameter4fvARB, (GLenum target, GLuint index, const GLfloat *params))
200 FUNC(void, glGetProgramEnvParameterdvARB, (GLenum target, GLuint index, GLdouble *params))
201 FUNC(void, glGetProgramEnvParameterfvARB, (GLenum target, GLuint index, GLfloat *params))
202 FUNC(void, glGetProgramLocalParameterdvARB, (GLenum target, GLuint index, GLdouble *params))
203 FUNC(void, glGetProgramLocalParameterfvARB, (GLenum target, GLuint index, GLfloat *params))
204 FUNC(void, glGetProgramivARB, (GLenum target, GLenum pname, GLint *params))
205 FUNC(void, glGetProgramStringARB, (GLenum target, GLenum pname, GLvoid *string))
206 FUNC(GLboolean, glIsProgramARB, (GLuint program))
207 
208 // GL_ARB_shader_objects
209 // (NOTE: Many of these have "Object" in their ARB names, but "Program" or "Shader" in their core names.
210 // When both Program and Shader versions exist, we use FUNC3 here and the engine must call the specific
211 // core name instead of the generic ARB name.)
212 FUNC3(void, glDeleteObjectARB, glDeleteShader, "2.0", (GLhandleARB obj))
213 FUNC3(void, glDeleteObjectARB, glDeleteProgram, "2.0", (GLhandleARB obj))
214 // FUNC2(GLhandleARB, glGetHandleARB, glGetHandle, "2.0", (GLenum pname))
215  // there is no analog to the ARB function in GL 2.0 (the functionality is probably moved into glGetIntegerv(GL_CURRENT_PROGRAM))
216  // so we can't represent it in this FUNC2 system, so just pretend it doesn't exist
217 FUNC2(void, glDetachObjectARB, glDetachShader, "2.0", (GLhandleARB containerObj, GLhandleARB attachedObj))
218 FUNC2(GLhandleARB, glCreateShaderObjectARB, glCreateShader, "2.0", (GLenum shaderType))
219 FUNC2(void, glShaderSourceARB, glShaderSource, "2.0", (GLhandleARB shaderObj, GLsizei count, const char **string, const GLint *length))
220 FUNC2(void, glCompileShaderARB, glCompileShader, "2.0", (GLhandleARB shaderObj))
221 FUNC2(GLhandleARB, glCreateProgramObjectARB, glCreateProgram, "2.0", (void))
222 FUNC2(void, glAttachObjectARB, glAttachShader, "2.0", (GLhandleARB containerObj, GLhandleARB obj))
223 FUNC2(void, glLinkProgramARB, glLinkProgram, "2.0", (GLhandleARB programObj))
224 FUNC2(void, glUseProgramObjectARB, glUseProgram, "2.0", (GLhandleARB programObj))
225 FUNC2(void, glValidateProgramARB, glValidateProgram, "2.0", (GLhandleARB programObj))
226 FUNC2(void, glUniform1fARB, glUniform1f, "2.0", (GLint location, GLfloat v0))
227 FUNC2(void, glUniform2fARB, glUniform2f, "2.0", (GLint location, GLfloat v0, GLfloat v1))
228 FUNC2(void, glUniform3fARB, glUniform3f, "2.0", (GLint location, GLfloat v0, GLfloat v1, GLfloat v2))
229 FUNC2(void, glUniform4fARB, glUniform4f, "2.0", (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
230 FUNC2(void, glUniform1iARB, glUniform1i, "2.0", (GLint location, GLint v0))
231 FUNC2(void, glUniform2iARB, glUniform2i, "2.0", (GLint location, GLint v0, GLint v1))
232 FUNC2(void, glUniform3iARB, glUniform3i, "2.0", (GLint location, GLint v0, GLint v1, GLint v2))
233 FUNC2(void, glUniform4iARB, glUniform4i, "2.0", (GLint location, GLint v0, GLint v1, GLint v2, GLint v3))
234 FUNC2(void, glUniform1fvARB, glUniform1fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
235 FUNC2(void, glUniform2fvARB, glUniform2fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
236 FUNC2(void, glUniform3fvARB, glUniform3fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
237 FUNC2(void, glUniform4fvARB, glUniform4fv, "2.0", (GLint location, GLsizei count, const GLfloat *value))
238 FUNC2(void, glUniform1ivARB, glUniform1iv, "2.0", (GLint location, GLsizei count, const GLint *value))
239 FUNC2(void, glUniform2ivARB, glUniform2iv, "2.0", (GLint location, GLsizei count, const GLint *value))
240 FUNC2(void, glUniform3ivARB, glUniform3iv, "2.0", (GLint location, GLsizei count, const GLint *value))
241 FUNC2(void, glUniform4ivARB, glUniform4iv, "2.0", (GLint location, GLsizei count, const GLint *value))
242 FUNC2(void, glUniformMatrix2fvARB, glUniformMatrix2fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
243 FUNC2(void, glUniformMatrix3fvARB, glUniformMatrix3fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
244 FUNC2(void, glUniformMatrix4fvARB, glUniformMatrix4fv, "2.0", (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value))
245 FUNC3(void, glGetObjectParameterfvARB, glGetProgramfv, "2.0", (GLhandleARB obj, GLenum pname, GLfloat *params))
246 FUNC3(void, glGetObjectParameterfvARB, glGetShaderfv, "2.0", (GLhandleARB obj, GLenum pname, GLfloat *params))
247 FUNC3(void, glGetObjectParameterivARB, glGetProgramiv, "2.0", (GLhandleARB obj, GLenum pname, GLint *params))
248 FUNC3(void, glGetObjectParameterivARB, glGetShaderiv, "2.0", (GLhandleARB obj, GLenum pname, GLint *params))
249 FUNC3(void, glGetInfoLogARB, glGetProgramInfoLog, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, char *infoLog))
250 FUNC3(void, glGetInfoLogARB, glGetShaderInfoLog, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, char *infoLog))
251 FUNC2(void, glGetAttachedObjectsARB, glGetAttachedShaders, "2.0", (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj))
252 FUNC2(GLint, glGetUniformLocationARB, glGetUniformLocation, "2.0", (GLhandleARB programObj, const char *name))
253 FUNC2(void, glGetActiveUniformARB, glGetActiveUniform, "2.0", (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, char *name))
254 FUNC2(void, glGetUniformfvARB, glGetUniformfv, "2.0", (GLhandleARB programObj, GLint location, GLfloat *params))
255 FUNC2(void, glGetUniformivARB, glGetUniformiv, "2.0", (GLhandleARB programObj, GLint location, GLint *params))
256 FUNC2(void, glGetShaderSourceARB, glGetShaderSource, "2.0", (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source))
257 
258 // GL_ARB_vertex_shader
259 FUNC2(void, glVertexAttrib1fARB, glVertexAttrib1f, "2.0", (GLuint index, GLfloat v0))
260 FUNC2(void, glVertexAttrib1sARB, glVertexAttrib1s, "2.0", (GLuint index, GLshort v0))
261 FUNC2(void, glVertexAttrib1dARB, glVertexAttrib1d, "2.0", (GLuint index, GLdouble v0))
262 FUNC2(void, glVertexAttrib2fARB, glVertexAttrib2f, "2.0", (GLuint index, GLfloat v0, GLfloat v1))
263 FUNC2(void, glVertexAttrib2sARB, glVertexAttrib2s, "2.0", (GLuint index, GLshort v0, GLshort v1))
264 FUNC2(void, glVertexAttrib2dARB, glVertexAttrib2d, "2.0", (GLuint index, GLdouble v0, GLdouble v1))
265 FUNC2(void, glVertexAttrib3fARB, glVertexAttrib3f, "2.0", (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2))
266 FUNC2(void, glVertexAttrib3sARB, glVertexAttrib3s, "2.0", (GLuint index, GLshort v0, GLshort v1, GLshort v2))
267 FUNC2(void, glVertexAttrib3dARB, glVertexAttrib3d, "2.0", (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2))
268 FUNC2(void, glVertexAttrib4fARB, glVertexAttrib4f, "2.0", (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3))
269 FUNC2(void, glVertexAttrib4sARB, glVertexAttrib4s, "2.0", (GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3))
270 FUNC2(void, glVertexAttrib4dARB, glVertexAttrib4d, "2.0", (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3))
271 FUNC2(void, glVertexAttrib4NubARB, glVertexAttrib4Nub, "2.0", (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w))
272 FUNC2(void, glVertexAttrib1fvARB, glVertexAttrib1fv, "2.0", (GLuint index, const GLfloat *v))
273 FUNC2(void, glVertexAttrib1svARB, glVertexAttrib1sv, "2.0", (GLuint index, const GLshort *v))
274 FUNC2(void, glVertexAttrib1dvARB, glVertexAttrib1dv, "2.0", (GLuint index, const GLdouble *v))
275 FUNC2(void, glVertexAttrib2fvARB, glVertexAttrib2fv, "2.0", (GLuint index, const GLfloat *v))
276 FUNC2(void, glVertexAttrib2svARB, glVertexAttrib2sv, "2.0", (GLuint index, const GLshort *v))
277 FUNC2(void, glVertexAttrib2dvARB, glVertexAttrib2dv, "2.0", (GLuint index, const GLdouble *v))
278 FUNC2(void, glVertexAttrib3fvARB, glVertexAttrib3fv, "2.0", (GLuint index, const GLfloat *v))
279 FUNC2(void, glVertexAttrib3svARB, glVertexAttrib3sv, "2.0", (GLuint index, const GLshort *v))
280 FUNC2(void, glVertexAttrib3dvARB, glVertexAttrib3dv, "2.0", (GLuint index, const GLdouble *v))
281 FUNC2(void, glVertexAttrib4fvARB, glVertexAttrib4fv, "2.0", (GLuint index, const GLfloat *v))
282 FUNC2(void, glVertexAttrib4svARB, glVertexAttrib4sv, "2.0", (GLuint index, const GLshort *v))
283 FUNC2(void, glVertexAttrib4dvARB, glVertexAttrib4dv, "2.0", (GLuint index, const GLdouble *v))
284 FUNC2(void, glVertexAttrib4ivARB, glVertexAttrib4iv, "2.0", (GLuint index, const GLint *v))
285 FUNC2(void, glVertexAttrib4bvARB, glVertexAttrib4bv, "2.0", (GLuint index, const GLbyte *v))
286 FUNC2(void, glVertexAttrib4ubvARB, glVertexAttrib4ubv, "2.0", (GLuint index, const GLubyte *v))
287 FUNC2(void, glVertexAttrib4usvARB, glVertexAttrib4usv, "2.0", (GLuint index, const GLushort *v))
288 FUNC2(void, glVertexAttrib4uivARB, glVertexAttrib4uiv, "2.0", (GLuint index, const GLuint *v))
289 FUNC2(void, glVertexAttrib4NbvARB, glVertexAttrib4Nbv, "2.0", (GLuint index, const GLbyte *v))
290 FUNC2(void, glVertexAttrib4NsvARB, glVertexAttrib4Nsv, "2.0", (GLuint index, const GLshort *v))
291 FUNC2(void, glVertexAttrib4NivARB, glVertexAttrib4Niv, "2.0", (GLuint index, const GLint *v))
292 FUNC2(void, glVertexAttrib4NubvARB, glVertexAttrib4Nubv, "2.0", (GLuint index, const GLubyte *v))
293 FUNC2(void, glVertexAttrib4NusvARB, glVertexAttrib4Nusv, "2.0", (GLuint index, const GLushort *v))
294 FUNC2(void, glVertexAttrib4NuivARB, glVertexAttrib4Nuiv, "2.0", (GLuint index, const GLuint *v))
295 FUNC2(void, glVertexAttribPointerARB, glVertexAttribPointer, "2.0", (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer))
296 FUNC2(void, glEnableVertexAttribArrayARB, glEnableVertexAttribArray, "2.0", (GLuint index))
297 FUNC2(void, glDisableVertexAttribArrayARB, glDisableVertexAttribArray, "2.0", (GLuint index))
298 FUNC2(void, glBindAttribLocationARB, glBindAttribLocation, "2.0", (GLhandleARB programObj, GLuint index, const char *name))
299 FUNC2(void, glGetActiveAttribARB, glGetActiveAttrib, "2.0", (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, int *size, GLenum *type, char *name))
300 FUNC2(GLint, glGetAttribLocationARB, glGetAttribLocation, "2.0", (GLhandleARB programObj, const char *name))
301 FUNC2(void, glGetVertexAttribdvARB, glGetVertexAttribdv, "2.0", (GLuint index, GLenum pname, GLdouble *params))
302 FUNC2(void, glGetVertexAttribfvARB, glGetVertexAttribfv, "2.0", (GLuint index, GLenum pname, GLfloat *params))
303 FUNC2(void, glGetVertexAttribivARB, glGetVertexAttribiv, "2.0", (GLuint index, GLenum pname, GLint *params))
304 FUNC2(void, glGetVertexAttribPointervARB, glGetVertexAttribPointerv, "2.0", (GLuint index, GLenum pname, void **pointer))
305 
306 // GL_EXT_gpu_shader4 / GL3.0:
307 FUNC2(void, glVertexAttribI1iEXT, glVertexAttribI1i, "3.0", (GLuint index, GLint x))
308 FUNC2(void, glVertexAttribI2iEXT, glVertexAttribI2i, "3.0", (GLuint index, GLint x, GLint y))
309 FUNC2(void, glVertexAttribI3iEXT, glVertexAttribI3i, "3.0", (GLuint index, GLint x, GLint y, GLint z))
310 FUNC2(void, glVertexAttribI4iEXT, glVertexAttribI4i, "3.0", (GLuint index, GLint x, GLint y, GLint z, GLint w))
311 FUNC2(void, glVertexAttribI1uiEXT, glVertexAttribI1ui, "3.0", (GLuint index, GLuint x))
312 FUNC2(void, glVertexAttribI2uiEXT, glVertexAttribI2ui, "3.0", (GLuint index, GLuint x, GLuint y))
313 FUNC2(void, glVertexAttribI3uiEXT, glVertexAttribI3ui, "3.0", (GLuint index, GLuint x, GLuint y, GLuint z))
314 FUNC2(void, glVertexAttribI4uiEXT, glVertexAttribI4ui, "3.0", (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w))
315 FUNC2(void, glVertexAttribI1ivEXT, glVertexAttribI1iv, "3.0", (GLuint index, const GLint *v))
316 FUNC2(void, glVertexAttribI2ivEXT, glVertexAttribI2iv, "3.0", (GLuint index, const GLint *v))
317 FUNC2(void, glVertexAttribI3ivEXT, glVertexAttribI3iv, "3.0", (GLuint index, const GLint *v))
318 FUNC2(void, glVertexAttribI4ivEXT, glVertexAttribI4iv, "3.0", (GLuint index, const GLint *v))
319 FUNC2(void, glVertexAttribI1uivEXT, glVertexAttribI1uiv, "3.0", (GLuint index, const GLuint *v))
320 FUNC2(void, glVertexAttribI2uivEXT, glVertexAttribI2uiv, "3.0", (GLuint index, const GLuint *v))
321 FUNC2(void, glVertexAttribI3uivEXT, glVertexAttribI3uiv, "3.0", (GLuint index, const GLuint *v))
322 FUNC2(void, glVertexAttribI4uivEXT, glVertexAttribI4uiv, "3.0", (GLuint index, const GLuint *v))
323 FUNC2(void, glVertexAttribI4bvEXT, glVertexAttribI4bv, "3.0", (GLuint index, const GLbyte *v))
324 FUNC2(void, glVertexAttribI4svEXT, glVertexAttribI4sv, "3.0", (GLuint index, const GLshort *v))
325 FUNC2(void, glVertexAttribI4ubvEXT, glVertexAttribI4ubv, "3.0", (GLuint index, const GLubyte *v))
326 FUNC2(void, glVertexAttribI4usvEXT, glVertexAttribI4usv, "3.0", (GLuint index, const GLushort *v))
327 FUNC2(void, glVertexAttribIPointerEXT, glVertexAttribIPointer, "3.0", (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer))
328 FUNC2(void, glGetVertexAttribIivEXT, glGetVertexAttribIiv, "3.0", (GLuint index, GLenum pname, GLint *params))
329 FUNC2(void, glGetVertexAttribIuivEXT, glGetVertexAttribIuiv, "3.0", (GLuint index, GLenum pname, GLuint *params))
330 FUNC2(void, glUniform1uiEXT, glUniform1ui, "3.0", (GLint location, GLuint v0))
331 FUNC2(void, glUniform2uiEXT, glUniform2ui, "3.0", (GLint location, GLuint v0, GLuint v1))
332 FUNC2(void, glUniform3uiEXT, glUniform3ui, "3.0", (GLint location, GLuint v0, GLuint v1, GLuint v2))
333 FUNC2(void, glUniform4uiEXT, glUniform4ui, "3.0", (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3))
334 FUNC2(void, glUniform1uivEXT, glUniform1uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
335 FUNC2(void, glUniform2uivEXT, glUniform2uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
336 FUNC2(void, glUniform3uivEXT, glUniform3uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
337 FUNC2(void, glUniform4uivEXT, glUniform4uiv, "3.0", (GLint location, GLsizei count, const GLuint *value))
338 FUNC2(void, glGetUniformuivEXT, glGetUniformuiv, "3.0", (GLuint program, GLint location, GLuint *params))
339 FUNC2(void, glBindFragDataLocationEXT, glBindFragDataLocation, "3.0", (GLuint program, GLuint colorNumber, const char *name))
340 FUNC2(GLint, glGetFragDataLocationEXT, glGetFragDataLocation, "3.0", (GLuint program, const char *name))
341 
342 // GL_ARB_occlusion_query / GL1.5:
343 FUNC2(void, glGenQueriesARB, glGenQueries, "1.5", (GLsizei n, GLuint *ids))
344 FUNC2(void, glDeleteQueriesARB, glDeleteQueries, "1.5", (GLsizei n, const GLuint *ids))
345 FUNC2(GLboolean, glIsQueryARB, glIsQuery, "1.5", (GLuint id))
346 FUNC2(void, glBeginQueryARB, glBeginQuery, "1.5", (GLenum target, GLuint id))
347 FUNC2(void, glEndQueryARB, glEndQuery, "1.5", (GLenum target))
348 FUNC2(void, glGetQueryivARB, glGetQueryiv, "1.5", (GLenum target, GLenum pname, GLint *params))
349 FUNC2(void, glGetQueryObjectivARB, glGetQueryObjectiv, "1.5", (GLuint id, GLenum pname, GLint *params))
350 FUNC2(void, glGetQueryObjectuivARB, glGetQueryObjectuiv, "1.5", (GLuint id, GLenum pname, GLuint *params))
351 
352 // GL_ARB_sync / GL3.2:
353 FUNC2(void, glGetInteger64v, glGetInteger64v, "3.2", (GLenum pname, GLint64 *params))
354 
355 // GL_EXT_timer_query:
356 FUNC(void, glGetQueryObjecti64vEXT, (GLuint id, GLenum pname, GLint64 *params))
357 FUNC(void, glGetQueryObjectui64vEXT, (GLuint id, GLenum pname, GLuint64 *params))
358 
359 // GL_ARB_timer_query / GL3.3:
360 FUNC2(void, glQueryCounter, glQueryCounter, "3.3", (GLuint id, GLenum target))
361 FUNC2(void, glGetQueryObjecti64v, glGetQueryObjecti64v, "3.3", (GLuint id, GLenum pname, GLint64 *params))
362 FUNC2(void, glGetQueryObjectui64v, glGetQueryObjectui64v, "3.3", (GLuint id, GLenum pname, GLuint64 *params))
363 
364 // GL_GREMEDY_string_marker (from gDEBugger)
365 FUNC(int, glStringMarkerGREMEDY, (GLsizei len, const GLvoid *string))
366 
367 // GL_INTEL_performance_queries (undocumented, may be unstable, use at own risk;
368 // see http://zaynar.co.uk/docs/gl-intel-performance-queries.html)
369 FUNC(void, glGetFirstPerfQueryIdINTEL, (GLuint *queryId))
370 FUNC(void, glGetNextPerfQueryIdINTEL, (GLuint prevQueryId, GLuint *queryId))
371 FUNC(void, glGetPerfQueryInfoINTEL, (GLuint queryId, GLuint nameMaxLength, char *name, GLuint *counterBufferSize, GLuint *numCounters, GLuint *maxQueries, GLuint *))
372 FUNC(void, glGetPerfCounterInfoINTEL, (GLuint queryId, GLuint counterId, GLuint nameMaxLength, char *name, GLuint descMaxLength, char *desc, GLuint *offset, GLuint *size, GLuint *usage, GLuint *type, GLuint64 *))
373 FUNC(void, glCreatePerfQueryINTEL, (GLuint queryId, GLuint *id))
374 FUNC(void, glBeginPerfQueryINTEL, (GLuint id))
375 FUNC(void, glEndPerfQueryINTEL, (GLuint id))
376 FUNC(void, glDeletePerfQueryINTEL, (GLuint id))
377 FUNC(void, glGetPerfQueryDataINTEL, (GLuint id, GLenum requestType, GLuint maxLength, char *buffer, GLuint *length))
378 
379 #endif // #if CONFIG_GLES2
380 
381 
382 #if OS_WIN
383 // WGL_EXT_swap_control
384 FUNC(int, wglSwapIntervalEXT, (int))
385 
386 // WGL_ARB_pbuffer
387 FUNC(HPBUFFERARB, wglCreatePbufferARB, (HDC, int, int, int, const int*))
388 FUNC(HDC, wglGetPbufferDCARB, (HPBUFFERARB))
389 FUNC(int, wglReleasePbufferDCARB, (HPBUFFERARB, HDC))
390 FUNC(int, wglDestroyPbufferARB, (HPBUFFERARB))
391 FUNC(int, wglQueryPbufferARB, (HPBUFFERARB, int, int*))
392 
393 // GL_ARB_pixel_format
394 FUNC(int, wglGetPixelFormatAttribivARB, (HDC, int, int, unsigned int, const int*, int*))
395 FUNC(int, wglGetPixelFormatAttribfvARB, (HDC, int, int, unsigned int, const int*, float*))
396 FUNC(int, wglChoosePixelFormatARB, (HDC, const int *, const float*, unsigned int, int*, unsigned int*))
397 #endif // OS_WIN
int64_t GLint64
Definition: ogl.h:120
#define FUNC3(ret, nameARB, nameCore, version, params)
Definition: ogl.cpp:53
uint64_t GLuint64
Definition: ogl.h:121
#define FUNC(ret, name, params)
Definition: dbghelp.h:143
#define FUNC2(ret, nameARB, nameCore, version, params)
Definition: ogl.cpp:52