Hello Guest

[FIXED] Use Mac OS X [native] Fullscreen APIs

  • 4 Replies
  • 9753 Views
[FIXED] Use Mac OS X [native] Fullscreen APIs
« on: July 11, 2012, 17:53:35 »
« Last Edit: November 10, 2013, 02:32:58 by kappa »

*

Offline Matzon

  • *****
  • 2242
Re: [RFE] Use Mac OS X [native] Fullscreen APIs
« Reply #1 on: July 11, 2012, 18:35:13 »

Re: [RFE] Use Mac OS X [native] Fullscreen APIs
« Reply #2 on: July 11, 2012, 18:44:36 »

*

Online kappa

  • *****
  • 1313
Re: [RFE] Use Mac OS X [native] Fullscreen APIs
« Reply #3 on: November 07, 2013, 12:25:38 »
Added some initial code in the nightly builds to implement the native OS X 10.7+ fullscreen mode API. This allows the game to get its own workspace.

You can switch to/from fullscreen mode via the OS X gui button in the window title, once the LWJGL fullscreen mode api switch is enabled.



Toggling to/from native fullscreen via Display.setFullscreen() and Display.isFullscreen() isn't implemented yet (not sure whether to go down that route yet as the normal fullscreen uses the DisplayMode and this just uses the current desktop resolution).

The fullscreen mode API can be enabled using the org.lwjgl.opengl.Display.enableOSXFullscreenModeAPI switch:

e.g. as a VM parameter using:
Code: [Select]
-Dorg.lwjgl.opengl.Display.enableOSXFullscreenModeAPI=trueor in java code before creating the Display:
Code: [Select]
System.setProperty("org.lwjgl.opengl.Display.enableOSXFullscreenModeAPI", "true");
Anyone up for testing this feature you can do so using the latest LWJGL nightly builds.
« Last Edit: November 07, 2013, 13:39:44 by kappa »

*

Online kappa

  • *****
  • 1313
Re: [RFE] Use Mac OS X [native] Fullscreen APIs
« Reply #4 on: November 10, 2013, 02:21:04 »
Finalised the behaviour on the OS X fullscreen mode API.

The OS X fullscreen mode API is essentially just a way to resize/maximise an existing window to one without borders and not a true fullscreen mode in the LWJGL sense (which destroys any existing window, switches the DisplayMode/resolution of the monitor/screen before creating a new window).

Therefore the OS X fullscreen mode GUI button is now enabled by default (where available) when Display.setResizable(true) is set. When Display.setResizable(false) is set then the fullscreen mode GUI button will be unavailable.

So any existing games that already have a resizable Display window will just work like other native fullscreen OS X apps.

In any event the fullscreen mode api gui button can be disabled if required using the org.lwjgl.opengl.Display.disableOSXFullscreenModeAPI switch.
« Last Edit: November 10, 2013, 02:55:54 by kappa »