From 03dc9225edd40f38a4bc226f9a81adeced36828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Tue, 18 Mar 2014 22:50:24 -0700 Subject: [PATCH] Enabled GL extensions for asm.js. --- src/config.h | 2 +- src/glcontext_egl.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/config.h b/src/config.h index a0b07c31e..39cead567 100644 --- a/src/config.h +++ b/src/config.h @@ -97,7 +97,7 @@ #endif // BGFX_CONFIG_DEBUG_NVPERFHUD #ifndef BGFX_CONFIG_RENDERER_USE_EXTENSIONS -# define BGFX_CONFIG_RENDERER_USE_EXTENSIONS !BX_PLATFORM_EMSCRIPTEN +# define BGFX_CONFIG_RENDERER_USE_EXTENSIONS 1 #endif // BGFX_CONFIG_RENDERER_USE_EXTENSIONS /// DX9 PIX markers diff --git a/src/glcontext_egl.cpp b/src/glcontext_egl.cpp index 3145081bf..2f8650325 100644 --- a/src/glcontext_egl.cpp +++ b/src/glcontext_egl.cpp @@ -184,9 +184,8 @@ EGL_IMPORT void GlContext::import() { -# if !BX_PLATFORM_EMSCRIPTEN BX_TRACE("Import:"); -# if BX_PLATFORM_WINDOWS +# if BX_PLATFORM_WINDOWS void* glesv2 = bx::dlopen("libGLESv2.dll"); # define GL_EXTENSION(_optional, _proto, _func, _import) \ { \ @@ -197,7 +196,7 @@ EGL_IMPORT BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create OpenGLES context. eglGetProcAddress(\"%s\")", #_import); \ } \ } -# else +# else # define GL_EXTENSION(_optional, _proto, _func, _import) \ { \ if (NULL == _func) \ @@ -207,9 +206,8 @@ EGL_IMPORT BGFX_FATAL(_optional || NULL != _func, Fatal::UnableToInitialize, "Failed to create OpenGLES context. eglGetProcAddress(\"%s\")", #_import); \ } \ } -# endif // BX_PLATFORM_ -# include "glimports.h" -# endif // !BX_PLATFORM_EMSCRIPTEN +# endif // BX_PLATFORM_ +# include "glimports.h" } } // namespace bgfx