diff options
| author | Ray <[email protected]> | 2021-04-27 11:04:48 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2021-04-27 11:04:48 +0200 |
| commit | 1aa8a4ff906d4dd181cb4c19fb7a79c8af264a0c (patch) | |
| tree | 1ad240cd2b2b5a8b3075920b2f2fdd439e7daf21 /src/core.c | |
| parent | fcf3a048256296587c3184bdd14410f3de8f75d4 (diff) | |
| download | raylib-1aa8a4ff906d4dd181cb4c19fb7a79c8af264a0c.tar.gz raylib-1aa8a4ff906d4dd181cb4c19fb7a79c8af264a0c.zip | |
REVIEWED: rlLoadExtensions()
On PLATFORM_ANDROID, PLATFORM_RPI, PLATFORM_DRM and PLATFORM_UWP glfwGetProcAddress() is not defines, actually those platforms use egl platform windowing system.
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -4352,9 +4352,12 @@ 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() + // NOTE: GL procedures address loader is required to load extensions +#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) rlLoadExtensions(glfwGetProcAddress); +#else + rlLoadExtensions(NULL); // Uses eglGetProcAddress() internally +#endif // Initialize OpenGL context (states and resources) // NOTE: CORE.Window.screen.width and CORE.Window.screen.height not used, just stored as globals in rlgl |
