diff options
author | Sven Gothel <[email protected]> | 2011-02-10 12:54:07 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-02-10 12:54:07 +0100 |
commit | ffe215ecf60da12605b29f3fa1d08eafebcb415a (patch) | |
tree | 384603592cc2e6124c0188f25f5996711f01e8a7 /src/jogl/classes/jogamp/opengl/windows | |
parent | f69e77c6c7403bf823150b6b19346fcf77df31e2 (diff) |
Fix Win/GDI: getAvailableGLCapabilitiesGDI() add offscreen GLCaps as well
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java | 16 |
1 files changed, 3 insertions, 13 deletions
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/*<WGLGLCapabilities>*/ getAvailableGLCapabilitiesGDI(long hdc, GLCapabilitiesImmutable capsChosen) { - boolean onscreen = capsChosen.isOnscreen(); - if(capsChosen.isPBuffer()) { - return null; - } - GLProfile glProfile = capsChosen.getGLProfile(); - + static List/*<WGLGLCapabilities>*/ 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; } |