-
Notifications
You must be signed in to change notification settings - Fork 298
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
PistonWindow fork #850
PistonWindow fork #850
Conversation
Please don't duplicate the name. That will be confusing. |
I'd be fine with just |
Ok great, I was just about to suggest that, do you think we should keep the |
I like the idea of folding it into the |
@christolliday you might need to rebase onto master again now that #851 is merged. |
…w modifying the API by conrod. This commit copies the code as is, combining with the existing code in `backend::piston_window`
…licit about what event loop is used. Updated examples to use new API.
…ned `piston_window` and `piston` features. `piston_window::PistonWindow` is now `piston::Window`. Updated examples and made imports more consistent.
…ted code into `backend::piston::gfx`, so that `backend::piston::window` is just a simple wrapper. Most gfx functionality now handled by `GfxContext` struct, held by the window.
Hey @mitchmindtree I made those changes, rebased, and also did some refactoring on the new window module, wasn't sure if it made sense to have a separate pull request so I just added it here. Basically it splits out all the gfx related code from the window into a separate module and struct, Also with this simpler window design it could be possible to restore the old API of having the event loop fully integrated into the window, just by creating different window modules for different event loops, with much less duplication. That said I am more in favour of this API of instantiating the event loop ( |
@christolliday thanks for this, I'll have a closer look first thing tomorrow! |
@christolliday this all looks fine to me 👍
I agree with this, I'm happy to leave it as it is. Going to merge! I another PR or two I'd like to land, but hopefully will publish these changes before the end of the day 👍 Thanks again for all this :) PS you might be interested in the performance improvements in #852 if you happen to be using conrod with glium. I'm considering updating a couple of the examples to use that backend as the performance is significantly better and the text rendering works nicely (though I believe the text rendering should work nicely in piston too once we update versions). |
Hmmm I'm just doing some testing after having merged this and it appears this PR has introduced a bug that shows itself during resizing. For example, to start, the all_widgets example looks like this: However after resizing it looks like this: Not sure what could have changed that would cause this, I'll look into it now. |
@christolliday any idea what might be going on or where to look? Does this happen on your machine also? I don't have time to look much closer tonight, but will try to get around to it soon. In the meantime I've opened up #854 for tracking it. |
This copies the
piston_window
intobackend
, as discussed here PistonDevelopers/piston_window#170It replaces the
piston_window
optional dependency with apiston_window
feature.This also makes the change to the
PistonWindow
that necessitated the fork, that is, decoupling the default piston event loop. If this is merged I can clean up #831Hopefully this also enables other future changes to
PistonWindow
as well. My thoughts are this forked version ofPistonWindow
can be made more configurable in general, rather than just as simple as possible for the common case.The new window was originally going to be called
ConrodWindow
but I agree the prefix shouldn't be necessary, (see PistonDevelopers/piston_window#170) so I just left it asPistonWindow
. It is a better description of what it is, although it does duplicate the name inpiston_window
. I'm hoping that won't be too confusing, but I'm open to alternative names if it is.