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

Window coordinates are broken? #937

Open
jarrett opened this issue Jul 23, 2015 · 13 comments

Comments

@jarrett
Copy link

commented Jul 23, 2015

After upgrading to the latest Piston dependencies, window coordinates seem to be broken, at least on OSX. Here is a screen capture of the Hello World example demonstrating the error. The same thing occurs for every application I've tested, including the Piston examples and my home-grown apps.

@bvssvni bvssvni added the bug label Jul 24, 2015

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

Seems to be broken on the Glutin window back-end.

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

You can switch to let window: PistonWindow<(), Sdl2Window> = ... to fix the problem temporarily.

This requires extern crate sdl2_window; and use sdl2_window::Sdl2Window;.

@jarrett

This comment has been minimized.

Copy link
Author

commented Jul 24, 2015

Thanks! Good to know. Should I post this issue to the glutin_window Github?

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

Not necessary. It is probably a small fix.

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 24, 2015

The "user_input" example seem to work?

@bvssvni bvssvni added the help wanted label Jul 24, 2015

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 25, 2015

There is an issue on Glutin about the origin moving on Retina displays rust-windowing/glutin#503

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 25, 2015

I guess that there are two bugs involved here, 1) that moves the origin and 2) related to resizing.

The "user_input" example is used to test backends but does not use PistonWindow. It could be that the second bug is triggered by PistonWindow.

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 25, 2015

GlutinWindow does not emit resize events.

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 25, 2015

The second bug is caused by rust-windowing/glutin#445

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 26, 2015

I've fixed the second bug PistonDevelopers/piston_window#74.

@jarrett

This comment has been minimized.

Copy link
Author

commented Jul 27, 2015

Thanks!

So just to confirm, PistonWindow's default config is still broken pending the GlutinWindow fix, correct?

In the meantime, cargo update and switching to Sdl2Window per your instructions above worked for me.

@bvssvni

This comment has been minimized.

Copy link
Member

commented Jul 28, 2015

For Retina displays it is pending on rust-windowing/glutin#503.

@willbush

This comment has been minimized.

Copy link

commented Mar 26, 2018

This might be related to an issue I have been running into when going through sudoku tutorial. I have been trying to figure out why my y-axis is off the screen. I finally cloned the Piston-Tutorial repo and ran the sudoku tutorial and saw that it works fine. However, I eventually realized it worked because it was using an older version of the dependencies in the Cargo.lock file. When I delete the Cargo.lock file, clean, and re-build it gets the latest version where the y axis is offset. See images below.

[dependencies]
# working version
piston = "0.35.0"
piston2d-graphics = "0.23.0"
piston2d-opengl_graphics = "0.49.0"
pistoncore-glutin_window = "0.42.0"

# latest version where screen is off 
# piston = "0.36.0"
# piston2d-graphics = "0.26.0"
# piston2d-opengl_graphics = "0.52.0"
# pistoncore-glutin_window = "0.45.3"

image of working version
image of broken version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.