3 Commits

Author SHA1 Message Date
8d5bcfa44a draw_instanced 2025-05-07 11:50:50 -04:00
034101b119 anisotropic 2025-02-13 01:39:32 -05:00
1aad16309f shadow & depth texture for eventual shadow maps. 2024-11-25 16:45:54 -05:00
2 changed files with 82 additions and 8 deletions

View File

@@ -1,22 +1,27 @@
/*
OpenGL loader generated by glad 0.1.36 on Fri Oct 11 02:05:10 2024.
OpenGL loader generated by glad 0.1.36 on Wed May 7 15:49:23 2025.
Language/Generator: C/C++
Specification: gl
APIs: gl=2.1
Profile: compatibility
Extensions:
GL_ARB_framebuffer_object
GL_ARB_depth_texture,
GL_ARB_draw_instanced,
GL_ARB_framebuffer_object,
GL_ARB_instanced_arrays,
GL_ARB_shadow,
GL_ARB_texture_filter_anisotropic
Loader: True
Local files: False
Omit khrplatform: False
Reproducible: False
Commandline:
--profile="compatibility" --api="gl=2.1" --generator="c" --spec="gl" --extensions="GL_ARB_framebuffer_object"
--profile="compatibility" --api="gl=2.1" --generator="c" --spec="gl" --extensions="GL_ARB_depth_texture,GL_ARB_draw_instanced,GL_ARB_framebuffer_object,GL_ARB_instanced_arrays,GL_ARB_shadow,GL_ARB_texture_filter_anisotropic"
Online:
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D2.1&extensions=GL_ARB_framebuffer_object
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D2.1&extensions=GL_ARB_depth_texture&extensions=GL_ARB_draw_instanced&extensions=GL_ARB_framebuffer_object&extensions=GL_ARB_instanced_arrays&extensions=GL_ARB_shadow&extensions=GL_ARB_texture_filter_anisotropic
*/
@@ -2690,6 +2695,11 @@ typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC)(GLint location, GLsizei cou
GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
#define glUniformMatrix4x3fv glad_glUniformMatrix4x3fv
#endif
#define GL_DEPTH_COMPONENT16_ARB 0x81A5
#define GL_DEPTH_COMPONENT24_ARB 0x81A6
#define GL_DEPTH_COMPONENT32_ARB 0x81A7
#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A
#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B
#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
@@ -2763,6 +2773,26 @@ GLAPI PFNGLUNIFORMMATRIX4X3FVPROC glad_glUniformMatrix4x3fv;
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
#define GL_MAX_SAMPLES 0x8D57
#define GL_INDEX 0x8222
#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB 0x88FE
#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C
#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D
#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E
#define GL_TEXTURE_MAX_ANISOTROPY 0x84FE
#define GL_MAX_TEXTURE_MAX_ANISOTROPY 0x84FF
#ifndef GL_ARB_depth_texture
#define GL_ARB_depth_texture 1
GLAPI int GLAD_GL_ARB_depth_texture;
#endif
#ifndef GL_ARB_draw_instanced
#define GL_ARB_draw_instanced 1
GLAPI int GLAD_GL_ARB_draw_instanced;
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDARBPROC)(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
GLAPI PFNGLDRAWARRAYSINSTANCEDARBPROC glad_glDrawArraysInstancedARB;
#define glDrawArraysInstancedARB glad_glDrawArraysInstancedARB
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDARBPROC)(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei primcount);
GLAPI PFNGLDRAWELEMENTSINSTANCEDARBPROC glad_glDrawElementsInstancedARB;
#define glDrawElementsInstancedARB glad_glDrawElementsInstancedARB
#endif
#ifndef GL_ARB_framebuffer_object
#define GL_ARB_framebuffer_object 1
GLAPI int GLAD_GL_ARB_framebuffer_object;
@@ -2827,6 +2857,21 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC)(GLenum target, GLenum
GLAPI PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer;
#define glFramebufferTextureLayer glad_glFramebufferTextureLayer
#endif
#ifndef GL_ARB_instanced_arrays
#define GL_ARB_instanced_arrays 1
GLAPI int GLAD_GL_ARB_instanced_arrays;
typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORARBPROC)(GLuint index, GLuint divisor);
GLAPI PFNGLVERTEXATTRIBDIVISORARBPROC glad_glVertexAttribDivisorARB;
#define glVertexAttribDivisorARB glad_glVertexAttribDivisorARB
#endif
#ifndef GL_ARB_shadow
#define GL_ARB_shadow 1
GLAPI int GLAD_GL_ARB_shadow;
#endif
#ifndef GL_ARB_texture_filter_anisotropic
#define GL_ARB_texture_filter_anisotropic 1
GLAPI int GLAD_GL_ARB_texture_filter_anisotropic;
#endif
#ifdef __cplusplus
}

View File

