mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
make legacy gl2.0 work without BaseVertex extensions
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
OpenGL, OpenGL ES loader generated by glad 0.1.34 on Wed Jan 20 19:37:38 2021.
|
||||
OpenGL, OpenGL ES loader generated by glad 0.1.34 on Fri Jan 22 22:11:52 2021.
|
||||
|
||||
Language/Generator: C/C++
|
||||
Specification: gl
|
||||
@@ -9,6 +9,7 @@
|
||||
Extensions:
|
||||
GL_ARB_clip_control,
|
||||
GL_ARB_direct_state_access,
|
||||
GL_ARB_draw_elements_base_vertex,
|
||||
GL_ARB_multi_bind,
|
||||
GL_ARB_texture_filter_anisotropic,
|
||||
GL_EXT_clip_control,
|
||||
@@ -26,9 +27,9 @@
|
||||
Reproducible: False
|
||||
|
||||
Commandline:
|
||||
--profile="compatibility" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_clip_control,GL_ARB_direct_state_access,GL_ARB_multi_bind,GL_ARB_texture_filter_anisotropic,GL_EXT_clip_control,GL_EXT_framebuffer_object,GL_EXT_geometry_shader,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_GREMEDY_string_marker,GL_KHR_debug,GL_OES_draw_elements_base_vertex"
|
||||
--profile="compatibility" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_clip_control,GL_ARB_direct_state_access,GL_ARB_draw_elements_base_vertex,GL_ARB_multi_bind,GL_ARB_texture_filter_anisotropic,GL_EXT_clip_control,GL_EXT_framebuffer_object,GL_EXT_geometry_shader,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_GREMEDY_string_marker,GL_KHR_debug,GL_OES_draw_elements_base_vertex"
|
||||
Online:
|
||||
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_ARB_clip_control&extensions=GL_ARB_direct_state_access&extensions=GL_ARB_multi_bind&extensions=GL_ARB_texture_filter_anisotropic&extensions=GL_EXT_clip_control&extensions=GL_EXT_framebuffer_object&extensions=GL_EXT_geometry_shader&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_GREMEDY_string_marker&extensions=GL_KHR_debug&extensions=GL_OES_draw_elements_base_vertex
|
||||
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_ARB_clip_control&extensions=GL_ARB_direct_state_access&extensions=GL_ARB_draw_elements_base_vertex&extensions=GL_ARB_multi_bind&extensions=GL_ARB_texture_filter_anisotropic&extensions=GL_EXT_clip_control&extensions=GL_EXT_framebuffer_object&extensions=GL_EXT_geometry_shader&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_GREMEDY_string_marker&extensions=GL_KHR_debug&extensions=GL_OES_draw_elements_base_vertex
|
||||
*/
|
||||
|
||||
|
||||
@@ -4774,6 +4775,10 @@ typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC)(GLuint id, GLuint buff
|
||||
GLAPI PFNGLGETQUERYBUFFEROBJECTUIVPROC glad_glGetQueryBufferObjectuiv;
|
||||
#define glGetQueryBufferObjectuiv glad_glGetQueryBufferObjectuiv
|
||||
#endif
|
||||
#ifndef GL_ARB_draw_elements_base_vertex
|
||||
#define GL_ARB_draw_elements_base_vertex 1
|
||||
GLAPI int GLAD_GL_ARB_draw_elements_base_vertex;
|
||||
#endif
|
||||
#ifndef GL_ARB_multi_bind
|
||||
#define GL_ARB_multi_bind 1
|
||||
GLAPI int GLAD_GL_ARB_multi_bind;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
OpenGL, OpenGL ES loader generated by glad 0.1.34 on Wed Jan 20 19:37:38 2021.
|
||||
OpenGL, OpenGL ES loader generated by glad 0.1.34 on Fri Jan 22 22:11:52 2021.
|
||||
|
||||
Language/Generator: C/C++
|
||||
Specification: gl
|
||||
@@ -9,6 +9,7 @@
|
||||
Extensions:
|
||||
GL_ARB_clip_control,
|
||||
GL_ARB_direct_state_access,
|
||||
GL_ARB_draw_elements_base_vertex,
|
||||
GL_ARB_multi_bind,
|
||||
GL_ARB_texture_filter_anisotropic,
|
||||
GL_EXT_clip_control,
|
||||
@@ -26,9 +27,9 @@
|
||||
Reproducible: False
|
||||
|
||||
Commandline:
|
||||
--profile="compatibility" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_clip_control,GL_ARB_direct_state_access,GL_ARB_multi_bind,GL_ARB_texture_filter_anisotropic,GL_EXT_clip_control,GL_EXT_framebuffer_object,GL_EXT_geometry_shader,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_GREMEDY_string_marker,GL_KHR_debug,GL_OES_draw_elements_base_vertex"
|
||||
--profile="compatibility" --api="gl=3.3,gles2=3.2" --generator="c" --spec="gl" --no-loader --extensions="GL_ARB_clip_control,GL_ARB_direct_state_access,GL_ARB_draw_elements_base_vertex,GL_ARB_multi_bind,GL_ARB_texture_filter_anisotropic,GL_EXT_clip_control,GL_EXT_framebuffer_object,GL_EXT_geometry_shader,GL_EXT_texture_compression_s3tc,GL_EXT_texture_filter_anisotropic,GL_EXT_texture_sRGB,GL_GREMEDY_string_marker,GL_KHR_debug,GL_OES_draw_elements_base_vertex"
|
||||
Online:
|
||||
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_ARB_clip_control&extensions=GL_ARB_direct_state_access&extensions=GL_ARB_multi_bind&extensions=GL_ARB_texture_filter_anisotropic&extensions=GL_EXT_clip_control&extensions=GL_EXT_framebuffer_object&extensions=GL_EXT_geometry_shader&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_GREMEDY_string_marker&extensions=GL_KHR_debug&extensions=GL_OES_draw_elements_base_vertex
|
||||
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&api=gl%3D3.3&api=gles2%3D3.2&extensions=GL_ARB_clip_control&extensions=GL_ARB_direct_state_access&extensions=GL_ARB_draw_elements_base_vertex&extensions=GL_ARB_multi_bind&extensions=GL_ARB_texture_filter_anisotropic&extensions=GL_EXT_clip_control&extensions=GL_EXT_framebuffer_object&extensions=GL_EXT_geometry_shader&extensions=GL_EXT_texture_compression_s3tc&extensions=GL_EXT_texture_filter_anisotropic&extensions=GL_EXT_texture_sRGB&extensions=GL_GREMEDY_string_marker&extensions=GL_KHR_debug&extensions=GL_OES_draw_elements_base_vertex
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@@ -985,6 +986,7 @@ PFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL;
|
||||
PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL;
|
||||
int GLAD_GL_ARB_clip_control = 0;
|
||||
int GLAD_GL_ARB_direct_state_access = 0;
|
||||
int GLAD_GL_ARB_draw_elements_base_vertex = 0;
|
||||
int GLAD_GL_ARB_multi_bind = 0;
|
||||
int GLAD_GL_ARB_texture_filter_anisotropic = 0;
|
||||
int GLAD_GL_EXT_clip_control = 0;
|
||||
@@ -2002,6 +2004,13 @@ static void load_GL_ARB_direct_state_access(GLADloadproc load) {
|
||||
glad_glGetQueryBufferObjectui64v = (PFNGLGETQUERYBUFFEROBJECTUI64VPROC)load("glGetQueryBufferObjectui64v");
|
||||
glad_glGetQueryBufferObjectuiv = (PFNGLGETQUERYBUFFEROBJECTUIVPROC)load("glGetQueryBufferObjectuiv");
|
||||
}
|
||||
static void load_GL_ARB_draw_elements_base_vertex(GLADloadproc load) {
|
||||
if(!GLAD_GL_ARB_draw_elements_base_vertex) return;
|
||||
glad_glDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC)load("glDrawElementsBaseVertex");
|
||||
glad_glDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC)load("glDrawRangeElementsBaseVertex");
|
||||
glad_glDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC)load("glDrawElementsInstancedBaseVertex");
|
||||
glad_glMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC)load("glMultiDrawElementsBaseVertex");
|
||||
}
|
||||
static void load_GL_ARB_multi_bind(GLADloadproc load) {
|
||||
if(!GLAD_GL_ARB_multi_bind) return;
|
||||
glad_glBindBuffersBase = (PFNGLBINDBUFFERSBASEPROC)load("glBindBuffersBase");
|
||||
@@ -2064,6 +2073,7 @@ static int find_extensionsGL(void) {
|
||||
if (!get_exts()) return 0;
|
||||
GLAD_GL_ARB_clip_control = has_ext("GL_ARB_clip_control");
|
||||
GLAD_GL_ARB_direct_state_access = has_ext("GL_ARB_direct_state_access");
|
||||
GLAD_GL_ARB_draw_elements_base_vertex = has_ext("GL_ARB_draw_elements_base_vertex");
|
||||
GLAD_GL_ARB_multi_bind = has_ext("GL_ARB_multi_bind");
|
||||
GLAD_GL_ARB_texture_filter_anisotropic = has_ext("GL_ARB_texture_filter_anisotropic");
|
||||
GLAD_GL_EXT_framebuffer_object = has_ext("GL_EXT_framebuffer_object");
|
||||
@@ -2152,6 +2162,7 @@ int gladLoadGLLoader(GLADloadproc load) {
|
||||
if (!find_extensionsGL()) return 0;
|
||||
load_GL_ARB_clip_control(load);
|
||||
load_GL_ARB_direct_state_access(load);
|
||||
load_GL_ARB_draw_elements_base_vertex(load);
|
||||
load_GL_ARB_multi_bind(load);
|
||||
load_GL_EXT_framebuffer_object(load);
|
||||
load_GL_GREMEDY_string_marker(load);
|
||||
|
||||
Reference in New Issue
Block a user