mirror of https://github.com/bjornbytes/lovr.git
Fix wasm compilation issues;
This commit is contained in:
parent
0365f51f9d
commit
a2b7e1619d
|
@ -155,8 +155,7 @@ ifeq ($(PLATFORM),web)
|
|||
LDFLAGS += -s EXPORTED_FUNCTIONS="['_main','_lovrDestroy','_webxr_attach','_webxr_detach','_lovrCanvasCreateFromHandle','_lovrCanvasDestroy','_lovrGraphicsSetBackbuffer','_lovrGraphicsSetViewMatrix','_lovrGraphicsSetProjection']"
|
||||
LDFLAGS_@(WEBXR) += --js-library $(ROOT)/src/resources/webxr.js
|
||||
LDFLAGS += --shell-file $(ROOT)/src/resources/lovr.html
|
||||
CFLAGS_@(THREAD) += -s USE_PTHREADS=1
|
||||
LDFLAGS_@(THREAD) += -s USE_PTHREADS=1
|
||||
FLAGS_@(THREAD) += -s USE_PTHREADS=1
|
||||
EXTRAS = bin/lovr.js bin/lovr.wasm
|
||||
EXTRAS_@(THREAD) += bin/lovr.worker.js
|
||||
endif
|
||||
|
|
|
@ -356,9 +356,9 @@ void lovrPlatformSetMouseMode(MouseMode mode) {
|
|||
if (state.mouseMode != mode) {
|
||||
state.mouseMode = mode;
|
||||
if (mode == MOUSE_MODE_GRABBED) {
|
||||
EM_ASM(Module['canvas'].requestPointerLock());
|
||||
emscripten_run_script("Module['canvas'].requestPointerLock();");
|
||||
} else {
|
||||
EM_ASM(document.exitPointerLock());
|
||||
emscripten_run_script("document.exitPointerLock();");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1232,6 +1232,7 @@ static void lovrGpuSetViewports(float* viewport, uint32_t count) {
|
|||
|
||||
// GPU
|
||||
|
||||
#ifndef LOVR_WEBGL
|
||||
static void GLAPIENTRY onMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userdata) {
|
||||
int level;
|
||||
switch (severity) {
|
||||
|
@ -1242,6 +1243,7 @@ static void GLAPIENTRY onMessage(GLenum source, GLenum type, GLuint id, GLenum s
|
|||
}
|
||||
lovrLog(level, "GL", message);
|
||||
}
|
||||
#endif
|
||||
|
||||
void lovrGpuInit(void* (*getProcAddress)(const char*), bool debug) {
|
||||
#ifdef LOVR_GL
|
||||
|
|
Loading…
Reference in New Issue