Hi,
I'm trying to run glfw3.c test found here:
https://github.com/emscripten-core/emscripten/blob/master/tests/glfw3.c, on
emcc
(Emscripten gcc/clang-like replacement) 1.38.30 ((unknown revision)), with
the following command line:
emcc -s USE_GLFW=3 -s USE_WEBGL2=1 -lGL qqq.cpp -o qqq.html --emrun
I get errors when I run it in a browser (see below). Any help?
qqq.js:5574 Failed to execute 'requestFullscreen' on 'Element': API can
only be initiated by a user gesture.
requestFullscreen @ qqq.js:5574
createWindow @ qqq.js:5866
_glfwCreateWindow @ qqq.js:5950
(anonymous) @ wasm-0004ecb2-373:558
Module._main @ qqq.js:6890
callMain @ qqq.js:7170
doRun @ qqq.js:7228
(anonymous) @ qqq.js:7239
setTimeout (async)
run @ qqq.js:7235
runCaller @ qqq.js:7147
removeRunDependency @ qqq.js:1531
receiveInstance @ qqq.js:1643
receiveInstantiatedSource @ qqq.js:1670
Promise.then (async)
createWasm @ qqq.js:1686
Module.asm @ qqq.js:1716
(anonymous) @ qqq.js:6797
qqq.js:4414 emscripten_set_main_loop_timing: Cannot set timing mode for
main loop since a main loop does not exist! Call emscripten_set_main_loop
first to set one up.
_emscripten_set_main_loop_timing @ qqq.js:4414
_glfwSwapInterval @ qqq.js:6233
(anonymous) @ wasm-0004ecb2-373:792
Module._main @ qqq.js:6890
callMain @ qqq.js:7170
doRun @ qqq.js:7228
(anonymous) @ qqq.js:7239
setTimeout (async)
run @ qqq.js:7235
runCaller @ qqq.js:7147
removeRunDependency @ qqq.js:1531
receiveInstance @ qqq.js:1643
receiveInstantiatedSource @ qqq.js:1670
Promise.then (async)
createWasm @ qqq.js:1686
Module.asm @ qqq.js:1716
(anonymous) @ qqq.js:6797
qqq.html:1246 exception thrown: ReferenceError: _glGetString is not
defined,ReferenceError: _glGetString is not defined
at _glfwExtensionSupported (http://localhost:8080/qqq.js:5963:9)
at wasm-function[373]:1708
at Object.Module._main (http://localhost:8080/qqq.js:6890:33)
at Object.callMain (http://localhost:8080/qqq.js:7170:30)
at doRun (http://localhost:8080/qqq.js:7228:60)
at http://localhost:8080/qqq.js:7239:7
printErr @ qqq.html:1246
emrun_printErr @ qqq.js:7375
callMain @ qqq.js:7190
doRun @ qqq.js:7228
(anonymous) @ qqq.js:7239
setTimeout (async)
run @ qqq.js:7235
runCaller @ qqq.js:7147
removeRunDependency @ qqq.js:1531
receiveInstance @ qqq.js:1643
receiveInstantiatedSource @ qqq.js:1670
Promise.then (async)
createWasm @ qqq.js:1686
Module.asm @ qqq.js:1716
(anonymous) @ qqq.js:6797
qqq.js:5963 Uncaught ReferenceError: _glGetString is not defined
at _glfwExtensionSupported (qqq.js:5963)
at wasm-function[373]:1708
at Object.Module._main (qqq.js:6890)
at Object.callMain (qqq.js:7170)
at doRun (qqq.js:7228)
at qqq.js:7239
_glfwExtensionSupported @ qqq.js:5963
(anonymous) @ wasm-0004ecb2-373:794
Module._main @ qqq.js:6890
callMain @ qqq.js:7170
doRun @ qqq.js:7228
(anonymous) @ qqq.js:7239
setTimeout (async)
run @ qqq.js:7235
runCaller @ qqq.js:7147
removeRunDependency @ qqq.js:1531
receiveInstance @ qqq.js:1643
receiveInstantiatedSource @ qqq.js:1670
Promise.then (async)
createWasm @ qqq.js:1686
Module.asm @ qqq.js:1716
(anonymous) @ qqq.js:6797
qqq.js:5574 Uncaught (in promise) TypeError: fullscreen error
at Object.requestFullscreen (qqq.js:5574)
at Object.createWindow (qqq.js:5866)
at _glfwCreateWindow (qqq.js:5950)
at wasm-function[373]:1178
at Object.Module._main (qqq.js:6890)
at Object.callMain (qqq.js:7170)
at doRun (qqq.js:7228)
at qqq.js:7239
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/016579ae-64bb-4eea-aa06-be37fc6a4325%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.