Summary: | White screen when using GLCanvas and "fullscreen exclusive mode". | ||
---|---|---|---|
Product: | [JogAmp] Jogl | Reporter: | Demoscene Passivist <demoscenepassivist> |
Component: | windows | Assignee: | Sven Gothel <sgothel> |
Status: | VERIFIED WONTFIX | ||
Severity: | critical | CC: | sven |
Priority: | --- | ||
Version: | 2 | ||
Hardware: | pc_x86_32 | ||
OS: | windows | ||
Type: | DEFECT | SCM Refs: | |
Workaround: | --- |
Description
Demoscene Passivist
2010-07-14 15:12:42 CEST
Implemented a small workaround for the bug using JNA (Java Native Access) to disable the DWM via a native call before setting up the GLCanvas. JNA interface declaration: import com.sun.jna.*; public interface dwmapi extends Library { dwmapi INSTANCE = (dwmapi)Native.loadLibrary("dwmapi",dwmapi.class); //http://msdn.microsoft.com/en-us/library/aa969510%28VS.85%29.aspx public int DwmEnableComposition(int uCompositionAction); } ... and then the corresponding call from my application right before the GLCanvas setup: dwmapi.INSTANCE.DwmEnableComposition(0); At least this resolves the issue of manually dsabling the DWM. As far a I have tested, it works fine on NVidia platforms. Tests on ATI pending ... I hesitate to add OpenGL driver bugs here, especially for the EOL (end of life) AWT support .. (more on this in a later post). You can use fullscreen with NEWT easily, I like to recommend this. Otherwise .. we would need the Windows compositioning toggle in our native library ? Please vote and test .. thx. (we may have to reopen this bug then) Jogl2 and Fullscreen.. just an idea.. what about switch of the dwm inside the game..and then a crash in the app.. is the dwm still switch off ??? ..and what normal user/gamer knows how to reactivate. another idea: the fullscreen is working..but needs to alt-tab twice to run.. why not simulate this after the init: the robot function can do this! and with this..it should work on win xp,vista,win7 and should not disturbing mac ... import java.awt.*; import java.awt.event.KeyEvent; ... ... init fullscreen stuff start thread/animator ... use_alt_tab(); // switch background use_alt_tab(); // switch foreground ... setupOpengl stuff ... its possible that the keyboard handler got no focus on the running game app till the mouse clicks left in the game window.. even that can do the robot without doing any damage. ---------------------------------------------------- public void altTab() { try { Robot ky_app = new Robot(); ky_app.delay(1500); //give it a little time ky_app.keyPress(KeyEvent.VK_ALT); ky_app.keyPress(KeyEvent.VK_TAB); ky_app.keyRelease(KeyEvent.VK_TAB); ky_app.keyPress(KeyEvent.VK_TAB); ky_app.keyRelease(KeyEvent.VK_TAB); ky_app.keyRelease(KeyEvent.VK_ALT); } catch (Exception e) { System.out.println("Problem..."); } } (In reply to comment #2) > I hesitate to add OpenGL driver bugs here, > especially for the EOL (end of life) AWT support .. > (more on this in a later post). > > You can use fullscreen with NEWT easily, I like to recommend this. > > Otherwise .. we would need the Windows compositioning toggle > in our native library ? Please vote and test .. thx. > > (we may have to reopen this bug then) > what about switch of the dwm inside the game..and then a crash in the app.. is > the dwm still switch off ??? ..and what normal user/gamer knows how to > reactivate. Thats no problem since DWM composition will be automatically (re)-enabled when all processes that have disabled composition have been terminated. So if the JOGL app crashes everything will be set back to normal automatically. > another idea: the fullscreen is working..but needs to alt-tab twice to run.. > why not simulate this after the init: Have u tested this ? Could be a nice and effortless multiplatform workaround for this issue. |