PistonDevelopers / PistonDevelopers/piston
the multi_window example breaks when using PistonWindow<Sdl2Window>
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.7k
- Forks
- 235
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
The underlying issue is that Sdl2Window conflates singleton initialization and window instance initialization when it calls sdl2::init in its new method.
I am not sure if this is a) not supposed to work b) supposed to work, but with different code, meaning that the example is chosen badly (issue for piston_examples) c) a bug in sdl2_window d) a bug in piston_window e) something else; so I am reporting this here.
(Also it seems non-trivial with the current interface(s) to factor out the sdl2 initialization - in my best attempt I end up with several copy-pastas from different builders and it still does not work completely (yet - I'll keep trying).)
piston = "0.27.0"
piston_window = "0.58.0"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the multi_window example with piston 0.27.0 and piston_window 0.58.0, then inspect Sdl2Window::new and its call to sdl2::init. Trace whether singleton and window-instance initialization can be separated; done when the example works with PistonWindow or the issue is assigned to the correct project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100