Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[pre-ll] Emscripten support with WebGL 2.0 #1681
Conversation
kvark
added some commits
Dec 19, 2017
msiglreith
approved these changes
Dec 19, 2017
|
Great work! |
bors bot
added a commit
that referenced
this pull request
Dec 19, 2017
msiglreith
reviewed
Dec 19, 2017
| </script> | ||
| <canvas id="canvas" style="width:100%; height:100%"></canvas> | ||
| </body> | ||
| </html> |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
bot
merged commit 68f451e
into
gfx-rs:pre-ll
Dec 19, 2017
bors bot
added a commit
that referenced
this pull request
Dec 29, 2017
tangmi
referenced this pull request
Mar 30, 2019
Open
[pre-ll] Calling `Factory::create_pipeline_state_raw` causes emscripten to fail to build. #2721
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.
kvark commentedDec 19, 2017
•
edited
Fixes #641. It has more things, so we'll create extra issues as we go forward.
The support is limited, but it works. Unexpected limitations:
GetActiveUniformsivis missing, soconstant_buffer_supported = falseglClearBufferivis missing, soclear_buffer_supported = false.glutindependency is switched to GitHub until rust-windowing/glutin#962 is publishedwinitdoesn't provide the proper window size, so I have to work around by calling emscripten's C API directly, see rust-windowing/winit#370For missing GL exports, it appears to have a trivial fix: emscripten-core/emscripten#5951 . Hopefully, we'll run more examples after this is merged ;)
Screenshot
Status of the examples
triangleworksflowmapandblendproduce ICE in the fastcomp codeinstancingfails because it wants to map a buffermipmap,gamma, andperformanceI haven't triedHow to run and test yourself
You'll need Rust-1.22 or newer as well as Emscripten SDK installed. In Emscripten configuration, set
USE_WEBGL2=1. I did it by just modifying "emscripten/src/settings.js" directly (from where it's installed). Hopefully, we'll be able to pass the linker parameters toemccviacargoone day.