-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Emscripten target for SDL/OpenGL3 example. #2492
Closed
Closed
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
28ef369
to
36a0ffa
Compare
We'll do #2494 instead of this one. Keeping this one around for reference on how to do a single piece of code that can be both emscripten-compatible and desktop-compatible. |
JohanSmet
added a commit
to JohanSmet/lsim
that referenced
this pull request
Sep 13, 2019
mljack
pushed a commit
to mljack/obb_editor
that referenced
this pull request
Nov 10, 2022
…llow changes in this PR: ocornut/imgui#2492 and use WebGL1 with GL ES2.
mljack
added a commit
to mljack/obb_editor
that referenced
this pull request
Nov 11, 2022
…llow changes in this PR: ocornut/imgui#2492 and use WebGL1 with GL ES2.
mljack
added a commit
to mljack/obb_editor
that referenced
this pull request
Dec 4, 2022
Follow changes in this PR: ocornut/imgui#2492 and use WebGL1 with GL ES2. 2. Use GL ES 3.0 + GLSL 300 ES (WebGL2). 3. Load and render texture. 4. Add imgui-1.88 to third_party. 5. Add file open dialog and enable C++ debugging in chrome devtools. 6. Use cmake to build obb_editor on both Linux native and WebAssembly.
mljack
added a commit
to mljack/obb_editor
that referenced
this pull request
Dec 5, 2022
Follow changes in this PR: ocornut/imgui#2492 and use WebGL1 with GL ES2. 2. Use GL ES 3.0 + GLSL 300 ES (WebGL2). 3. Load and render texture. 4. Add imgui-1.88 to third_party. 5. Add file open dialog and enable C++ debugging in chrome devtools. 6. Use cmake to build obb_editor on both Linux native and WebAssembly.
ocornut
added a commit
that referenced
this pull request
Feb 2, 2023
ocornut
added a commit
that referenced
this pull request
Feb 3, 2023
ocornut
added a commit
that referenced
this pull request
Feb 3, 2023
Eventually caved in and applied your solution after hiding it being macros and dedicated helper stub: Which allowed me to revert all the examples refactor.. Lost some time but happier about this solution. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds Emscripten support for the SDL/OpenGL3 example. The changes are minimal, but require WebGL2/GLES3 to work, which you can't necessarily find everywhere.
You can see the page in action here: http://static.grumpycoder.net/pixel/example_sdl_opengl3.html
I have successfully loaded this on Firefox, Chrome for Android, and some versions of Chrome. Microsoft Edge doesn't properly load this, and I have seen some versions of Chrome crashing with an "Aw snap."
I guess it may be a good idea to ultimately host this on http://www.dearimgui.org/ and point people at it when trying to explain imgui things, like in the fiasco from #2488.