From 1c05c85e1ccc480da227cd6aa4718efd386e1e35 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 21 Jun 2012 20:14:46 +0200 Subject: JOGL CapabilitiesChooser-API and impl.: Cleanup using generics: 'List l' -> 'List l' --- .../wgl/WindowsWGLGraphicsConfiguration.java | 24 +++++++++++----------- .../WindowsWGLGraphicsConfigurationFactory.java | 14 ++++++------- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/windows/wgl') diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java index 5682b35e8..408d8b074 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -317,10 +317,10 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio throw new GLException("wglARBPFID2GLCapabilities: Error getting pixel format attributes for pixel format " + pfdID + " of device context " + toHexString(hdc) + ", werr " + GDI.GetLastError()); } - ArrayList bucket = new ArrayList(1); + List bucket = new ArrayList(1); final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); if(AttribList2GLCapabilities(bucket, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits)) { - return bucket.get(0); + return (WGLGLCapabilities) bucket.get(0); } return null; } @@ -372,19 +372,19 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return pformats; } - static List /**/ wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) { + static List wglARBPFIDs2GLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp, boolean onscreen, boolean usePBuffer) { final int winattrbits = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, usePBuffer); return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, winattrbits); } - static List /**/ wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp) { + static List wglARBPFIDs2AllGLCapabilities(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp) { return wglARBPFIDs2GLCapabilitiesImpl(sharedResource, hdc, pfdIDs, glp, GLGraphicsConfigurationUtil.ALL_BITS); } - private static List /**/ wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource, - long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) { + private static List wglARBPFIDs2GLCapabilitiesImpl(WindowsWGLDrawableFactory.SharedResource sharedResource, + long hdc, int[] pfdIDs, GLProfile glp, int winattrbits) { if (!sharedResource.hasARBPixelFormat()) { return null; } @@ -600,7 +600,7 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio return val; } - static boolean AttribList2GLCapabilities( ArrayList capsBucket, + static boolean AttribList2GLCapabilities( List capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int[] iattribs, final int niattribs, final int[] iresults, final int winattrmask) { @@ -659,14 +659,14 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio static WGLGLCapabilities PFD2GLCapabilities(GLProfile glp, long hdc, int pfdID, boolean onscreen) { final int winattrmask = GLGraphicsConfigurationUtil.getWinAttributeBits(onscreen, false); - ArrayList capsBucket = new ArrayList(1); + List capsBucket = new ArrayList(1); if( PFD2GLCapabilities(capsBucket, glp, hdc, pfdID, winattrmask) ) { - return capsBucket.get(0); + return (WGLGLCapabilities) capsBucket.get(0); } return null; } - static boolean PFD2GLCapabilities(ArrayList capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) { + static boolean PFD2GLCapabilities(List capsBucket, final GLProfile glp, final long hdc, final int pfdID, final int winattrmask) { PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor(hdc, pfdID); if(null == pfd) { return false; diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index 2c8c03185..850b64aa8 100644 --- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -115,7 +115,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat WindowsWGLDrawable sharedDrawable = sharedResource.getDrawable(); GLCapabilitiesImmutable capsChosen = sharedDrawable.getChosenGLCapabilities(); WindowsWGLContext sharedContext = sharedResource.getContext(); - List/**/ availableCaps = null; + List availableCaps = null; if ( sharedResource.needsCurrentContext4ARBPFDQueries() ) { if(GLContext.CONTEXT_NOT_CURRENT == sharedContext.makeCurrent()) { @@ -149,15 +149,15 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat return availableCaps; } - static List/**/ getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) { + static List getAvailableGLCapabilitiesARB(long hdc, WindowsWGLDrawableFactory.SharedResource sharedResource, GLProfile glProfile) { int[] pformats = WindowsWGLGraphicsConfiguration.wglAllARBPFIDs(sharedResource.getContext(), hdc); return WindowsWGLGraphicsConfiguration.wglARBPFIDs2AllGLCapabilities(sharedResource, hdc, pformats, glProfile); } - static List/**/ getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) { + static List getAvailableGLCapabilitiesGDI(long hdc, GLProfile glProfile) { int[] pformats = WindowsWGLGraphicsConfiguration.wglAllGDIPFIDs(hdc); int numFormats = pformats.length; - ArrayList bucket = new ArrayList(numFormats); + List bucket = new ArrayList(numFormats); for (int i = 0; i < numFormats; i++) { WindowsWGLGraphicsConfiguration.PFD2GLCapabilities(bucket, glProfile, hdc, pformats[i], GLGraphicsConfigurationUtil.ALL_BITS); } @@ -370,7 +370,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } } - List /**/ availableCaps = + List availableCaps = WindowsWGLGraphicsConfiguration.wglARBPFIDs2GLCapabilities(sharedResource, hdc, pformats, glProfile, onscreen, usePBuffer); if( null == availableCaps || 0 == availableCaps.size() ) { @@ -431,7 +431,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat boolean onscreen = capsChosen.isOnscreen(); GLProfile glProfile = capsChosen.getGLProfile(); - ArrayList availableCaps = new ArrayList(); + List availableCaps = new ArrayList(); int pfdID; // chosen or preset PFD ID WGLGLCapabilities pixelFormatCaps = null; // chosen or preset PFD ID's caps boolean pixelFormatSet = false; // indicates a preset PFD ID [caps] @@ -481,7 +481,7 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat } return false; } - pixelFormatCaps = availableCaps.get(chosenIndex); + pixelFormatCaps = (WGLGLCapabilities) availableCaps.get(chosenIndex); if (DEBUG) { System.err.println("chosen pfdID (GDI): native recommended "+ (recommendedIndex+1) + ", caps " + pixelFormatCaps); -- cgit v1.2.3