-
Notifications
You must be signed in to change notification settings - Fork 17
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
WebAssembly support #28
Merged
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
Turns out WebGL was okay with me not creating a VAO, but native OpenGL wasn't, even though I didn't use it for anything.
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.
Description
Split original
runty8
crate into many different ones:runty8
: Main entry point for games created with Runty8.Most Runty8 users should probably only depend on this crate.
runty8-core
: Core types needed by every Runty8 related craterunty8-runtime
: Run standalone Runty8 games innative
orwasm
targetsrunty8-editor
: Run game inside editorrunty8-winit
: Integration layer forwinit
runty8-event-loop
: Thin layer overwinit
/glow
/glutin
to have a cross-platform OpenGL/WebGL-powered event loopMove examples to top-level
examples
directory.TODO
It seems that in native we can use
ControlFlow::WaitUntil(instant::Instant::now() + instant::Duration::from_millis(33))
, but that's very slow in web, leading to frame times of 34-40ms.It looks like we want to use
Poll
, and handle accumulated times manually. Poll usesrequestAnimationFrame
.Edit: Used
ControlFlow::Poll
everywhere, and fixed my timestep. See d89b7a2.runty8-event-loop
Done in 4dfe853.
load_assets!
be project-root-based (useCARGO_MANIFEST_DIR
)Not in scope for this PR
include_dir
, this is not good but it's probably blocked byinclude_dir
macro cannot be used when re-exported Michael-F-Bryan/include_dir#87