I did something like that in jogl-1.1b4 WindowsGLContext.java :
if (availableWGLExtensions.indexOf("WGL_ARB_pixel_format") >= 0) {
int[] iattributes = {GL.WGL_NUMBER_PIXEL_FORMATS_ARB};
int[] iresults = {0};
if (dummyGL.wglGetPixelFormatAttribivARB(hdc, 0, 0, 1, iattributes, iresults))
haveWGLChoosePixelFormatARB = true;
if (availableWGLExtensions.indexOf("WGL_ARB_multisample") >= 0) {
haveWGLARBMultisample = true;
}
}
I don’t need the patch anymore for jogl-1.1b5. But I need to set ATI_WORKAROUND=false for the ATI RagePro128. Maybe only the Radeons need the workaround. With the ATI_WORKAROUND=true or autodetection I get the following exception:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x69131B77
Function=DrvSwapBuffers+0xAC3D7
Library=C:\WINDOWS\System32\atioglaa.dll
Current Java thread:
at net.java.games.jogl.impl.windows.WGL.wglCreateContext(Native Method)
at net.java.games.jogl.impl.windows.WindowsGLContext.choosePixelFormatAndCreateContext(WindowsGLContext.java:495)
at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.create(WindowsOnscreenGLContext.java:211)
at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:135)
Holger