-
Bug
-
Resolution: Fixed
-
P2
-
1.4.0
-
beta2
-
x86
-
windows_nt
Using "OpenGL for Java" (www.jausoft.com) to perform OpenGL rendering to AWT
canvases on Win32, switching to fullscreen mode using the existing DirectDraw
implementation causes the screen to become corrupted.
There are known longstanding incompatibilities between DirectDraw, Direct3D and
OpenGL.
Fortunately there appears to be a relatively simple fix. Specifying
-Dsun.java2d.noddraw=true currently causes
GraphicsDevice.isFullScreenSupported() to return false on Win32. This could be
changed to have the following behavior when DirectDraw is disabled:
- GraphicsDevice.isFullScreenSupported() and isDisplayChangeSupported() could
return true
- GraphicsDevice.setFullScreenWindow() could be a no-op (user would be
responsible for ensuring the window was the appropriate size; in addition,
undecorated frames already specify the WM_POPUP flag needed to get the full-
screen window to show up above the Windows taskbar)
- GraphicsDevice.getDisplayModes() could use the GDI call EnumDisplaySettings()
to discover the available display modes
- GraphicsDevice.setDisplayMode() would use the Windows GDI call
ChangeDisplaySettings listed in the "suggested fix" to change to the
appropriate display mode.
Have spoken with Michael.Martak@eng about this bug and we agree that it is
something that must be fixed in Merlin.
To run the attached test case, unzip it, add gl4java.jar and
gl4java-glutfonts.jar to $CLASSPATH and GL4JavaJauGljJNI13.dll and
natives/Debug/HiPerfGL.dll to $PATH. Then run "java LoadingScreen".
canvases on Win32, switching to fullscreen mode using the existing DirectDraw
implementation causes the screen to become corrupted.
There are known longstanding incompatibilities between DirectDraw, Direct3D and
OpenGL.
Fortunately there appears to be a relatively simple fix. Specifying
-Dsun.java2d.noddraw=true currently causes
GraphicsDevice.isFullScreenSupported() to return false on Win32. This could be
changed to have the following behavior when DirectDraw is disabled:
- GraphicsDevice.isFullScreenSupported() and isDisplayChangeSupported() could
return true
- GraphicsDevice.setFullScreenWindow() could be a no-op (user would be
responsible for ensuring the window was the appropriate size; in addition,
undecorated frames already specify the WM_POPUP flag needed to get the full-
screen window to show up above the Windows taskbar)
- GraphicsDevice.getDisplayModes() could use the GDI call EnumDisplaySettings()
to discover the available display modes
- GraphicsDevice.setDisplayMode() would use the Windows GDI call
ChangeDisplaySettings listed in the "suggested fix" to change to the
appropriate display mode.
Have spoken with Michael.Martak@eng about this bug and we agree that it is
something that must be fixed in Merlin.
To run the attached test case, unzip it, add gl4java.jar and
gl4java-glutfonts.jar to $CLASSPATH and GL4JavaJauGljJNI13.dll and
natives/Debug/HiPerfGL.dll to $PATH. Then run "java LoadingScreen".