Fullscreen on two Display Mac

Started by paul p, April 27, 2007, 12:36:34

Previous topic - Next topic

paul p

On my XP computer with my Nvidia graphics card set to horizontal span I can create a lwjgl fullscreen Display of 2048x768 which spans two monitors. The same code on a two display G5 Mac is not given the option for 2048x768. I am only given the option resolutions of the main disply to choose from. Can I create a lwjgl Display to span across two montors on a Mac in full screen mode?
Thanks Paul P

elias

Most likely not. LWJGL on mac uses the built in java2d fullscreen features, so the list of available modes are the ones provided by java2d's GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(). If you find a way to use fullscreen windows spanning multiple monitors, you can use AWTGLCanvas to handle the fullscreen mode setting yourself.

- elias

paul p

Thanks elias.

I was hoping that the display options for mac may offer a "horizontal span" option like my Nvidia card on my XP computer. This lets me access a Display mode of 2048x768.

However, thank you for your suggestion, I shall look into it. Is there any useful sites on AWTGLCanvas, and how to use it?

paul p

Matzon

There is some example code in the source package under the test package. Furthermore there is a simple canvas usage in the Applet example:
http://lwjgl.org/wiki/doku.php/lwjgl/tutorials/applet

paul p

Thanks once again.

My preferred option is fullscreen mode spanning over the two displays. This I assume will give me better  speed and control than using the Canvas. Or if the Mac has two displays can I access them both from my application and have two Display objects? At the moment I cannot see how I could create two Display objects associated with the two outputs of the graphics card.

To see the work I have been doing with lwjgl please refer to my web site on comet McNaught.

http://home.pacific.net.au/~cosmic1/CometP1McNaught.html

The stereo animations I generate with my application at a resolution of 2048x768 with my Nvidia card on an XP system. However I need to get the same system working on Macs. Any more suggestions would be appreciated.

Paul P

paul p

I have used AWTGLCanvas on an undecorated JFrame set to 2048x768 to span the two displays on a Mac. This works well, thanks for your suggestion. However the Mac menu bar remains on the main display. I want my graphics to occupy all the display area. Any suggestions as to how I can turn off the Mac menu?

paul p

Fool Running

Have you tried GraphicsDevice.setFullScreenWindow()?

EDIT: Never mind, it probably won't work spanning multiple monitors :-[
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

princec

Hm, I rather think that the expected behaviour should be the same on all platforms when using Display... can this be hacked around internally?

Cas :)

catchpole

I totally get how LWJGL is lightweight and could target consoles or other such devices - but my wish is to have a 'little' more control on the desktop.  I started using the API under SWT.. I'm dropping SWT because I'm not realy making much use of it.  Maybe I could use it under AWT to get some of these things, but I'd like to avoid that also.  I'm trying to go for a lean OpenGL implementation, but it has to play nice on the desktop.  eg.  Being able to dynamically switch between windowed and fullscreen is great.

- Im developing on Mac but will target all platforms.
- I was using SWT for Window / App icon support.
- I was using SWT for Drop Down menus.. no great loss
- I was using SWT for Resizable Windowing in non-full screen mode.
- I have noticed that blank secondary window on mac.  I'de like to a) render to it b) leave it as the mac desktop - but i hear this is a Mac thing when you ask for fullscreen

I beleive that the AWT subsystem is a big chunk of code that 'starts up' when you use AWT features.  I was hoping to avoid starting it unnessiarily, but a) its probably not a big deal and b) I beleive LWJGL makes various calls to it anyway - thus starting it up anyway.

Anyway, LWJGL is cool either way.  Perhaps I'm being fussy not using SWT or AWT when they give me many of these things I want.

elias

Mac OS X isn't giving us much wiggle room. The turn-off-other-displays-in-fullscreen in unavoidable, "take it or leave it". Similarly, there's no fullscreen spanning (without cheating and leaving the menu bar and Dock). Finally, AWT is necessary, since using native Cocoa/Carbon from java doesn't work properly. I know, since my first attempt at a mac port worked, but very poorly. SWT went the other way and have implemented all sorts of hacks to get native widgets working from java - I don't want to go that route.

- elias