|
1 | | -/* WARNING: This file was automatically generated */ |
2 | | -/* Do not edit. */ |
3 | | - |
4 | 1 | #include "flextGL.h" |
5 | 2 | #include "GLFW/glfw3.h" |
6 | 3 |
|
7 | | -#include <stdio.h> |
8 | | - |
9 | | - |
10 | 4 | #ifdef __cplusplus |
11 | 5 | extern "C" { |
12 | 6 | #endif |
13 | 7 |
|
14 | | - |
15 | | -void flextLoadOpenGLFunctions(OpenGLBindings *bindings); |
16 | | - |
17 | | -int flextInit(GLFWwindow* window, OpenGLBindings *bindings) |
18 | | -{ |
19 | | - |
20 | | - int major = glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MAJOR); |
21 | | - int minor = glfwGetWindowAttrib(window, GLFW_CONTEXT_VERSION_MINOR); |
22 | | - |
23 | | - flextLoadOpenGLFunctions(bindings); |
24 | | - |
25 | | - /* --- Check for minimal version and profile --- */ |
26 | | - |
27 | | - if (major * 10 + minor < 33) { |
28 | | - fprintf(stderr, "Error: OpenGL version 3.3 not supported.\n"); |
29 | | - fprintf(stderr, " Your version is %d.%d.\n", major, minor); |
30 | | - fprintf(stderr, " Try updating your graphics driver.\n"); |
31 | | - return GL_FALSE; |
32 | | - } |
33 | | - |
34 | | - |
35 | | - /* --- Check for extensions --- */ |
36 | | - |
37 | | - |
38 | | - return GL_TRUE; |
39 | | -} |
40 | | - |
41 | | - |
42 | | - |
43 | | -void flextLoadOpenGLFunctions(OpenGLBindings *bindings) |
| 8 | +void flextInit(OpenGLBindings *bindings) |
44 | 9 | { |
45 | 10 | /* --- Function pointer loading --- */ |
46 | 11 |
|
@@ -305,59 +270,6 @@ void flextLoadOpenGLFunctions(OpenGLBindings *bindings) |
305 | 270 | bindings->glGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAME_PROC*)glfwGetProcAddress("glGetActiveUniformBlockName"); |
306 | 271 | bindings->glUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDING_PROC*)glfwGetProcAddress("glUniformBlockBinding"); |
307 | 272 |
|
308 | | - /* GL_VERSION_3_2 */ |
309 | | - |
310 | | - bindings->glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEX_PROC*)glfwGetProcAddress("glDrawElementsBaseVertex"); |
311 | | - bindings->glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEX_PROC*)glfwGetProcAddress("glDrawRangeElementsBaseVertex"); |
312 | | - bindings->glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEX_PROC*)glfwGetProcAddress("glDrawElementsInstancedBaseVertex"); |
313 | | - bindings->glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEX_PROC*)glfwGetProcAddress("glMultiDrawElementsBaseVertex"); |
314 | | - bindings->glProvokingVertex = (PFNGLPROVOKINGVERTEX_PROC*)glfwGetProcAddress("glProvokingVertex"); |
315 | | - bindings->glFenceSync = (PFNGLFENCESYNC_PROC*)glfwGetProcAddress("glFenceSync"); |
316 | | - bindings->glIsSync = (PFNGLISSYNC_PROC*)glfwGetProcAddress("glIsSync"); |
317 | | - bindings->glDeleteSync = (PFNGLDELETESYNC_PROC*)glfwGetProcAddress("glDeleteSync"); |
318 | | - bindings->glClientWaitSync = (PFNGLCLIENTWAITSYNC_PROC*)glfwGetProcAddress("glClientWaitSync"); |
319 | | - bindings->glWaitSync = (PFNGLWAITSYNC_PROC*)glfwGetProcAddress("glWaitSync"); |
320 | | - bindings->glGetInteger64v = (PFNGLGETINTEGER64V_PROC*)glfwGetProcAddress("glGetInteger64v"); |
321 | | - bindings->glGetSynciv = (PFNGLGETSYNCIV_PROC*)glfwGetProcAddress("glGetSynciv"); |
322 | | - bindings->glGetInteger64i_v = (PFNGLGETINTEGER64I_V_PROC*)glfwGetProcAddress("glGetInteger64i_v"); |
323 | | - bindings->glGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64V_PROC*)glfwGetProcAddress("glGetBufferParameteri64v"); |
324 | | - bindings->glFramebufferTexture = (PFNGLFRAMEBUFFERTEXTURE_PROC*)glfwGetProcAddress("glFramebufferTexture"); |
325 | | - bindings->glTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLE_PROC*)glfwGetProcAddress("glTexImage2DMultisample"); |
326 | | - bindings->glTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLE_PROC*)glfwGetProcAddress("glTexImage3DMultisample"); |
327 | | - bindings->glGetMultisamplefv = (PFNGLGETMULTISAMPLEFV_PROC*)glfwGetProcAddress("glGetMultisamplefv"); |
328 | | - bindings->glSampleMaski = (PFNGLSAMPLEMASKI_PROC*)glfwGetProcAddress("glSampleMaski"); |
329 | | - |
330 | | - /* GL_VERSION_3_3 */ |
331 | | - |
332 | | - bindings->glBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXED_PROC*)glfwGetProcAddress("glBindFragDataLocationIndexed"); |
333 | | - bindings->glGetFragDataIndex = (PFNGLGETFRAGDATAINDEX_PROC*)glfwGetProcAddress("glGetFragDataIndex"); |
334 | | - bindings->glGenSamplers = (PFNGLGENSAMPLERS_PROC*)glfwGetProcAddress("glGenSamplers"); |
335 | | - bindings->glDeleteSamplers = (PFNGLDELETESAMPLERS_PROC*)glfwGetProcAddress("glDeleteSamplers"); |
336 | | - bindings->glIsSampler = (PFNGLISSAMPLER_PROC*)glfwGetProcAddress("glIsSampler"); |
337 | | - bindings->glBindSampler = (PFNGLBINDSAMPLER_PROC*)glfwGetProcAddress("glBindSampler"); |
338 | | - bindings->glSamplerParameteri = (PFNGLSAMPLERPARAMETERI_PROC*)glfwGetProcAddress("glSamplerParameteri"); |
339 | | - bindings->glSamplerParameteriv = (PFNGLSAMPLERPARAMETERIV_PROC*)glfwGetProcAddress("glSamplerParameteriv"); |
340 | | - bindings->glSamplerParameterf = (PFNGLSAMPLERPARAMETERF_PROC*)glfwGetProcAddress("glSamplerParameterf"); |
341 | | - bindings->glSamplerParameterfv = (PFNGLSAMPLERPARAMETERFV_PROC*)glfwGetProcAddress("glSamplerParameterfv"); |
342 | | - bindings->glSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIV_PROC*)glfwGetProcAddress("glSamplerParameterIiv"); |
343 | | - bindings->glSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIV_PROC*)glfwGetProcAddress("glSamplerParameterIuiv"); |
344 | | - bindings->glGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIV_PROC*)glfwGetProcAddress("glGetSamplerParameteriv"); |
345 | | - bindings->glGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIV_PROC*)glfwGetProcAddress("glGetSamplerParameterIiv"); |
346 | | - bindings->glGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFV_PROC*)glfwGetProcAddress("glGetSamplerParameterfv"); |
347 | | - bindings->glGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIV_PROC*)glfwGetProcAddress("glGetSamplerParameterIuiv"); |
348 | | - bindings->glQueryCounter = (PFNGLQUERYCOUNTER_PROC*)glfwGetProcAddress("glQueryCounter"); |
349 | | - bindings->glGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64V_PROC*)glfwGetProcAddress("glGetQueryObjecti64v"); |
350 | | - bindings->glGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64V_PROC*)glfwGetProcAddress("glGetQueryObjectui64v"); |
351 | | - bindings->glVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISOR_PROC*)glfwGetProcAddress("glVertexAttribDivisor"); |
352 | | - bindings->glVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UI_PROC*)glfwGetProcAddress("glVertexAttribP1ui"); |
353 | | - bindings->glVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIV_PROC*)glfwGetProcAddress("glVertexAttribP1uiv"); |
354 | | - bindings->glVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UI_PROC*)glfwGetProcAddress("glVertexAttribP2ui"); |
355 | | - bindings->glVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIV_PROC*)glfwGetProcAddress("glVertexAttribP2uiv"); |
356 | | - bindings->glVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UI_PROC*)glfwGetProcAddress("glVertexAttribP3ui"); |
357 | | - bindings->glVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIV_PROC*)glfwGetProcAddress("glVertexAttribP3uiv"); |
358 | | - bindings->glVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UI_PROC*)glfwGetProcAddress("glVertexAttribP4ui"); |
359 | | - bindings->glVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIV_PROC*)glfwGetProcAddress("glVertexAttribP4uiv"); |
360 | | - |
361 | 273 | } |
362 | 274 |
|
363 | 275 | /* ----------------------- Extension flag definitions ---------------------- */ |
|
0 commit comments