Merge branch 'master' of https://github.com/vvuk/regal
This commit is contained in:
commit
7eedcd0443
3 changed files with 17 additions and 10 deletions
|
|
@ -108,16 +108,8 @@ REGAL.CFLAGS += -DREGAL_STATISTICS=0
|
|||
REGAL.CFLAGS += -Wno-constant-logical-operand
|
||||
REGAL.CFLAGS += -DREGAL_PLUGIN=0
|
||||
REGAL.CFLAGS += -DREGAL_TRACE=0
|
||||
REGAL.CFLAGS += -DREGAL_NAMESPACE=1 -DREGAL_STATIC_ES2 -DREGAL_STATIC_EGL
|
||||
REGAL_LOG = 0
|
||||
REGAL_NO_TLS = 1
|
||||
|
||||
# Enabling this requires the library to be built with it, as well as all code
|
||||
# that uses it. Defining this means that Regal will link statically to GL
|
||||
# and EGL, and code will have to #include <GL/Regal.h> before any GL
|
||||
# includes to pull in a bunch of #defines (e.g. #define glGetError rglGetError)
|
||||
#LIB.CFLAGS += -DREGAL_SYS_EMSCRIPTEN_STATIC=1
|
||||
|
||||
endif
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -20,8 +20,17 @@ LN :=
|
|||
BIN.SUFFIX = .html
|
||||
EXT.DYNAMIC = js
|
||||
|
||||
CFLAGS.DEBUG = -O2
|
||||
CFLAGS.RELEASE = -O2
|
||||
# Enabling this requires the library to be built with it, *as well as all code
|
||||
# that uses it*.
|
||||
#
|
||||
# Defining this means that Regal will link statically to GL
|
||||
# and EGL, and code will have to #include <GL/Regal.h> before any GL
|
||||
# includes to pull in a bunch of #defines (e.g. #define glGetError rglGetError).
|
||||
#
|
||||
#EMSCRIPTEN_STATIC = -DREGAL_SYS_EMSCRIPTEN_STATIC=1
|
||||
|
||||
CFLAGS.DEBUG = -O2 $(EMSCRIPTEN_STATIC)
|
||||
CFLAGS.RELEASE = -O2 $(EMSCRIPTEN_STATIC)
|
||||
|
||||
#LIB.SHARED = lib$(NAME).js
|
||||
LIB.STATIC = lib$(NAME).a
|
||||
|
|
|
|||
|
|
@ -133,6 +133,12 @@ int main(int argc, const char *argv[])
|
|||
RegalMakeCurrent(CGLGetCurrentContext());
|
||||
#endif
|
||||
|
||||
// Regal workaround for Emscripten GLUT emulation
|
||||
|
||||
#ifdef EMSCRIPTEN
|
||||
RegalMakeCurrent((RegalSystemContext)1);
|
||||
#endif
|
||||
|
||||
RegalSetErrorCallback(myError);
|
||||
|
||||
// Exercise REGAL_extension_query extension
|
||||
|
|
|
|||
Loading…
Reference in a new issue