From 4d2f4a1b75dc176b2b46de5076b587b70988ac42 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 18 Apr 2013 09:56:49 +0200 Subject: Bug 718: Exclude updateGraphicsConfigurationARB(..) usage for BITMAP (Windows Vista does report BITMAP w/ ARB PFD) On Windows Vista machines, ARB PFD selection reports BITMAP which is attempted to be used. Excluse updateGraphicsConfigurationARB(..) from BITMAP query, similar to getAvailableGLCapabilitiesARB() from commit 61a47e07975eb2fd8b1f5f60552935c993a6eef6. TODO: Re-evaluate commit db24615ebaebcda88ffb7275d3a60e6400226099 --- .../windows/wgl/WindowsWGLGraphicsConfigurationFactory.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 62a21922f..1e72e312b 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -290,8 +290,12 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } } try { - if( !((GLCapabilitiesImmutable)config.getChosenCapabilities()).getHardwareAccelerated() - || !updateGraphicsConfigurationARB((WindowsWGLDrawableFactory)factory, config, chooser, hdc, extHDC, pfdIDs) ) { + final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities(); + boolean done = false; + if( capsChosen.getHardwareAccelerated() && !capsChosen.isBitmap() ) { + done = updateGraphicsConfigurationARB((WindowsWGLDrawableFactory)factory, config, chooser, hdc, extHDC, pfdIDs); + } + if( !done ) { updateGraphicsConfigurationGDI(config, chooser, hdc, extHDC, pfdIDs); } } finally { @@ -321,7 +325,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities(); final boolean isOpaque = capsChosen.isBackgroundOpaque() && GDI.DwmIsCompositionEnabled(); - final int winattrbits = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen); + final int winattrbits = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen) & ~GLGraphicsConfigurationUtil.BITMAP_BIT; // w/o BITMAP final GLProfile glProfile = capsChosen.getGLProfile(); final int pfdIDCount = WindowsWGLGraphicsConfiguration.wglARBPFDIDCount((WindowsWGLContext)sharedResource.getContext(), hdc); -- cgit v1.2.3