mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-08 12:28:15 +00:00
REVIEWED: rlLoadExtensions()
On PLATFORM_ANDROID, PLATFORM_RPI, PLATFORM_DRM and PLATFORM_UWP glfwGetProcAddress() is not defines, actually those platforms use egl platform windowing system.
This commit is contained in:
@@ -4352,9 +4352,12 @@ static bool InitGraphicsDevice(int width, int height)
|
|||||||
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
|
#endif // PLATFORM_ANDROID || PLATFORM_RPI || PLATFORM_DRM || PLATFORM_UWP
|
||||||
|
|
||||||
// Load OpenGL extensions
|
// Load OpenGL extensions
|
||||||
// NOTE: GLFW loader function is required by GLAD but only used for OpenGL 2.1 and 3.3,
|
// NOTE: GL procedures address loader is required to load extensions
|
||||||
// OpenGL ES 2.0 extensions (and entry points) are loaded manually using eglGetProcAddress()
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
rlLoadExtensions(glfwGetProcAddress);
|
rlLoadExtensions(glfwGetProcAddress);
|
||||||
|
#else
|
||||||
|
rlLoadExtensions(NULL); // Uses eglGetProcAddress() internally
|
||||||
|
#endif
|
||||||
|
|
||||||
// Initialize OpenGL context (states and resources)
|
// Initialize OpenGL context (states and resources)
|
||||||
// NOTE: CORE.Window.screen.width and CORE.Window.screen.height not used, just stored as globals in rlgl
|
// NOTE: CORE.Window.screen.width and CORE.Window.screen.height not used, just stored as globals in rlgl
|
||||||
|
Reference in New Issue
Block a user