From ffe215ecf60da12605b29f3fa1d08eafebcb415a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 10 Feb 2011 12:54:07 +0100 Subject: Fix Win/GDI: getAvailableGLCapabilitiesGDI() add offscreen GLCaps as well --- .../wgl/WindowsWGLGraphicsConfigurationFactory.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/windows') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 7a3be9edb..d8b84d1cb 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -125,7 +125,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat availableCaps = getAvailableGLCapabilitiesARB(hdc, sharedContext, capsChosen.getGLProfile()); } if( null == availableCaps || 0 == availableCaps.size() ) { - availableCaps = getAvailableGLCapabilitiesGDI(hdc, capsChosen); + availableCaps = getAvailableGLCapabilitiesGDI(hdc, capsChosen.getGLProfile()); } } finally { sharedDrawable.unlockSurface(); @@ -142,22 +142,12 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat return WindowsWGLGraphicsConfiguration.wglARBPFIDs2AllGLCapabilities(sharedContext, hdc, pformats, glProfile); } - static List/**/ getAvailableGLCapabilitiesGDI(long hdc, GLCapabilitiesImmutable capsChosen) { - boolean onscreen = capsChosen.isOnscreen(); - if(capsChosen.isPBuffer()) { - return null; - } - GLProfile glProfile = capsChosen.getGLProfile(); - + static List/**/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) { int[] pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc); int numFormats = pformats.length; ArrayList bucket = new ArrayList(numFormats); for (int i = 0; i < numFormats; i++) { - WGLGLCapabilities wglglcapabilities = WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(glProfile, hdc, pformats[i], onscreen); - // formats that don't draw to a window come back null; don't add them or they'll crash debug output - if( null != wglglcapabilities ) { - bucket.add( wglglcapabilities ); - } + WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(bucket, glProfile, hdc, pformats[i], GLGraphicsConfigurationUtil.ALL_BITS); } return bucket; } -- cgit v1.2.3