aboutsummaryrefslogtreecommitdiffstats
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
parentf69e77c6c7403bf823150b6b19346fcf77df31e2 (diff)
Fix Win/GDI: getAvailableGLCapabilitiesGDI() add offscreen GLCaps as well
-rw-r--r--make/scripts/tests-x32.bat5
-rw-r--r--make/scripts/tests-x64.bat5
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java16
3 files changed, 10 insertions, 16 deletions
diff --git a/make/scripts/tests-x32.bat b/make/scripts/tests-x32.bat
index 50d875a98..9b44dc178 100644
--- a/make/scripts/tests-x32.bat
+++ b/make/scripts/tests-x32.bat
@@ -1,7 +1,7 @@
REM scripts\java-win32-dbg.bat com.jogamp.newt.opengl.GLWindow
REM scripts\java-win32-dbg.bat com.jogamp.newt.opengl.GLWindow
REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen01GLPBufferNEWT -time 5000
-scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT -time 5000
+REM scripts\java-win32.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT -time 5000
REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT
REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.demos.gl2.gears.newt.TestGearsNEWT -time 30000
REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.newt.TestSwingAWTRobotUsageBeforeJOGLInitBug411
@@ -32,3 +32,6 @@ REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.newt.parenting.TestP
REM scripts\java-win32.bat com.jogamp.opengl.test.junit.newt.TestCloseNewtAWT
REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleAWT -time 10000
REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.caps.TestMultisampleNEWT -time 10000
+
+scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
+REM scripts\java-win32-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
diff --git a/make/scripts/tests-x64.bat b/make/scripts/tests-x64.bat
index d4aee05ce..246826fd6 100644
--- a/make/scripts/tests-x64.bat
+++ b/make/scripts/tests-x64.bat
@@ -47,9 +47,10 @@ REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingPr
REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol02NEWT $*
REM scripts\java-win64.bat com.jogamp.opengl.test.junit.newt.TestWindowClosingProtocol03NewtAWT $*
-REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
+scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWT01GLn $*
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.swt.TestSWTAWT01GLn $*
REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT -time 5000
-scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT
+REM scripts\java-win64-dbg.bat com.jogamp.opengl.test.junit.jogl.offscreen.TestOffscreen02BitmapNEWT
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;
}