[rlgl] Check for extensions before enabling them (#2706)

* [rlgl] Check for extensions before enabling them

* Shift to glad on macOS

* #undef CORE_OPENGL_33

* Remove version hack and fix ASTC compression assumption

* Remove loader from glad

* Use GLAD_MALLOC/FREE instead of malloc/free

* More explicit extension checking
This commit is contained in:
Nikolas
2022-09-18 21:08:51 +02:00
committed by GitHub
parent 8f597b3cc3
commit 42ecd72547
3 changed files with 139 additions and 99 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
}
// NOTE: When asking for an OpenGL context version, most drivers provide highest supported version
// with forward compatibility to older OpenGL versions.
// For example, if using OpenGL 1.1, driver can provide a 4.3 context forward compatible.
// NOTE: When asking for an OpenGL context version, most drivers provide the highest supported version
// with backward compatibility to older OpenGL versions.
// For example, if using OpenGL 1.1, driver can provide a 4.3 backwards compatible context.
// Check selection OpenGL version
if (rlGetVersion() == RL_OPENGL_21)