glad extension fix

This commit is contained in:
aap 2021-02-17 01:33:12 +01:00
parent 8ea4c9ae31
commit 767ee0eac3

View File

@ -1762,6 +1762,9 @@ stopGLFW(void)
static int static int
initOpenGL(void) initOpenGL(void)
{ {
/*
// this only works from 3.0 onward,
// but luckily GLAD has already taken care of extensions for us
int numExt; int numExt;
glGetIntegerv(GL_NUM_EXTENSIONS, &numExt); glGetIntegerv(GL_NUM_EXTENSIONS, &numExt);
for(int i = 0; i < numExt; i++){ for(int i = 0; i < numExt; i++){
@ -1774,6 +1777,9 @@ initOpenGL(void)
gl3Caps.astcSupported = true; gl3Caps.astcSupported = true;
// printf("%d %s\n", i, ext); // printf("%d %s\n", i, ext);
} }
*/
gl3Caps.dxtSupported = GLAD_GL_EXT_texture_compression_s3tc;
gl3Caps.astcSupported = GLAD_GL_KHR_texture_compression_astc_ldr;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl3Caps.maxAnisotropy); glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl3Caps.maxAnisotropy);