Merge pull request #267 from kornerr/master

Add osgemscripten example
This commit is contained in:
OpenSceneGraph git repository
2017-07-28 10:27:47 +01:00
committed by GitHub
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);