Add osgemscripten example

This commit is contained in:
Michael Kapelko
2017-06-22 09:44:06 +07:00
parent 0b5f45289d
commit f992ec1440
7 changed files with 1307 additions and 0 deletions

View File

@@ -47,6 +47,9 @@
#else
#include <dlfcn.h>
#endif
#elif defined(__EMSCRIPTEN__)
// Emscripten ships SDL, which we use to get OpenGL function addresses.
#include <SDL2/SDL.h>
#else
#include <dlfcn.h>
#endif
@@ -407,6 +410,10 @@ 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);
#else // all other unixes
return dlsym(0, funcName);