This repository has been archived by the owner on Dec 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Note: did not correct code duplication in cmake files, but this should be done later)
* find_package(OpenGL REQUIRED) and ${OPENGL_LIBRARIES} cannot be used * glfw is disabled * BABYLON_BUILD_PLAYGROUND disabld * libraries are static for emscripten (not shared)
…* part of the build Otherwise you canot debug tests, because the build fails!
Correct issue with emscripten : glGetQueryObjectuiv is supported but glGetQueryObjectiv
// With emscripten we will run an external loop, so that we need to keep a global variable std::unique_ptr<RunnerBabylon> gRunnerBabylon;
3a5b2f9
to
7a4fb4c
Compare
1f2ce8b
to
e51eb11
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Sam,
Remark
If you like you can look at the current status here:
https://github.com/pthom/BabylonCpp/tree/wasm_experiment
I do not have time to detail all the changes now (there are a lot).
In this branch, you can do a build for emscripten like this:
I added support for SDL2 instead of GLFW (since emscripten supports SDL natively and it is the recommended method by imgui for emscripten).
Status:
imgui_runner_demo_emscripten
)imgui_runner_babylon_demo_emscripten
)How to test this:
emsdk
http://localhost:8000/cmake-build-emscripten/build/bin
(replace "cmake-build-emscripten" by your build folder name)
imgui_runner_babylon_demo_emscripten.html
andimgui_runner_demo_emscripten.html
(they do not initialize a 3D scene)BabylonRunStandalone.html
How to debug:
There is a source map, so in theory you should be able to add breakpoints. However in practice, this is fragile.
Based on my experience, two adices:
Analysis of the issue
Below is an extract of the stack trace. Can you help me on this?
I suspect an issue with OpenGL and/or glsl version. Here are some possible location where some adaptations could (should ?) be made for emscripten, as far as OpenGL and Glsl are concerned:
Stack trace that I have when running
BabylonRunStandalone.html
:Concerning the rest of the changes, I'll make a more complete explanation later.
In summary:
Cheers!