I used the VTK v9.2.6 and dockcross/web-wasm:20230222-162287d, I followed all steps and was able to get the steps of the tutorial completed with everything completing without errors.
When I start the server and load the page I get the following messages in the console and only a white screen is shown:
“App created”
“initialized”
“ERROR: In vtkSDL2OpenGLRenderWindow.cxx, line 284”
“vtkSDL2OpenGLRenderWindow (0x100450): Unable to create SDL2 opengl context”
“missing function: glXGetProcAddressARB”
“Aborted(-1)”
Thanks for trying that tutorial! Can you please try a more recent version of VTK? Meanwhile, I’ll try those commands and see if it’s missing a flag or something.
Thanks for taking the time to look into the issue.
Just tried with v9.3.0.rc1 downloaded from here: Download | VTK
The steps in the Building using emscripten for WebAssembly - VTK documentation guide complete but when I run the first command from the Cone example with the actual example and VTK_DIR path:
“emcmake cmake
-G Ninja
-S /path/to/vtk/Examples/Emscripten/Cxx/Cone
-B out/build
-DVTK_DIR=/path/to/where/vtk/wasm/was/built”
The results is:
“emcmake: error: ‘cmake -G Ninja -S /work/src/ -B out/build -DVTK_DIR=/install/lib/cmake/vtk-9.3/ -DCMAKE_CROSSCOMPILING_EMULATOR=/emsdk/node/14.18.2_64bit/bin/node;–experimental-wasm-bulk-memory;–experimental-wasm-threads’ failed (returned 1)”
Yes, I am running all command inside the docker container. I tried to add the tool chain file and I am now getting a different error.
“Cone.js:10219 Uncaught (in promise) TypeError: entryFunction is not a function
at callMain (Cone.js:10219:13)
at doRun (Cone.js:10244:21)
at run (Cone.js:10256:3)
at runCaller (Cone.js:10203:18)
at removeRunDependency (Cone.js:373:4)
at receiveInstance (Cone.js:462:3)
at receiveInstantiationResult (Cone.js:466:3)”
This might be just an issue with the Cone project code as the other examples work, with the exception of the ConeMultiBackend WebGPU example which only shows a white screen and does not load the cones.
Ah. I see, thanks for testing the other examples. I’ll try to look at the Cone source code when I get a chance.
This might be just an issue with the Cone project code as the other examples work, with the exception of the ConeMultiBackend WebGPU example which only shows a white screen and does not load the cones.
Which browser are you using? Does it atleast show the message that WebGPU is not supported by the browser? Curious to see your developer console.
This is the output of the developer console.
“config_webgpu.js:33 Found an adapter
config_webgpu.js:35 Obtained a device
config_base.js:16 Created 10000 cones
config_webgpu.js:42 WASM runtime initialized with arguments ./this.program,10,10,100,1”
Okay, thanks for sharing. I may be able to help better if you can also share version of chrome and what operating system. It could be the emsdk version inside that dockcross/web-wasm is too old.