Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4468476

Fullscreen mode incompatible with OpenGL

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      x86
    • OS:
      windows_nt

      Description

      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".

        Attachments

          Activity

            People

            • Assignee:
              mmartaksunw Michael Martak (Inactive)
              Reporter:
              kbr Kenneth Russell (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: