summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-02-10 12:54:07 +0100
committerSven Gothel <[email protected]>2011-02-10 12:54:07 +0100
commitffe215ecf60da12605b29f3fa1d08eafebcb415a (patch)
tree384603592cc2e6124c0188f25f5996711f01e8a7 /src/jogl/classes/jogamp
parentf69e77c6c7403bf823150b6b19346fcf77df31e2 (diff)
Fix Win/GDI: getAvailableGLCapabilitiesGDI() add offscreen GLCaps as well
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java16
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;
}