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

Display.setLocation(0,0) change 2.8.5 -> 2.9.0 #27

Closed
rogerallen opened this issue May 2, 2013 · 3 comments
Closed

Display.setLocation(0,0) change 2.8.5 -> 2.9.0 #27

rogerallen opened this issue May 2, 2013 · 3 comments

Comments

@rogerallen
Copy link

When I updated from LWJGL 2.8.5 to 2.9.0, and I specify the location of the window Display.setLocation(0,0) the window location has changed from top-left relative in 2.8.5 to bottom-left relative in 2.9.0. I'm on Mac OS 10.7. Is this an expected change?

@rogerallen
Copy link
Author

Based on this comment

/**
 * Y coordinate of the window. Y in window coordinates is from the top of the display down,
 * unlike GL, where it is typically at the bottom of the display.
 */
private static int y = -1;

this native Mac OS X code that doesn't seem to touch the y value from LWGL

window_info->display_rect = NSMakeRect(x, y, width, height);

    window_info->display_rect = NSMakeRect(x, y, width, height);

and this documentation

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html

Local Coordinate Systems
Cocoa uses a Cartesian coordinate system as its basic model for specifying coordinates. The origin in this system is located in the lower-left corner of the current drawing space, with positive values extending along the axes up and to the right of the origin point. The root origin for the entire system is located in the lower-left corner of the screen containing the menu bar.

I think there is a bug in 2.9.0. Cocoa uses the lower-left as origin & LWGL wants to use the upper-left as the origin.

@kappaOne
Copy link
Member

kappaOne commented May 8, 2013

Do give the next nightly build of LWJGL 2.9.1 a spin, hopefully this issue should be fixed there. Thanks for testing and reporting.

@kappaOne kappaOne closed this as completed May 9, 2013
@rogerallen
Copy link
Author

Thanks, @kappaOne. I tried hacking in the libraries, but Leiningen (a build tool for Clojure) is too smart for me and makes it difficult to try this out.

When it 2.9.1 is released and a Clojure library is built, I'll give this a try. The update looked reasonable to me.

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