WARNING: REDESIGNED: rlLoadExtensions() #1295

Added config flag: SUPPORT_GL_DETAILS_INFO
This commit is contained in:
Ray
2021-04-18 20:24:19 +02:00
parent 2ad3eb1d57
commit d4ccca81db
3 changed files with 306 additions and 196 deletions

View File

@@ -3770,12 +3770,6 @@ static bool InitGraphicsDevice(int width, int height)
glfwSwapInterval(0); // No V-Sync by default
#endif
#if defined(PLATFORM_DESKTOP)
// Load OpenGL 3.3 extensions
// NOTE: GLFW loader function is passed as parameter
rlLoadExtensions(glfwGetProcAddress);
#endif
// Try to enable GPU V-Sync, so frames are limited to screen refresh rate (60Hz -> 60 FPS)
// NOTE: V-Sync can be enabled by graphic driver configuration
if (CORE.Window.flags & FLAG_VSYNC_HINT)
@@ -4357,6 +4351,11 @@ static bool InitGraphicsDevice(int width, int height)
}
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
// Load OpenGL extensions
// NOTE: GLFW loader function is required by GLAD but only used for OpenGL 2.1 and 3.3,
// OpenGL ES 2.0 extensions (and entry points) are loaded manually using eglGetProcAddress()
rlLoadExtensions(glfwGetProcAddress);
// Initialize OpenGL context (states and resources)
// NOTE: CORE.Window.screen.width and CORE.Window.screen.height not used, just stored as globals in rlgl
rlglInit(CORE.Window.screen.width, CORE.Window.screen.height);