summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorNikolas <[email protected]>2022-09-12 12:21:41 +0200
committerGitHub <[email protected]>2022-09-12 12:21:41 +0200
commita12ddacb7bfbc6e552e6145456f2fe6dfdfbe1c7 (patch)
treece1c50b0a6fa7afbea3700159def29633f2d8a07 /src/rlgl.h
parent853c66baedb342968c818e62422eb043ba4fb0c7 (diff)
downloadraylib-a12ddacb7bfbc6e552e6145456f2fe6dfdfbe1c7.tar.gz
raylib-a12ddacb7bfbc6e552e6145456f2fe6dfdfbe1c7.zip
Enable DXT compression on __APPLE__ targets (#2694)
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 5848deb2..6a0d715e 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -2029,13 +2029,16 @@ void rlLoadExtensions(void *loader)
RLGL.ExtSupported.texAnisoFilter = true;
RLGL.ExtSupported.texMirrorClamp = true;
#if defined(GRAPHICS_API_OPENGL_43)
- if (GLAD_GL_ARB_compute_shader) RLGL.ExtSupported.computeShader = true;
- if (GLAD_GL_ARB_shader_storage_buffer_object) RLGL.ExtSupported.ssbo = true;
+ RLGL.ExtSupported.computeShader = GLAD_GL_ARB_compute_shader;
+ RLGL.ExtSupported.ssbo = GLAD_GL_ARB_shader_storage_buffer_object;
#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
- if (GLAD_GL_EXT_texture_compression_s3tc) RLGL.ExtSupported.texCompDXT = true; // Texture compression: DXT
- if (GLAD_GL_ARB_ES3_compatibility) RLGL.ExtSupported.texCompETC2 = true; // Texture compression: ETC2/EAC
+ RLGL.ExtSupported.texCompDXT = GLAD_GL_EXT_texture_compression_s3tc; // Texture compression: DXT
+ RLGL.ExtSupported.texCompETC2 = GLAD_GL_ARB_ES3_compatibility; // Texture compression: ETC2/EAC
#endif
#endif // GRAPHICS_API_OPENGL_33