Skip to content
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

jpg image shows after delay #406

Open
aeosynth opened this issue Nov 8, 2017 · 1 comment
Open

jpg image shows after delay #406

aeosynth opened this issue Nov 8, 2017 · 1 comment

Comments

@aeosynth
Copy link

aeosynth commented Nov 8, 2017

I modified the image example to show a 200K jpg, and running it shows first a black window for a second, and then the image on a white background. in GTK we could render the app completely before showing it, is this possible with piston?

@bvssvni
Copy link
Member

bvssvni commented Nov 8, 2017

Looking at the source code for the event loop, it seems Piston tries to render first, so this should display the image. I don't know why it shows a black window.

Have you tried swapping the window backend? The default window backend for piston_window is Glutin. You can do this:

extern crate sdl2_window; // pistoncore-sdl2_window

use sdl2_window::Sdl2Window;

let mut window: PistonWindow<Sdl2Window> = ...;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants