1d5f37d9e58ac2caadcf8517b669f53e57b0814f
[WebKit-https.git] / Source / WebCore / platform / graphics / OpenGLShims.h
1 /*
2  *  Copyright (C) 2010 Tieto Corporation.
3  *  Copyright (C) 2011 Igalia S.L.
4  *
5  *  This library is free software; you can redistribute it and/or
6  *  modify it under the terms of the GNU Lesser General Public
7  *  License as published by the Free Software Foundation; either
8  *  version 2.1 of the License, or (at your option) any later version.
9  *
10  *  This library is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  *  Lesser General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Lesser General Public
16  *  License along with this library; if not, write to the Free Software
17  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18  */
19
20 #ifndef OpenGLShims_h
21 #define OpenGLShims_h
22
23 #if PLATFORM(QT)
24 #include <qglobal.h>
25 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
26 #include <qopenglfunctions.h>
27 #include <QOpenGLContext>
28 #include <QSurface>
29 #else
30 #include <QGLContext>
31 #endif
32 #else
33 #include <GL/gl.h>
34 #endif
35
36 #if defined(GL_ES_VERSION_2_0)
37 // Some openGL ES systems miss this typedef.
38 typedef char GLchar;
39 #endif
40
41 typedef struct _OpenGLFunctionTable OpenGLFunctionTable;
42
43 namespace WebCore {
44 bool initializeOpenGLShims();
45 OpenGLFunctionTable* openGLFunctionTable();
46 }
47
48 typedef void (*glActiveTextureType) (GLenum);
49 typedef void (*glAttachShaderType) (GLuint, GLuint);
50 typedef void (*glBindAttribLocationType) (GLuint, GLuint, const char*);
51 typedef void (*glBindBufferType) (GLenum, GLuint);
52 typedef void (*glBindFramebufferType) (GLenum, GLuint);
53 typedef void (*glBindRenderbufferType) (GLenum, GLuint);
54 typedef void (*glBlendColorType) (GLclampf, GLclampf, GLclampf, GLclampf);
55 typedef void (*glBlendEquationType) (GLenum);
56 typedef void (*glBlendEquationSeparateType)(GLenum, GLenum);
57 typedef void (*glBlendFuncSeparateType)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
58 typedef void (*glBlitFramebufferType) (GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
59 typedef void (*glBufferDataType) (GLenum, GLsizeiptr, const GLvoid*, GLenum);
60 typedef void (*glBufferSubDataType) (GLenum, GLintptr, GLsizeiptr, const GLvoid*);
61 typedef GLenum (*glCheckFramebufferStatusType) (GLenum);
62 typedef void (*glCompileShaderType) (GLuint);
63 typedef GLuint (*glCreateProgramType) ();
64 typedef GLuint (*glCreateShaderType) (GLenum);
65 typedef void (*glDeleteBuffersType) (GLsizei, const GLuint*);
66 typedef void (*glDeleteFramebuffersType) (GLsizei n, const GLuint*);
67 typedef void (*glDeleteProgramType) (GLuint);
68 typedef void (*glDeleteRenderbuffersType) (GLsizei n, const GLuint*);
69 typedef void (*glDeleteShaderType) (GLuint);
70 typedef void (*glDetachShaderType) (GLuint, GLuint);
71 typedef void (*glDisableVertexAttribArrayType) (GLuint);
72 typedef void (*glEnableVertexAttribArrayType) (GLuint);
73 typedef void (*glFramebufferRenderbufferType) (GLenum, GLenum, GLenum, GLuint);
74 typedef void (*glFramebufferTexture2DType) (GLenum, GLenum, GLenum, GLuint, GLint);
75 typedef void (*glGenBuffersType) (GLsizei, GLuint*);
76 typedef void (*glGenerateMipmapType) (GLenum target);
77 typedef void (*glGenFramebuffersType) (GLsizei, GLuint*);
78 typedef void (*glGenRenderbuffersType) (GLsizei, GLuint*);
79 typedef void (*glGetActiveAttribType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*);
80 typedef void (*glGetActiveUniformType) (GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*);
81 typedef void (*glGetAttachedShadersType) (GLuint, GLsizei, GLsizei*, GLuint*);
82 typedef GLint (*glGetAttribLocationType) (GLuint, const char*);
83 typedef void (*glGetBufferParameterivType) (GLenum, GLenum, GLint*);
84 typedef void (*glGetFramebufferAttachmentParameterivType) (GLenum, GLenum, GLenum, GLint* params);
85 typedef void (*glGetProgramInfoLogType) (GLuint, GLsizei, GLsizei*, char*);
86 typedef void (*glGetProgramivType) (GLuint, GLenum, GLint*);
87 typedef void (*glGetRenderbufferParameterivType) (GLenum, GLenum, GLint*);
88 typedef void (*glGetShaderInfoLogType) (GLuint, GLsizei, GLsizei*, char*);
89 typedef void (*glGetShaderivType) (GLuint, GLenum, GLint*);
90 typedef void (*glGetShaderSourceType) (GLuint, GLsizei, GLsizei*, char*);
91 typedef GLint (*glGetUniformLocationType) (GLuint, const char*);
92 typedef void (*glGetUniformfvType) (GLuint, GLint, GLfloat*);
93 typedef void (*glGetUniformivType) (GLuint, GLint, GLint*);
94 typedef void (*glGetVertexAttribfvType) (GLuint, GLenum, GLfloat*);
95 typedef void (*glGetVertexAttribivType) (GLuint, GLenum, GLint*);
96 typedef void (*glGetVertexAttribPointervType) (GLuint, GLenum, GLvoid**);
97 typedef GLboolean (*glIsBufferType) (GLuint);
98 typedef GLboolean (*glIsFramebufferType) (GLuint);
99 typedef GLboolean (*glIsProgramType) (GLuint);
100 typedef GLboolean (*glIsRenderbufferType) (GLuint);
101 typedef GLboolean (*glIsShaderType) (GLuint);
102 typedef void (*glLinkProgramType) (GLuint);
103 typedef void (*glRenderbufferStorageType) (GLenum, GLenum, GLsizei, GLsizei);
104 typedef void (*glRenderbufferStorageMultisampleType) (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
105 typedef void (*glSampleCoverageType) (GLclampf, GLboolean);
106 typedef void (*glShaderSourceType) (GLuint, GLsizei, const char**, const GLint*);
107 typedef void (*glStencilFuncSeparateType) (GLenum, GLenum, GLint, GLuint);
108 typedef void (*glStencilMaskSeparateType) (GLenum, GLuint);
109 typedef void (*glStencilOpSeparateType) (GLenum, GLenum, GLenum, GLenum);
110 typedef void (*glUniform1fType) (GLint, GLfloat);
111 typedef void (*glUniform1fvType) (GLint, GLsizei, const GLfloat*);
112 typedef void (*glUniform1iType) (GLint, GLint);
113 typedef void (*glUniform1ivType) (GLint, GLsizei, const GLint*);
114 typedef void (*glUniform2fType) (GLint, GLfloat, GLfloat);
115 typedef void (*glUniform2fvType) (GLint, GLsizei, const GLfloat*);
116 typedef void (*glUniform2iType) (GLint, GLint, GLint);
117 typedef void (*glUniform2ivType) (GLint, GLsizei, const GLint*);
118 typedef void (*glUniform3fType) (GLint, GLfloat, GLfloat, GLfloat);
119 typedef void (*glUniform3fvType) (GLint, GLsizei, const GLfloat*);
120 typedef void (*glUniform3iType) (GLint, GLint, GLint, GLint);
121 typedef void (*glUniform3ivType) (GLint, GLsizei, const GLint*);
122 typedef void (*glUniform4fType) (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
123 typedef void (*glUniform4fvType) (GLint, GLsizei, const GLfloat*);
124 typedef void (*glUniform4iType) (GLint, GLint, GLint, GLint, GLint);
125 typedef void (*glUniform4ivType) (GLint, GLsizei, const GLint*);
126 typedef void (*glUniformMatrix2fvType) (GLint, GLsizei, GLboolean, const GLfloat*);
127 typedef void (*glUniformMatrix3fvType) (GLint, GLsizei, GLboolean, const GLfloat*);
128 typedef void (*glUniformMatrix4fvType) (GLint, GLsizei, GLboolean, const GLfloat*);
129 typedef void (*glUseProgramType) (GLuint);
130 typedef void (*glValidateProgramType) (GLuint);
131 typedef void (*glVertexAttrib1fType) (GLuint, const GLfloat);
132 typedef void (*glVertexAttrib1fvType) (GLuint, const GLfloat*);
133 typedef void (*glVertexAttrib2fType) (GLuint, const GLfloat, const GLfloat);
134 typedef void (*glVertexAttrib2fvType) (GLuint, const GLfloat*);
135 typedef void (*glVertexAttrib3fType) (GLuint, const GLfloat, const GLfloat, const GLfloat);
136 typedef void (*glVertexAttrib3fvType) (GLuint, const GLfloat*);
137 typedef void (*glVertexAttrib4fType) (GLuint, const GLfloat, const GLfloat, const GLfloat, const GLfloat);
138 typedef void (*glVertexAttrib4fvType) (GLuint, const GLfloat*);
139 typedef void (*glVertexAttribPointerType) (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*);
140
141 #define FUNCTION_TABLE_ENTRY(FunctionName) FunctionName##Type FunctionName
142
143 typedef struct _OpenGLFunctionTable {
144     FUNCTION_TABLE_ENTRY(glActiveTexture);
145     FUNCTION_TABLE_ENTRY(glAttachShader);
146     FUNCTION_TABLE_ENTRY(glBindAttribLocation);
147     FUNCTION_TABLE_ENTRY(glBindBuffer);
148     FUNCTION_TABLE_ENTRY(glBindFramebuffer);
149     FUNCTION_TABLE_ENTRY(glBindRenderbuffer);
150     FUNCTION_TABLE_ENTRY(glBlendColor);
151     FUNCTION_TABLE_ENTRY(glBlendEquation);
152     FUNCTION_TABLE_ENTRY(glBlendEquationSeparate);
153     FUNCTION_TABLE_ENTRY(glBlendFuncSeparate);
154     FUNCTION_TABLE_ENTRY(glBlitFramebuffer);
155     FUNCTION_TABLE_ENTRY(glBufferData);
156     FUNCTION_TABLE_ENTRY(glBufferSubData);
157     FUNCTION_TABLE_ENTRY(glCheckFramebufferStatus);
158     FUNCTION_TABLE_ENTRY(glCompileShader);
159     FUNCTION_TABLE_ENTRY(glCreateProgram);
160     FUNCTION_TABLE_ENTRY(glCreateShader);
161     FUNCTION_TABLE_ENTRY(glDeleteBuffers);
162     FUNCTION_TABLE_ENTRY(glDeleteFramebuffers);
163     FUNCTION_TABLE_ENTRY(glDeleteProgram);
164     FUNCTION_TABLE_ENTRY(glDeleteRenderbuffers);
165     FUNCTION_TABLE_ENTRY(glDeleteShader);
166     FUNCTION_TABLE_ENTRY(glDetachShader);
167     FUNCTION_TABLE_ENTRY(glDisableVertexAttribArray);
168     FUNCTION_TABLE_ENTRY(glEnableVertexAttribArray);
169     FUNCTION_TABLE_ENTRY(glFramebufferRenderbuffer);
170     FUNCTION_TABLE_ENTRY(glFramebufferTexture2D);
171     FUNCTION_TABLE_ENTRY(glGenBuffers);
172     FUNCTION_TABLE_ENTRY(glGenerateMipmap);
173     FUNCTION_TABLE_ENTRY(glGenFramebuffers);
174     FUNCTION_TABLE_ENTRY(glGenRenderbuffers);
175     FUNCTION_TABLE_ENTRY(glGetActiveAttrib);
176     FUNCTION_TABLE_ENTRY(glGetActiveUniform);
177     FUNCTION_TABLE_ENTRY(glGetAttachedShaders);
178     FUNCTION_TABLE_ENTRY(glGetAttribLocation);
179     FUNCTION_TABLE_ENTRY(glGetBufferParameteriv);
180     FUNCTION_TABLE_ENTRY(glGetFramebufferAttachmentParameteriv);
181     FUNCTION_TABLE_ENTRY(glGetProgramInfoLog);
182     FUNCTION_TABLE_ENTRY(glGetProgramiv);
183     FUNCTION_TABLE_ENTRY(glGetRenderbufferParameteriv);
184     FUNCTION_TABLE_ENTRY(glGetShaderInfoLog);
185     FUNCTION_TABLE_ENTRY(glGetShaderiv);
186     FUNCTION_TABLE_ENTRY(glGetShaderSource);
187     FUNCTION_TABLE_ENTRY(glGetUniformfv);
188     FUNCTION_TABLE_ENTRY(glGetUniformiv);
189     FUNCTION_TABLE_ENTRY(glGetUniformLocation);
190     FUNCTION_TABLE_ENTRY(glGetVertexAttribfv);
191     FUNCTION_TABLE_ENTRY(glGetVertexAttribiv);
192     FUNCTION_TABLE_ENTRY(glGetVertexAttribPointerv);
193     FUNCTION_TABLE_ENTRY(glIsBuffer);
194     FUNCTION_TABLE_ENTRY(glIsFramebuffer);
195     FUNCTION_TABLE_ENTRY(glIsProgram);
196     FUNCTION_TABLE_ENTRY(glIsRenderbuffer);
197     FUNCTION_TABLE_ENTRY(glIsShader);
198     FUNCTION_TABLE_ENTRY(glLinkProgram);
199     FUNCTION_TABLE_ENTRY(glRenderbufferStorage);
200     FUNCTION_TABLE_ENTRY(glRenderbufferStorageMultisample);
201     FUNCTION_TABLE_ENTRY(glSampleCoverage);
202     FUNCTION_TABLE_ENTRY(glShaderSource);
203     FUNCTION_TABLE_ENTRY(glStencilFuncSeparate);
204     FUNCTION_TABLE_ENTRY(glStencilMaskSeparate);
205     FUNCTION_TABLE_ENTRY(glStencilOpSeparate);
206     FUNCTION_TABLE_ENTRY(glUniform1f);
207     FUNCTION_TABLE_ENTRY(glUniform1fv);
208     FUNCTION_TABLE_ENTRY(glUniform1i);
209     FUNCTION_TABLE_ENTRY(glUniform1iv);
210     FUNCTION_TABLE_ENTRY(glUniform2f);
211     FUNCTION_TABLE_ENTRY(glUniform2fv);
212     FUNCTION_TABLE_ENTRY(glUniform2i);
213     FUNCTION_TABLE_ENTRY(glUniform2iv);
214     FUNCTION_TABLE_ENTRY(glUniform3f);
215     FUNCTION_TABLE_ENTRY(glUniform3fv);
216     FUNCTION_TABLE_ENTRY(glUniform3i);
217     FUNCTION_TABLE_ENTRY(glUniform3iv);
218     FUNCTION_TABLE_ENTRY(glUniform4f);
219     FUNCTION_TABLE_ENTRY(glUniform4fv);
220     FUNCTION_TABLE_ENTRY(glUniform4i);
221     FUNCTION_TABLE_ENTRY(glUniform4iv);
222     FUNCTION_TABLE_ENTRY(glUniformMatrix2fv);
223     FUNCTION_TABLE_ENTRY(glUniformMatrix3fv);
224     FUNCTION_TABLE_ENTRY(glUniformMatrix4fv);
225     FUNCTION_TABLE_ENTRY(glUseProgram);
226     FUNCTION_TABLE_ENTRY(glValidateProgram);
227     FUNCTION_TABLE_ENTRY(glVertexAttrib1f);
228     FUNCTION_TABLE_ENTRY(glVertexAttrib1fv);
229     FUNCTION_TABLE_ENTRY(glVertexAttrib2f);
230     FUNCTION_TABLE_ENTRY(glVertexAttrib2fv);
231     FUNCTION_TABLE_ENTRY(glVertexAttrib3f);
232     FUNCTION_TABLE_ENTRY(glVertexAttrib3fv);
233     FUNCTION_TABLE_ENTRY(glVertexAttrib4f);
234     FUNCTION_TABLE_ENTRY(glVertexAttrib4fv);
235     FUNCTION_TABLE_ENTRY(glVertexAttribPointer);
236 } OpenGLFunctionTable;
237
238 // We disable the shims for OpenGLShims.cpp, so that we can set them.
239 #ifndef DISABLE_SHIMS
240 #define LOOKUP_GL_FUNCTION(Function) WebCore::openGLFunctionTable()->Function
241 #define glActiveTexture                        LOOKUP_GL_FUNCTION(glActiveTexture)
242 #define glAttachShader                         LOOKUP_GL_FUNCTION(glAttachShader)
243 #define glBindAttribLocation                   LOOKUP_GL_FUNCTION(glBindAttribLocation)
244 #define glBindBuffer                           LOOKUP_GL_FUNCTION(glBindBuffer)
245 #define glBindFramebufferEXT                   glBindFramebuffer
246 #define glBindFramebuffer                      LOOKUP_GL_FUNCTION(glBindFramebuffer)
247 #define glBindRenderbufferEXT                  glBindRenderbuffer
248 #define glBindRenderbuffer                     LOOKUP_GL_FUNCTION(glBindRenderbuffer)
249 #define glBlendColor                           LOOKUP_GL_FUNCTION(glBlendColor)
250 #define glBlendEquation                        LOOKUP_GL_FUNCTION(glBlendEquation)
251 #define glBlendEquationSeparate                LOOKUP_GL_FUNCTION(glBlendEquationSeparate)
252 #define glBlendFuncSeparate                    LOOKUP_GL_FUNCTION(glBlendFuncSeparate)
253 #define glBlitFramebufferEXT                   glBlitFramebuffer
254 #define glBlitFramebuffer                      LOOKUP_GL_FUNCTION(glBlitFramebuffer)
255 #define glBufferData                           LOOKUP_GL_FUNCTION(glBufferData)
256 #define glBufferSubData                        LOOKUP_GL_FUNCTION(glBufferSubData)
257 #define glCheckFramebufferStatusEXT            glCheckFramebufferStatus
258 #define glCheckFramebufferStatus               LOOKUP_GL_FUNCTION(glCheckFramebufferStatus)
259 #define glCompileShader                        LOOKUP_GL_FUNCTION(glCompileShader)
260 #define glCreateProgram                        LOOKUP_GL_FUNCTION(glCreateProgram)
261 #define glCreateShader                         LOOKUP_GL_FUNCTION(glCreateShader)
262 #define glDeleteBuffers                        LOOKUP_GL_FUNCTION(glDeleteBuffers)
263 #define glDeleteFramebuffersEXT                glDeleteFramebuffers
264 #define glDeleteFramebuffers                   LOOKUP_GL_FUNCTION(glDeleteFramebuffers)
265 #define glDeleteProgram                        LOOKUP_GL_FUNCTION(glDeleteProgram)
266 #define glDeleteRenderbuffersEXT               glDeleteRenderbuffers
267 #define glDeleteRenderbuffers                  LOOKUP_GL_FUNCTION(glDeleteRenderbuffers)
268 #define glDeleteShader                         LOOKUP_GL_FUNCTION(glDeleteShader)
269 #define glDetachShader                         LOOKUP_GL_FUNCTION(glDetachShader)
270 #define glDisableVertexAttribArray             LOOKUP_GL_FUNCTION(glDisableVertexAttribArray)
271 #define glEnableVertexAttribArray              LOOKUP_GL_FUNCTION(glEnableVertexAttribArray)
272 #define glFramebufferRenderbufferEXT           glFramebufferRenderbuffer
273 #define glFramebufferRenderbuffer              LOOKUP_GL_FUNCTION(glFramebufferRenderbuffer)
274 #define glFramebufferTexture2DEXT              glFramebufferTexture2D
275 #define glFramebufferTexture2D                 LOOKUP_GL_FUNCTION(glFramebufferTexture2D)
276 #define glGenBuffers                           LOOKUP_GL_FUNCTION(glGenBuffers)
277 #define glGenerateMipmapEXT                    glGenerateMipmap
278 #define glGenerateMipmap                       LOOKUP_GL_FUNCTION(glGenerateMipmap)
279 #define glGenFramebuffersEXT                   glGenFramebuffers
280 #define glGenFramebuffers                      LOOKUP_GL_FUNCTION(glGenFramebuffers)
281 #define glGenRenderbuffersEXT                  glGenRenderbuffers
282 #define glGenRenderbuffers                     LOOKUP_GL_FUNCTION(glGenRenderbuffers)
283 #define glGetActiveAttrib                      LOOKUP_GL_FUNCTION(glGetActiveAttrib)
284 #define glGetActiveUniform                     LOOKUP_GL_FUNCTION(glGetActiveUniform)
285 #define glGetAttachedShaders                   LOOKUP_GL_FUNCTION(glGetAttachedShaders)
286 #define glGetAttribLocation                    LOOKUP_GL_FUNCTION(glGetAttribLocation)
287 #define glGetBufferParameterivEXT              glGetBufferParameteriv
288 #define glGetBufferParameteriv                 LOOKUP_GL_FUNCTION(glGetBufferParameteriv)
289 #define glGetFramebufferAttachmentParameterivEXT glGetFramebufferAttachmentParameteriv
290 #define glGetFramebufferAttachmentParameteriv  LOOKUP_GL_FUNCTION(glGetFramebufferAttachmentParameteriv)
291 #define glGetProgramInfoLog                    LOOKUP_GL_FUNCTION(glGetProgramInfoLog)
292 #define glGetProgramiv                         LOOKUP_GL_FUNCTION(glGetProgramiv)
293 #define glGetRenderbufferParameterivEXT        glGetRenderbufferParameteriv
294 #define glGetRenderbufferParameteriv           LOOKUP_GL_FUNCTION(glGetRenderbufferParameteriv)
295 #define glGetShaderInfoLog                     LOOKUP_GL_FUNCTION(glGetShaderInfoLog)
296 #define glGetShaderiv                          LOOKUP_GL_FUNCTION(glGetShaderiv)
297 #define glGetShaderSource                      LOOKUP_GL_FUNCTION(glGetShaderSource)
298 #define glGetUniformfv                         LOOKUP_GL_FUNCTION(glGetUniformfv)
299 #define glGetUniformiv                         LOOKUP_GL_FUNCTION(glGetUniformiv)
300 #define glGetUniformLocation                   LOOKUP_GL_FUNCTION(glGetUniformLocation)
301 #define glGetVertexAttribfv                    LOOKUP_GL_FUNCTION(glGetVertexAttribfv)
302 #define glGetVertexAttribiv                    LOOKUP_GL_FUNCTION(glGetVertexAttribiv)
303 #define glGetVertexAttribPointerv              LOOKUP_GL_FUNCTION(glGetVertexAttribPointerv)
304 #define glIsBuffer                             LOOKUP_GL_FUNCTION(glIsBuffer)
305 #define glIsFramebufferEXT                     glIsFramebuffer
306 #define glIsFramebuffer                        LOOKUP_GL_FUNCTION(glIsFramebuffer)
307 #define glIsProgram                            LOOKUP_GL_FUNCTION(glIsProgram)
308 #define glIsRenderbufferEXT                    glIsRenderbuffer
309 #define glIsRenderbuffer                       LOOKUP_GL_FUNCTION(glIsRenderbuffer)
310 #define glIsShader                             LOOKUP_GL_FUNCTION(glIsShader)
311 #define glLinkProgram                          LOOKUP_GL_FUNCTION(glLinkProgram)
312 #define glRenderbufferStorageEXT               glRenderbufferStorage
313 #define glRenderbufferStorage                  LOOKUP_GL_FUNCTION(glRenderbufferStorage)
314 #define glRenderbufferStorageMultisampleEXT    glRenderbufferStorageMultisample
315 #define glRenderbufferStorageMultisample       LOOKUP_GL_FUNCTION(glRenderbufferStorageMultisample)
316 #define glSampleCoverage                       LOOKUP_GL_FUNCTION(glSampleCoverage)
317 #define glShaderSource                         LOOKUP_GL_FUNCTION(glShaderSource)
318 #define glStencilFuncSeparate                  LOOKUP_GL_FUNCTION(glStencilFuncSeparate)
319 #define glStencilMaskSeparate                  LOOKUP_GL_FUNCTION(glStencilMaskSeparate)
320 #define glStencilOpSeparate                    LOOKUP_GL_FUNCTION(glStencilOpSeparate)
321 #define glUniform1f                            LOOKUP_GL_FUNCTION(glUniform1f)
322 #define glUniform1fv                           LOOKUP_GL_FUNCTION(glUniform1fv)
323 #define glUniform1i                            LOOKUP_GL_FUNCTION(glUniform1i)
324 #define glUniform1iv                           LOOKUP_GL_FUNCTION(glUniform1iv)
325 #define glUniform2f                            LOOKUP_GL_FUNCTION(glUniform2f)
326 #define glUniform2fv                           LOOKUP_GL_FUNCTION(glUniform2fv)
327 #define glUniform2i                            LOOKUP_GL_FUNCTION(glUniform2i)
328 #define glUniform2iv                           LOOKUP_GL_FUNCTION(glUniform2iv)
329 #define glUniform3f                            LOOKUP_GL_FUNCTION(glUniform3f)
330 #define glUniform3fv                           LOOKUP_GL_FUNCTION(glUniform3fv)
331 #define glUniform3i                            LOOKUP_GL_FUNCTION(glUniform3i)
332 #define glUniform3iv                           LOOKUP_GL_FUNCTION(glUniform3iv)
333 #define glUniform4f                            LOOKUP_GL_FUNCTION(glUniform4f)
334 #define glUniform4fv                           LOOKUP_GL_FUNCTION(glUniform4fv)
335 #define glUniform4i                            LOOKUP_GL_FUNCTION(glUniform4i)
336 #define glUniform4iv                           LOOKUP_GL_FUNCTION(glUniform4iv)
337 #define glUniformMatrix2fv                     LOOKUP_GL_FUNCTION(glUniformMatrix2fv)
338 #define glUniformMatrix3fv                     LOOKUP_GL_FUNCTION(glUniformMatrix3fv)
339 #define glUniformMatrix4fv                     LOOKUP_GL_FUNCTION(glUniformMatrix4fv)
340 #define glUseProgram                           LOOKUP_GL_FUNCTION(glUseProgram)
341 #define glValidateProgram                      LOOKUP_GL_FUNCTION(glValidateProgram)
342 #define glVertexAttrib1f                       LOOKUP_GL_FUNCTION(glVertexAttrib1f)
343 #define glVertexAttrib1fv                      LOOKUP_GL_FUNCTION(glVertexAttrib1fv)
344 #define glVertexAttrib2f                       LOOKUP_GL_FUNCTION(glVertexAttrib2f)
345 #define glVertexAttrib2fv                      LOOKUP_GL_FUNCTION(glVertexAttrib2fv)
346 #define glVertexAttrib3f                       LOOKUP_GL_FUNCTION(glVertexAttrib3f)
347 #define glVertexAttrib3fv                      LOOKUP_GL_FUNCTION(glVertexAttrib3fv)
348 #define glVertexAttrib4f                       LOOKUP_GL_FUNCTION(glVertexAttrib4f)
349 #define glVertexAttrib4fv                      LOOKUP_GL_FUNCTION(glVertexAttrib4fv)
350 #define glVertexAttribPointer                  LOOKUP_GL_FUNCTION(glVertexAttribPointer)
351 #endif
352
353 #endif