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 upWeb support #63
+599
β528
Conversation
hecrj
added some commits
Jun 27, 2019
hecrj
added
the
feature
label
Jul 2, 2019
hecrj
self-assigned this
Jul 2, 2019
This was referenced Jul 2, 2019
hecrj
added
the
help wanted
label
Jul 3, 2019
hecrj
added this to the 0.4.0 milestone
Jul 7, 2019
hecrj
referenced this pull request
Jul 11, 2019
Open
MouseCursor::Grab and ::Grabbing look like ::Move on Win10 #42
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.
hecrj commentedJul 2, 2019
•
edited
Depends on #62 and #60.
This PR allows Coffee to compile to Wasm!π
Examples
I would greatly appreciate it if you report any issues you find!
Known issues
Implementation details
The changes basically use the new
glbackend coming towgputo run graphics on the web using WebGL2.The PR uses my own forks of:
winitβ implements a newwebplatform with support forweb-sysandstdweb. Coffee uses theweb-sysbackend on web.gfx-backend-glβ fixes some issues I have detected when dealing with WebGL. More specifically, it implements theCopyImageToSurfacecommand and it fixes a big memory leak.wgpu-nativeβ implements new wiring to support the newwinitfeatures.wgpu-rsβ adapts to the changes inwgpu-native.wgpu_glyphβ fixes an issue withdrawArraysInstancedin WebGL2 on Firefox.instantβ fixes anIllegal invocationerror when callingperformance.now(). A fix should be merged soon (sebcrozet/instant#5).This PR does not contain any additional breaking changes to the ones found in #62. The API remains unchanged, meaning web support will be mostly free for projects that are already using Coffee.
Pending work
winitWasm supportgfx-backend-glfixeswgpu-nativeandwgpu-rswiring codewgpu_glyphfixesinstantfix (sebcrozet/instant#5)gfxbackends to integrate with the newwinit(and maybe contribute!)BGRA*texture formats do not seem to worktwox-hashhas so many collisions on WasmFile::openwith an alternative on Wasm