FullScreen JOGL in dual monitor configuration

Hi,

It seems that my game will not switch into fullscreen mode when two monitors are involved (dual head).

defaultGraphicsDevice.isFullScreenSupported();

is returning false.

Is this normal? I can understand if I was trying to fill both monitors, but I’m only using the primary display at the same resolution as the desktop.

Cheers

Peter

W2K SP4
JOGL nightly - 2006-08-16
1.5.0_06-b05

I doubt that JOGL is involved because it doesn’t change the behavior of GraphicsDevices. Did you set the full-screen window and then test to see whether display changes are supported? If the GraphicsDevice is really returning false from isFullScreenSupported() you should be able to write a small test case independent of JOGL and I would suggest you file a bug with the bug database on java.sun.com.

Always so fast to respond :slight_smile: thanks Ken.
Maybe I was a bit fast to post :slight_smile:

But the problem seems to be related to -Dsun.java2d.noddraw=true

If I exclude this flag, then isFullScreenSupported returns true, if I include the flag then isFullScreenSupported returns false. I wasn’t sure if this flag is JOGL specific or Java specific. But I know I need the flag to use JOGL :slight_smile:

Cheers

Peter

Yes, I can believe that, but this is a problem in the JDK’s full-screen support in multi-monitor configurations, not in JOGL. Can you provide a test case and exact machine configuration (OS, graphics card models, driver versions, JDK version, etc.)? Have you tried this with Java SE 6? The full-screen support for the -Dsun.java2d.noddraw=true case is much improved in JDK 6.

‘Code’:

package com.whitehexagon.gameclient;

import java.awt.GraphicsEnvironment;

public class TestFullscreen {
    public static void main(String[] args) {
        System.out.println("fullscreen available? "+GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().isFullScreenSupported());
   }
}

Command line: (just the flag value changed)

%JAVA_HOME%\bin\java -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -classpath build\classes com.whitehexagon.gameclient.TestFullscreen
%JAVA_HOME%\bin\java -Dsun.java2d.noddraw=false -Dsun.awt.noerasebackground=true -classpath build\classes com.whitehexagon.gameclient.TestFullscreen

Results

W:\prj\WhiteHexagon>F:\jdk1.5.0_06\bin\java -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true -classpath build\classes com.whitehexagon.gamec
lient.TestFullscreen
fullscreen available? false

W:\prj\WhiteHexagon>F:\jdk1.5.0_06\bin\java -Dsun.java2d.noddraw=false -Dsun.awt.noerasebackground=true -classpath build\classes com.whitehexagon.game
client.TestFullscreen
fullscreen available? true

I don’t have a 1.6 here, but maybe I can try that on another machine later today. Although I don’t really want to make the spec for the game 1.6 when its still beta.

Thanks for looking into this!

Peter

GL_RENDERER=GeForce 6200/AGP/SSE2
Nvidia driver - 91.31_winxp2kmce_english_whql.exe
W2K SP4
JOGL nightly - 2006-08-16
1.5.0_06-b05

Yes, prior to JDK 6 we did not support fullscreen exclusive mode on
non-primary screen in noddraw mode (there were some other issues
with the way fullscreen worked in this mode as well).

Please try the latest build of JDK 6…

Thanks,
Dmitri
Java2D Team

Hi, thanks for the feedback.

I tried another system with dual monitors and things seemed to work fine with both a 1.5 JVM and 1.6 JVM.

I tried a 1.6 JVM on the original test machine and fullscreen seems to be supported. SO it’s just the 1.5 that it doesn’t work (on the primary monitor)

Maybe by the time I finish this game everyone will be using a 1.6 JVM anyway :wink:

Thanks

Peter