From 8e8d5b2fe03b40ec8cbddbbf03b952f2a743c7d6 Mon Sep 17 00:00:00 2001 From: "konstantin.matveyev" Date: Mon, 14 Aug 2017 11:19:04 +0300 Subject: [PATCH] Emscripten: EGL instead of SDL2 in GLExtensions.cpp --- src/osg/GLExtensions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osg/GLExtensions.cpp b/src/osg/GLExtensions.cpp index 786cc6f8d..d89e63907 100644 --- a/src/osg/GLExtensions.cpp +++ b/src/osg/GLExtensions.cpp @@ -48,8 +48,8 @@ #include #endif #elif defined(__EMSCRIPTEN__) - // Emscripten ships SDL, which we use to get OpenGL function addresses. - #include + // Emscripten ships EGL, which we use to get OpenGL function addresses. + #include #else #include #endif @@ -411,8 +411,8 @@ OSG_INIT_SINGLETON_PROXY(GLExtensionDisableStringInitializationProxy, osg::getGL return dlsym(RTLD_DEFAULT, funcName); #elif defined(__EMSCRIPTEN__) - // Use SDL to get OpenGL function address for Emscripten. - return SDL_GL_GetProcAddress(funcName); + // Use EGL to get OpenGL function address for Emscripten. + return convertPointerType(eglGetProcAddress(funcName)); #else // all other unixes