@@ -1,22 +1,27 @@
/*
OpenGL loader generated by glad 0.1.36 on Fri Oct 11 02:05:10 2024.
OpenGL loader generated by glad 0.1.36 on Wed May 7 15:49:23 2025.
Language/Generator: C/C++
Specification: gl
APIs: gl=2.1
Profile: compatibility
Extensions:
GL_ARB_framebuffer_object
GL_ARB_depth_texture,
GL_ARB_draw_instanced,
GL_ARB_framebuffer_object,
GL_ARB_instanced_arrays,
GL_ARB_shadow,
GL_ARB_texture_filter_anisotropic
Loader: True
Local files: False
Omit khrplatform: False
Reproducible: False
Commandline:
--profile="compatibility" --api="gl=2.1" --generator="c" --spec="gl" --extensions="GL_ARB_framebuffer_object"
--profile="compatibility" --api="gl=2.1" --generator="c" --spec="gl" --extensions="GL_ARB_depth_texture,GL_ARB_draw_instanced,GL_ARB_framebuffer_object,GL_ARB_instanced_arrays,GL_ARB_shadow,GL_ARB_texture_filter_anisotropic"
Online:
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D2.1&extensions=GL_ARB_framebuffer_object
https://glad.dav1d.de/#profile=compatibility&language=c&specification=gl&loader=on&api=gl%3D2.1&extensions=GL_ARB_depth_texture&extensions=GL_ARB_draw_instanced&extensions=GL_ARB_framebuffer_object&extensions=GL_ARB_instanced_arrays&extensions=GL_ARB_shadow&extensions=GL_ARB_texture_filter_anisotropic
*/
#include <stdio.h>
@@ -814,7 +819,14 @@ PFNGLWINDOWPOS3IPROC glad_glWindowPos3i = NULL;
PFNGLWINDOWPOS3IVPROC glad_glWindowPos3iv = NULL;
PFNGLWINDOWPOS3SPROC glad_glWindowPos3s = NULL;
PFNGLWINDOWPOS3SVPROC glad_glWindowPos3sv = NULL;
int GLAD_GL_ARB_depth_texture = 0;
int GLAD_GL_ARB_draw_instanced = 0;
int GLAD_GL_ARB_framebuffer_object = 0;
int GLAD_GL_ARB_instanced_arrays = 0;
int GLAD_GL_ARB_shadow = 0;
int GLAD_GL_ARB_texture_filter_anisotropic = 0;
PFNGLDRAWARRAYSINSTANCEDARBPROC glad_glDrawArraysInstancedARB = NULL;
PFNGLDRAWELEMENTSINSTANCEDARBPROC glad_glDrawElementsInstancedARB = NULL;
PFNGLISRENDERBUFFERPROC glad_glIsRenderbuffer = NULL;
PFNGLBINDRENDERBUFFERPROC glad_glBindRenderbuffer = NULL;
PFNGLDELETERENDERBUFFERSPROC glad_glDeleteRenderbuffers = NULL;
@@ -835,6 +847,7 @@ PFNGLGENERATEMIPMAPPROC glad_glGenerateMipmap = NULL;
PFNGLBLITFRAMEBUFFERPROC glad_glBlitFramebuffer = NULL;
PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glad_glRenderbufferStorageMultisample = NULL;
PFNGLFRAMEBUFFERTEXTURELAYERPROC glad_glFramebufferTextureLayer = NULL;
PFNGLVERTEXATTRIBDIVISORARBPROC glad_glVertexAttribDivisorARB = NULL;
static void load_GL_VERSION_1_0(GLADloadproc load) {
if(!GLAD_GL_VERSION_1_0) return;
glad_glCullFace = (PFNGLCULLFACEPROC)load("glCullFace");
@@ -1410,6 +1423,11 @@ static void load_GL_VERSION_2_1(GLADloadproc load) {
glad_glUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC)load("glUniformMatrix3x4fv");
glad_glUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC)load("glUniformMatrix4x3fv");
}
static void load_GL_ARB_draw_instanced(GLADloadproc load) {
if(!GLAD_GL_ARB_draw_instanced) return;
glad_glDrawArraysInstancedARB = (PFNGLDRAWARRAYSINSTANCEDARBPROC)load("glDrawArraysInstancedARB");
glad_glDrawElementsInstancedARB = (PFNGLDRAWELEMENTSINSTANCEDARBPROC)load("glDrawElementsInstancedARB");
}
static void load_GL_ARB_framebuffer_object(GLADloadproc load) {
if(!GLAD_GL_ARB_framebuffer_object) return;
glad_glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC)load("glIsRenderbuffer");
@@ -1433,9 +1451,18 @@ static void load_GL_ARB_framebuffer_object(GLADloadproc load) {
glad_glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC)load("glRenderbufferStorageMultisample");
glad_glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)load("glFramebufferTextureLayer");
}
static void load_GL_ARB_instanced_arrays(GLADloadproc load) {
if(!GLAD_GL_ARB_instanced_arrays) return;
glad_glVertexAttribDivisorARB = (PFNGLVERTEXATTRIBDIVISORARBPROC)load("glVertexAttribDivisorARB");
}
static int find_extensionsGL(void) {
if (!get_exts()) return 0;
GLAD_GL_ARB_depth_texture = has_ext("GL_ARB_depth_texture");
GLAD_GL_ARB_draw_instanced = has_ext("GL_ARB_draw_instanced");
GLAD_GL_ARB_framebuffer_object = has_ext("GL_ARB_framebuffer_object");
GLAD_GL_ARB_instanced_arrays = has_ext("GL_ARB_instanced_arrays");
GLAD_GL_ARB_shadow = has_ext("GL_ARB_shadow");
GLAD_GL_ARB_texture_filter_anisotropic = has_ext("GL_ARB_texture_filter_anisotropic");
free_exts();
return 1;
}
@@ -1506,7 +1533,9 @@ int gladLoadGLLoader(GLADloadproc load) {
load_GL_VERSION_2_1(load);
if (!find_extensionsGL()) return 0;
load_GL_ARB_draw_instanced(load);
load_GL_ARB_framebuffer_object(load);
load_GL_ARB_instanced_arrays(load);
return GLVersion.major != 0 || GLVersion.minor != 0;
}