Remove version hack and fix ASTC compression assumption

This commit is contained in:
Not-Nik 2022-09-18 19:58:30 +02:00
parent d6d88bcfce
commit 5589ccc7d6
No known key found for this signature in database
GPG Key ID: 08BB71E672DB3BFD
2 changed files with 5 additions and 9 deletions

View File

@ -3986,9 +3986,9 @@ static bool InitGraphicsDevice(int width, int height)
glfwWindowHint(GLFW_SAMPLES, 4); // Tries to enable multisampling x4 (MSAA), default is 0 glfwWindowHint(GLFW_SAMPLES, 4); // Tries to enable multisampling x4 (MSAA), default is 0
} }
// NOTE: When asking for an OpenGL context version, most drivers provide highest supported version // NOTE: When asking for an OpenGL context version, most drivers provide the highest supported version
// with forward compatibility to older OpenGL versions. // with backward compatibility to older OpenGL versions.
// For example, if using OpenGL 1.1, driver can provide a 4.3 context forward compatible. // For example, if using OpenGL 1.1, driver can provide a 4.3 backwards compatible context.
// Check selection OpenGL version // Check selection OpenGL version
if (rlGetVersion() == RL_OPENGL_21) if (rlGetVersion() == RL_OPENGL_21)

View File

@ -2027,8 +2027,8 @@ void rlLoadExtensions(void *loader)
RLGL.ExtSupported.maxDepthBits = 32; RLGL.ExtSupported.maxDepthBits = 32;
RLGL.ExtSupported.texAnisoFilter = CORE_OPENGL_33 || GLAD_GL_EXT_texture_filter_anisotropic; RLGL.ExtSupported.texAnisoFilter = CORE_OPENGL_33 || GLAD_GL_EXT_texture_filter_anisotropic;
RLGL.ExtSupported.texMirrorClamp = CORE_OPENGL_33 || GLAD_GL_EXT_texture_mirror_clamp; RLGL.ExtSupported.texMirrorClamp = CORE_OPENGL_33 || GLAD_GL_EXT_texture_mirror_clamp;
RLGL.ExtSupported.texCompASTC = CORE_OPENGL_33 || (GLAD_GL_KHR_texture_compression_astc_hdr && GLAD_GL_KHR_texture_compression_astc_ldr);
// Optional OpenGL 3.3 extensions // Optional OpenGL 3.3 extensions
RLGL.ExtSupported.texCompASTC = GLAD_GL_KHR_texture_compression_astc_hdr && GLAD_GL_KHR_texture_compression_astc_ldr;
RLGL.ExtSupported.texCompDXT = GLAD_GL_EXT_texture_compression_s3tc; // Texture compression: DXT RLGL.ExtSupported.texCompDXT = GLAD_GL_EXT_texture_compression_s3tc; // Texture compression: DXT
RLGL.ExtSupported.texCompETC2 = GLAD_GL_ARB_ES3_compatibility; // Texture compression: ETC2/EAC RLGL.ExtSupported.texCompETC2 = GLAD_GL_ARB_ES3_compatibility; // Texture compression: ETC2/EAC
#if defined(GRAPHICS_API_OPENGL_43) #if defined(GRAPHICS_API_OPENGL_43)
@ -2226,11 +2226,7 @@ int rlGetVersion(void)
glVersion = RL_OPENGL_11; glVersion = RL_OPENGL_11;
#endif #endif
#if defined(GRAPHICS_API_OPENGL_21) #if defined(GRAPHICS_API_OPENGL_21)
#if defined(__APPLE__) glVersion = RL_OPENGL_21;
glVersion = RL_OPENGL_33; // NOTE: Force OpenGL 3.3 on OSX
#else
glVersion = RL_OPENGL_21;
#endif
#elif defined(GRAPHICS_API_OPENGL_33) #elif defined(GRAPHICS_API_OPENGL_33)
glVersion = RL_OPENGL_33; glVersion = RL_OPENGL_33;
#endif #endif