Enable DXT compression on __APPLE__ targets (#2694)

This commit is contained in:
Nikolas 2022-09-12 12:21:41 +02:00 committed by GitHub
parent 853c66baed
commit a12ddacb7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2029,13 +2029,16 @@ void rlLoadExtensions(void *loader)
RLGL.ExtSupported.texAnisoFilter = true; RLGL.ExtSupported.texAnisoFilter = true;
RLGL.ExtSupported.texMirrorClamp = true; RLGL.ExtSupported.texMirrorClamp = true;
#if defined(GRAPHICS_API_OPENGL_43) #if defined(GRAPHICS_API_OPENGL_43)
if (GLAD_GL_ARB_compute_shader) RLGL.ExtSupported.computeShader = true; RLGL.ExtSupported.computeShader = GLAD_GL_ARB_compute_shader;
if (GLAD_GL_ARB_shader_storage_buffer_object) RLGL.ExtSupported.ssbo = true; RLGL.ExtSupported.ssbo = GLAD_GL_ARB_shader_storage_buffer_object;
#endif #endif
#if !defined(__APPLE__) #if defined(__APPLE__)
// Apple provides its own extension macros
RLGL.ExtSupported.texCompDXT = GL_EXT_texture_compression_s3tc;
#else
// NOTE: With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans // NOTE: With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans
if (GLAD_GL_EXT_texture_compression_s3tc) RLGL.ExtSupported.texCompDXT = true; // Texture compression: DXT RLGL.ExtSupported.texCompDXT = GLAD_GL_EXT_texture_compression_s3tc; // Texture compression: DXT
if (GLAD_GL_ARB_ES3_compatibility) RLGL.ExtSupported.texCompETC2 = true; // Texture compression: ETC2/EAC RLGL.ExtSupported.texCompETC2 = GLAD_GL_ARB_ES3_compatibility; // Texture compression: ETC2/EAC
#endif #endif
#endif // GRAPHICS_API_OPENGL_33 #endif // GRAPHICS_API_OPENGL_33