-
Notifications
You must be signed in to change notification settings - Fork 22
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
Second wave of API changes #116
Merged
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good! I had some questions about the Gfx changes but I think everything else looks good.
Also you may want to merge master
back into this branch to make the diff a bit simpler (without displaying the changes from #115 )
Co-authored-by: Ian Chamberlain <[email protected]>
ian-h-chamberlain
approved these changes
Apr 12, 2023
Oops! The argument to `gfxScreenSwapBuffers` is gfxScreen_t, not gfx3dSide_t ! Unfortunately they are both alias to libc::c_uint so we didn't get any help from the Rust compiler when passing the screen side into this function.
Rename to flush_buffers, and just have TopScreen3D's impl do both. This still allows individual flushing of left and right if needed but most people would probably just use `TopScreen3D::flush_buffers`.
AzureMarker
reviewed
Apr 14, 2023
1 task
Clarify the behavior of `swap_buffers` for single buffering mode and update bitmap example to prove that this is actually how it works.
Co-authored-by: Ian Chamberlain <[email protected]>
ian-h-chamberlain
approved these changes
Apr 17, 2023
AzureMarker
approved these changes
Apr 30, 2023
Create some traits for swapping/flushing screen buffers
Closed
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.
Related to #102
This is a second wave of breaking API changes based on the official guidelines (I can hear you cry from here).
Most notable changes:
init
functions have been renamed tonew
(it's standard for any constructor).Gfx::swap_buffers
andGfx::flush_buffers
have been moved to theScreen
trait. Originally, those functions modified a global state. Now eachScreen
can flush its own buffers. Also,Console
handles flushing and swapping by itself, so most examples don't even mention those functions anymore.This is one of the last PRs in preparation to the docs PR.