LWJGL Forum

Programming => Bug Reports / RFE => Topic started by: princec on February 04, 2014, 12:59:48

Title: [RFE / BUG?] Retina support on OSX
Post by: princec on February 04, 2014, 12:59:48
Getting reports from users who when they go into fullscreen mode in their games on OSX, presumably with Retina displays, get a display that shows only a quarter of the output or thereabouts; presumably we're getting given mismatched sizes with glViewport and the window's physical size.

Can anyone confirm this?

Cas :)
Title: Re: [RFE / BUG?] Retina support on OSX
Post by: kappa on February 04, 2014, 14:08:02
Using LWJGL 2.9.1? or an older release?
Title: Re: [RFE / BUG?] Retina support on OSX
Post by: broumbroum on February 04, 2014, 18:57:29
I can confirm this. I don't own a retina display but the same occurs on standard layout.
I'm currently seeking for a way to feed back a working patch. https://github.com/b23prodtm/lwjgl/commits/macosx_canvas
:)
Title: Re: [RFE / BUG?] Retina support on OSX
Post by: avm1979 on April 02, 2014, 00:00:44
A little late to the party, but I can confirm this - have heard about it from several users with Retina displays. Using LWJGL 2.9.1.
Title: Re: [RFE / BUG?] Retina support on OSX
Post by: princec on April 16, 2014, 12:02:20
Any news?

Cas :)
Title: Re: [RFE / BUG?] Retina support on OSX
Post by: kappa on April 21, 2014, 13:20:51
Had some time off today and had a look at this issue. Grab the latest nightly builds of LWJGL2, the problem should be fixed there (actually tested with Revenge of the Titans and can confirm it being fixed there).

The problem stemmed from us enabling hi-dpi resolutions for fullscreen mode, oddly when this is enabled the default behaviour of Cocoa is to automatically set the glViewport to the window size (retina resolution in this case) on every context update. Since you were not manually setting the glViewport in your loop every frame hence the large size and only showing a quarter of the screen. Anyway have now set it to handle this issue internally.

Also note to avoid any deployment problems or conflict, the nightly builds no longer have or use any *.jnilib native files, they've been renamed to *.dylib to allow compatibility on OS X Java 8.

As for an official release of LWJGL2 I wouldn't hold my breath since development focus is now on getting LWJGL3 into a usable/releasable state, nightly builds should be perfectly usable for LWJGL2.