diff options
Diffstat (limited to 'src/jogl/classes')
9 files changed, 114 insertions, 115 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java index dc74d3651..fd37c1f6d 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfiguration.java @@ -53,9 +53,9 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return configID; } - public EGLGraphicsConfiguration(AbstractGraphicsScreen absScreen, - GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, - long cfg, int cfgID) { + EGLGraphicsConfiguration(AbstractGraphicsScreen absScreen, + GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, + long cfg, int cfgID) { super(absScreen, capsChosen, capsRequested); this.chooser = chooser; config = cfg; @@ -81,7 +81,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return super.clone(); } - protected void updateGraphicsConfiguration() { + void updateGraphicsConfiguration() { EGLGraphicsConfiguration newConfig = (EGLGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration( getChosenCapabilities(), getRequestedCapabilities(), chooser, getScreen()); @@ -115,7 +115,7 @@ public class EGLGraphicsConfiguration extends DefaultGraphicsConfiguration imple return configs.get(0); } - public static boolean EGLConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { + static boolean EGLConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { boolean res; if ( onscreen ) { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java index 8f0f036aa..a9c8652b0 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/egl/EGLGraphicsConfigurationFactory.java @@ -62,7 +62,7 @@ import com.jogamp.common.nio.PointerBuffer; public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactory { protected static final boolean DEBUG = GraphicsConfigurationFactory.DEBUG || com.jogamp.opengl.impl.Debug.debug("EGL"); - public EGLGraphicsConfigurationFactory() { + EGLGraphicsConfigurationFactory() { // become the selector for KD/EGL .. GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.egl.EGLGraphicsDevice.class, this); } @@ -220,10 +220,10 @@ public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactor throw new GLException("Graphics configuration failed [direct caps, eglGetConfig/chooser and fixed-caps(1-3)]"); } - protected static EGLGraphicsConfiguration eglChooseConfig(long eglDisplay, - GLCapabilitiesImmutable capsChosen0, GLCapabilitiesImmutable capsRequested, - GLCapabilitiesChooser chooser, - AbstractGraphicsScreen absScreen) { + static EGLGraphicsConfiguration eglChooseConfig(long eglDisplay, + GLCapabilitiesImmutable capsChosen0, GLCapabilitiesImmutable capsRequested, + GLCapabilitiesChooser chooser, + AbstractGraphicsScreen absScreen) { GLProfile glp = capsChosen0.getGLProfile(); int[] attrs = EGLGraphicsConfiguration.GLCapabilities2AttribList(capsChosen0); PointerBuffer configs = PointerBuffer.allocateDirect(1); @@ -275,8 +275,8 @@ public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactor return null; } - protected static GLCapabilitiesImmutable[] eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, - boolean onscreen, boolean usePBuffer) { + static GLCapabilitiesImmutable[] eglConfigs2GLCaps(GLProfile glp, long eglDisplay, PointerBuffer configs, int num, + boolean onscreen, boolean usePBuffer) { GLCapabilitiesImmutable[] caps = new GLCapabilitiesImmutable[num]; for(int i=0; i<num; i++) { caps[i] = EGLGraphicsConfiguration.EGLConfig2Capabilities(glp, eglDisplay, configs.get(i), @@ -285,13 +285,13 @@ public class EGLGraphicsConfigurationFactory extends GraphicsConfigurationFactor return caps; } - protected static void printCaps(String prefix, GLCapabilitiesImmutable[] caps, PrintStream out) { + static void printCaps(String prefix, GLCapabilitiesImmutable[] caps, PrintStream out) { for(int i=0; i<caps.length; i++) { out.println(prefix+"["+i+"] "+caps[i]); } } - protected static EGLGraphicsConfiguration createOffscreenGraphicsConfiguration(GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsReq, GLCapabilitiesChooser chooser) { + static EGLGraphicsConfiguration createOffscreenGraphicsConfiguration(GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsReq, GLCapabilitiesChooser chooser) { if(capsChosen.isOnscreen()) { throw new GLException("Error: Onscreen set: "+capsChosen); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java index b912efd1f..c41b700dc 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfiguration.java @@ -42,9 +42,9 @@ import javax.media.opengl.*; public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration implements Cloneable { long pixelformat; - public MacOSXCGLGraphicsConfiguration(AbstractGraphicsScreen screen, - GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, - long pixelformat) { + MacOSXCGLGraphicsConfiguration(AbstractGraphicsScreen screen, + GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, + long pixelformat) { super(screen, capsChosen, capsRequested); this.pixelformat=pixelformat; } @@ -53,15 +53,15 @@ public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration return super.clone(); } - protected void setChosenPixelFormat(long pixelformat) { + void setChosenPixelFormat(long pixelformat) { this.pixelformat=pixelformat; } - protected void setChosenCapabilities(GLCapabilitiesImmutable caps) { + void setChosenCapabilities(GLCapabilitiesImmutable caps) { super.setChosenCapabilities(caps); } - protected static final int[] cglInternalAttributeToken = new int[] { + static final int[] cglInternalAttributeToken = new int[] { CGL.kCGLPFAColorFloat, CGL.NSOpenGLPFAPixelBuffer, CGL.NSOpenGLPFADoubleBuffer, @@ -74,7 +74,7 @@ public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration CGL.NSOpenGLPFASampleBuffers, CGL.NSOpenGLPFASamples }; - protected static int[] GLCapabilities2AttribList(GLCapabilitiesImmutable caps) { + static int[] GLCapabilities2AttribList(GLCapabilitiesImmutable caps) { int[] ivalues = new int[cglInternalAttributeToken.length]; for (int idx = 0; idx < cglInternalAttributeToken.length; idx++) { @@ -131,16 +131,16 @@ public class MacOSXCGLGraphicsConfiguration extends DefaultGraphicsConfiguration return ivalues; } - protected static long GLCapabilities2NSPixelFormat(GLCapabilitiesImmutable caps) { + static long GLCapabilities2NSPixelFormat(GLCapabilitiesImmutable caps) { int[] ivalues = GLCapabilities2AttribList(caps); return CGL.createPixelFormat(cglInternalAttributeToken, 0, cglInternalAttributeToken.length, ivalues, 0); } - protected static GLCapabilitiesImmutable NSPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) { + static GLCapabilitiesImmutable NSPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) { return PixelFormat2GLCapabilities(glp, pixelFormat, true); } - protected static GLCapabilitiesImmutable CGLPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) { + static GLCapabilitiesImmutable CGLPixelFormat2GLCapabilities(GLProfile glp, long pixelFormat) { return PixelFormat2GLCapabilities(glp, pixelFormat, false); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java index f53fff168..5d7a0375b 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLGraphicsConfigurationFactory.java @@ -50,7 +50,7 @@ import javax.media.opengl.GLCapabilitiesImmutable; public class MacOSXCGLGraphicsConfigurationFactory extends GraphicsConfigurationFactory { protected static final boolean DEBUG = com.jogamp.opengl.impl.Debug.debug("GraphicsConfiguration"); - public MacOSXCGLGraphicsConfigurationFactory() { + MacOSXCGLGraphicsConfigurationFactory() { GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.macosx.MacOSXGraphicsDevice.class, this); } @@ -60,10 +60,10 @@ public class MacOSXCGLGraphicsConfigurationFactory extends GraphicsConfiguration return chooseGraphicsConfigurationStatic(capsChosen, capsRequested, chooser, absScreen, false); } - protected static MacOSXCGLGraphicsConfiguration chooseGraphicsConfigurationStatic(CapabilitiesImmutable capsChosen, - CapabilitiesImmutable capsRequested, - CapabilitiesChooser chooser, - AbstractGraphicsScreen absScreen, boolean usePBuffer) { + static MacOSXCGLGraphicsConfiguration chooseGraphicsConfigurationStatic(CapabilitiesImmutable capsChosen, + CapabilitiesImmutable capsRequested, + CapabilitiesChooser chooser, + AbstractGraphicsScreen absScreen, boolean usePBuffer) { if (absScreen == null) { throw new IllegalArgumentException("AbstractGraphicsScreen is null"); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java index 68bfa97e0..a98366f58 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java @@ -101,7 +101,7 @@ public abstract class WindowsWGLDrawable extends GLDrawableImpl { return getFactoryImpl().getGLDynamicLookupHelper(0); } - protected static String getThreadName() { + static String getThreadName() { return Thread.currentThread().getName(); } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java index 900d35698..aa1b1b70d 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java @@ -40,7 +40,6 @@ import javax.media.opengl.DefaultGLCapabilitiesChooser; import javax.media.opengl.GL; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLCapabilitiesChooser; -import javax.media.opengl.GLDrawable; import javax.media.opengl.GLDrawableFactory; import javax.media.opengl.GLException; import javax.media.opengl.GLPbuffer; @@ -64,17 +63,17 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio private GLCapabilitiesChooser chooser; private boolean choosenByWGLPixelFormat=false; - public WindowsWGLGraphicsConfiguration(AbstractGraphicsScreen screen, - GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, - PIXELFORMATDESCRIPTOR pixelfmt, int pixelfmtID, GLCapabilitiesChooser chooser) { + WindowsWGLGraphicsConfiguration(AbstractGraphicsScreen screen, + GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, + PIXELFORMATDESCRIPTOR pixelfmt, int pixelfmtID, GLCapabilitiesChooser chooser) { super(screen, capsChosen, capsRequested); this.chooser=chooser; this.pixelfmt = pixelfmt; this.pixelfmtID = pixelfmtID; } - public static WindowsWGLGraphicsConfiguration create(long hdc, int pfdID, - GLProfile glp, AbstractGraphicsScreen screen, boolean onscreen, boolean usePBuffer) + static WindowsWGLGraphicsConfiguration create(long hdc, int pfdID, + GLProfile glp, AbstractGraphicsScreen screen, boolean onscreen, boolean usePBuffer) { if(pfdID<=0) { throw new GLException("Invalid pixelformat id "+pfdID); @@ -101,11 +100,11 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return super.clone(); } - protected void updateGraphicsConfiguration(GLDrawableFactory factory, NativeSurface ns) { + final void updateGraphicsConfiguration(GLDrawableFactory factory, NativeSurface ns) { WindowsWGLGraphicsConfigurationFactory.updateGraphicsConfiguration(chooser, factory, ns); } - protected void setCapsPFD(GLCapabilitiesImmutable caps, PIXELFORMATDESCRIPTOR pfd, int pfdID, boolean choosenByWGLPixelFormat) { + void setCapsPFD(GLCapabilitiesImmutable caps, PIXELFORMATDESCRIPTOR pfd, int pfdID, boolean choosenByWGLPixelFormat) { this.pixelfmt = pfd; this.pixelfmtID = pfdID; setChosenCapabilities(caps); @@ -124,7 +123,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio public int getPixelFormatID() { return pixelfmtID; } public boolean isChoosenByWGL() { return choosenByWGLPixelFormat; } - private static int fillAttribsForGeneralWGLARBQuery(boolean haveWGLARBMultisample, int[] iattributes) { + static int fillAttribsForGeneralWGLARBQuery(boolean haveWGLARBMultisample, int[] iattributes) { int niattribs = 0; iattributes[niattribs++] = WGLExt.WGL_DRAW_TO_WINDOW_ARB; iattributes[niattribs++] = WGLExt.WGL_ACCELERATION_ARB; @@ -149,7 +148,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return niattribs; } - public static boolean wglARBPFIDValid(WindowsWGLContext sharedCtx, long hdc, int pfdID) { + static boolean wglARBPFIDValid(WindowsWGLContext sharedCtx, long hdc, int pfdID) { int[] in = new int[1]; int[] out = new int[1]; in[0] = WGLExt.WGL_COLOR_BITS_ARB; @@ -160,7 +159,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return true; } - public static GLCapabilitiesImmutable wglARBPFID2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, int pfdID, + static GLCapabilitiesImmutable wglARBPFID2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, int pfdID, GLProfile glp, boolean onscreen, boolean usePBuffer) { boolean haveWGLChoosePixelFormatARB = sharedCtx.isExtensionAvailable("WGL_ARB_pixel_format"); if (!haveWGLChoosePixelFormatARB) { @@ -190,10 +189,10 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return null; } - protected static int wglChoosePixelFormatARB(long hdc, WindowsWGLContext sharedContext, - GLCapabilitiesImmutable capabilities, - int[] iattributes, int accelerationMode, float[] fattributes, - int[] pformats) + static int wglChoosePixelFormatARB(long hdc, WindowsWGLContext sharedContext, + GLCapabilitiesImmutable capabilities, + int[] iattributes, int accelerationMode, float[] fattributes, + int[] pformats) { int numFormats = -1; @@ -230,8 +229,8 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return numFormats; } - public static GLCapabilitiesImmutable[] wglARBPFIDs2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, int[] pfdIDs, int numFormats, - GLProfile glp, boolean onscreen, boolean usePBuffer) { + static GLCapabilitiesImmutable[] wglARBPFIDs2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, int[] pfdIDs, int numFormats, + GLProfile glp, boolean onscreen, boolean usePBuffer) { boolean haveWGLChoosePixelFormatARB = sharedCtx.isExtensionAvailable("WGL_ARB_pixel_format"); if (!haveWGLChoosePixelFormatARB) { return null; @@ -269,8 +268,8 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio * @param pfIDs stores the PIXELFORMAT ID for the GLCapabilitiesImmutable[] * @return the resulting GLCapabilitiesImmutable[] */ - public static GLCapabilitiesImmutable[] wglARBAllPFIDs2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, - GLProfile glp, boolean onscreen, boolean usePBuffer, int[] pfIDs) { + static GLCapabilitiesImmutable[] wglARBAllPFIDs2GLCapabilities(WindowsWGLContext sharedCtx, long hdc, + GLProfile glp, boolean onscreen, boolean usePBuffer, int[] pfIDs) { boolean haveWGLChoosePixelFormatARB = sharedCtx.isExtensionAvailable("WGL_ARB_pixel_format"); if (!haveWGLChoosePixelFormatARB) { return null; @@ -323,12 +322,12 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return availableCaps; } - public static boolean GLCapabilities2AttribList(GLCapabilitiesImmutable caps, - int[] iattributes, - GLContextImpl sharedCtx, - int accellerationValue, - boolean pbuffer, - int[] floatMode) throws GLException { + static boolean GLCapabilities2AttribList(GLCapabilitiesImmutable caps, + int[] iattributes, + GLContextImpl sharedCtx, + int accellerationValue, + boolean pbuffer, + int[] floatMode) throws GLException { boolean haveWGLChoosePixelFormatARB = sharedCtx.isExtensionAvailable("WGL_ARB_pixel_format"); boolean haveWGLARBMultisample = sharedCtx.isExtensionAvailable("WGL_ARB_multisample"); if(DEBUG) { @@ -493,9 +492,9 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio public static final int BITMAP_BIT = 1 << 1 ; public static final int PBUFFER_BIT = 1 << 2 ; - public static int WGLConfig2DrawableTypeBits(int[] iattribs, - int niattribs, - int[] iresults) { + static int WGLConfig2DrawableTypeBits(int[] iattribs, + int niattribs, + int[] iresults) { int val = 0; for (int i = 0; i < niattribs; i++) { @@ -515,7 +514,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return val; } - public static boolean WGLConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { + static boolean WGLConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { boolean res; if ( onscreen ) { @@ -531,11 +530,11 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return res; } - public static GLCapabilitiesImmutable AttribList2GLCapabilities( - GLProfile glp, int[] iattribs, - int niattribs, - int[] iresults, - boolean onscreen, boolean usePBuffer) { + static GLCapabilitiesImmutable AttribList2GLCapabilities( + GLProfile glp, int[] iattribs, + int niattribs, + int[] iresults, + boolean onscreen, boolean usePBuffer) { GLCapabilities res = new GLCapabilities(glp); int drawableTypeBits = WGLConfig2DrawableTypeBits(iattribs, niattribs, iresults); if(WGLConfigDrawableTypeVerify(drawableTypeBits, onscreen, usePBuffer)) { @@ -645,7 +644,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio // PIXELFORMAT - public static GLCapabilitiesImmutable PFD2GLCapabilities(GLProfile glp, PIXELFORMATDESCRIPTOR pfd, boolean onscreen, boolean usePBuffer) { + static GLCapabilitiesImmutable PFD2GLCapabilities(GLProfile glp, PIXELFORMATDESCRIPTOR pfd, boolean onscreen, boolean usePBuffer) { if ((pfd.getDwFlags() & GDI.PFD_SUPPORT_OPENGL) == 0) { return null; } @@ -679,7 +678,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return res; } - public static PIXELFORMATDESCRIPTOR GLCapabilities2PFD(GLCapabilitiesImmutable caps) { + static PIXELFORMATDESCRIPTOR GLCapabilities2PFD(GLCapabilitiesImmutable caps) { int colorDepth = (caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits()); @@ -731,7 +730,7 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio return pfd; } - public static PIXELFORMATDESCRIPTOR createPixelFormatDescriptor() { + static PIXELFORMATDESCRIPTOR createPixelFormatDescriptor() { PIXELFORMATDESCRIPTOR pfd = PIXELFORMATDESCRIPTOR.create(); pfd.setNSize((short) pfd.size()); pfd.setNVersion((short) 1); diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java index c08ea6395..c9fda109f 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java @@ -62,7 +62,7 @@ import javax.media.opengl.GLCapabilitiesImmutable; public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfigurationFactory { protected static final boolean DEBUG = com.jogamp.opengl.impl.Debug.debug("GraphicsConfiguration"); - public WindowsWGLGraphicsConfigurationFactory() { + WindowsWGLGraphicsConfigurationFactory() { GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.windows.WindowsGraphicsDevice.class, this); } @@ -80,18 +80,18 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio return chooseGraphicsConfigurationStatic((GLCapabilitiesImmutable)capsChosen, (GLCapabilitiesImmutable)capsRequested, chooser, absScreen); } - protected static WindowsWGLGraphicsConfiguration createDefaultGraphicsConfiguration(GLCapabilitiesImmutable caps, - AbstractGraphicsScreen absScreen) { + static WindowsWGLGraphicsConfiguration createDefaultGraphicsConfiguration(GLCapabilitiesImmutable caps, + AbstractGraphicsScreen absScreen) { if(null==absScreen) { absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); } return new WindowsWGLGraphicsConfiguration(absScreen, caps, caps, WindowsWGLGraphicsConfiguration.GLCapabilities2PFD(caps), -1, null); } - protected static WindowsWGLGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen, - GLCapabilitiesImmutable capsReq, - CapabilitiesChooser chooser, - AbstractGraphicsScreen absScreen) { + static WindowsWGLGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen, + GLCapabilitiesImmutable capsReq, + CapabilitiesChooser chooser, + AbstractGraphicsScreen absScreen) { if(null==absScreen) { absScreen = DefaultGraphicsScreen.createDefault(NativeWindowFactory.TYPE_WINDOWS); } @@ -108,8 +108,8 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio (GLCapabilitiesChooser)chooser); } - protected static void updateGraphicsConfiguration(CapabilitiesChooser chooser, - GLDrawableFactory _factory, NativeSurface ns) { + static void updateGraphicsConfiguration(CapabilitiesChooser chooser, + GLDrawableFactory _factory, NativeSurface ns) { if (ns == null) { throw new IllegalArgumentException("NativeSurface is null"); } @@ -132,8 +132,8 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio } } - protected static boolean updateGraphicsConfigurationARB(long hdc, WindowsWGLGraphicsConfiguration config, - CapabilitiesChooser chooser, WindowsWGLDrawableFactory factory) { + private static boolean updateGraphicsConfigurationARB(long hdc, WindowsWGLGraphicsConfiguration config, + CapabilitiesChooser chooser, WindowsWGLDrawableFactory factory) { AbstractGraphicsDevice device = config.getScreen().getDevice(); WindowsWGLContext sharedContext = (WindowsWGLContext) factory.getOrCreateSharedContextImpl(device); if (null == sharedContext) { @@ -290,8 +290,8 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio return true; } - protected static boolean updateGraphicsConfigurationGDI(long hdc, WindowsWGLGraphicsConfiguration config, - CapabilitiesChooser chooser, WindowsWGLDrawableFactory factory) { + private static boolean updateGraphicsConfigurationGDI(long hdc, WindowsWGLGraphicsConfiguration config, + CapabilitiesChooser chooser, WindowsWGLDrawableFactory factory) { AbstractGraphicsDevice device = config.getScreen().getDevice(); WindowsWGLContext sharedContext = (WindowsWGLContext) factory.getOrCreateSharedContextImpl(device); if (null == sharedContext) { @@ -417,11 +417,11 @@ public class WindowsWGLGraphicsConfigurationFactory extends GraphicsConfiguratio } - protected static String getThreadName() { + static String getThreadName() { return Thread.currentThread().getName(); } - public static String toHexString(long hex) { + static String toHexString(long hex) { return "0x" + Long.toHexString(hex); } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java index 746be6c87..3dbaab21b 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java @@ -48,16 +48,16 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem private int fbConfigID; private GLCapabilitiesChooser chooser; - public X11GLXGraphicsConfiguration(X11GraphicsScreen screen, - GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, - XVisualInfo info, long fbcfg, int fbcfgID) { + X11GLXGraphicsConfiguration(X11GraphicsScreen screen, + GLCapabilitiesImmutable capsChosen, GLCapabilitiesImmutable capsRequested, GLCapabilitiesChooser chooser, + XVisualInfo info, long fbcfg, int fbcfgID) { super(screen, capsChosen, capsRequested, info); this.chooser=chooser; fbConfig = fbcfg; fbConfigID = fbcfgID; } - public static X11GLXGraphicsConfiguration create(GLProfile glp, X11GraphicsScreen x11Screen, int fbcfgID) { + static X11GLXGraphicsConfiguration create(GLProfile glp, X11GraphicsScreen x11Screen, int fbcfgID) { long display = x11Screen.getDevice().getHandle(); if(0==display) { throw new GLException("Display null of "+x11Screen); @@ -88,7 +88,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem public long getFBConfig() { return fbConfig; } public int getFBConfigID() { return fbConfigID; } - protected void updateGraphicsConfiguration() { + void updateGraphicsConfiguration() { X11GLXGraphicsConfiguration newConfig = (X11GLXGraphicsConfiguration) GraphicsConfigurationFactory.getFactory(getScreen().getDevice()).chooseGraphicsConfiguration( getChosenCapabilities(), getRequestedCapabilities(), chooser, getScreen()); @@ -108,11 +108,11 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return value != 0 ? value : (int)GLX.GLX_DONT_CARE ; } - public static int[] GLCapabilities2AttribList(GLCapabilitiesImmutable caps, - boolean forFBAttr, - boolean isMultisampleAvailable, - long display, - int screen) + static int[] GLCapabilities2AttribList(GLCapabilitiesImmutable caps, + boolean forFBAttr, + boolean isMultisampleAvailable, + long display, + int screen) { int colorDepth = (caps.getRedBits() + caps.getGreenBits() + @@ -212,7 +212,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem // FBConfig - public static boolean GLXFBConfigValid(long display, long fbcfg) { + static boolean GLXFBConfigValid(long display, long fbcfg) { int[] tmp = new int[1]; if(GLX.GLX_BAD_ATTRIBUTE == GLX.glXGetFBConfigAttrib(display, fbcfg, GLX.GLX_RENDER_TYPE, tmp, 0)) { return false; @@ -220,7 +220,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return true; } - public static boolean GLXFBConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { + static boolean GLXFBConfigDrawableTypeVerify(int val, boolean onscreen, boolean usePBuffer) { boolean res; if ( onscreen ) { @@ -236,9 +236,9 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return res; } - public static GLCapabilitiesImmutable GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg, - boolean relaxed, boolean onscreen, boolean usePBuffer, - boolean isMultisampleAvailable) { + static GLCapabilitiesImmutable GLXFBConfig2GLCapabilities(GLProfile glp, long display, long fbcfg, + boolean relaxed, boolean onscreen, boolean usePBuffer, + boolean isMultisampleAvailable) { int[] tmp = new int[1]; int val; val = glXGetFBConfig(display, fbcfg, GLX.GLX_RENDER_TYPE, tmp, 0); @@ -308,7 +308,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem } } - public static int glXGetFBConfig(long display, long cfg, int attrib, int[] tmp, int tmp_offset) { + static int glXGetFBConfig(long display, long cfg, int attrib, int[] tmp, int tmp_offset) { if (display == 0) { throw new GLException("No display connection"); } @@ -319,12 +319,12 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return tmp[tmp_offset]; } - public static int glXFBConfig2FBConfigID(long display, long cfg) { + static int glXFBConfig2FBConfigID(long display, long cfg) { int[] tmpID = new int[1]; return glXGetFBConfig(display, cfg, GLX.GLX_FBCONFIG_ID, tmpID, 0); } - public static long glXFBConfigID2FBConfig(long display, int screen, int id) { + static long glXFBConfigID2FBConfig(long display, int screen, int id) { int[] attribs = new int[] { GLX.GLX_FBCONFIG_ID, id, 0 }; int[] count = { -1 }; PointerBuffer fbcfgsL = GLX.glXChooseFBConfig(display, screen, attribs, 0, count, 0); @@ -336,7 +336,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem // Visual Info - public static XVisualInfo XVisualID2XVisualInfo(long display, long visualID) { + static XVisualInfo XVisualID2XVisualInfo(long display, long visualID) { int[] count = new int[1]; XVisualInfo template = XVisualInfo.create(); template.setVisualid(visualID); @@ -352,8 +352,8 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return res; } - public static GLCapabilitiesImmutable XVisualInfo2GLCapabilities(GLProfile glp, long display, XVisualInfo info, - boolean onscreen, boolean usePBuffer, boolean isMultisampleEnabled) { + static GLCapabilitiesImmutable XVisualInfo2GLCapabilities(GLProfile glp, long display, XVisualInfo info, + boolean onscreen, boolean usePBuffer, boolean isMultisampleEnabled) { int[] tmp = new int[1]; int val = glXGetConfig(display, info, GLX.GLX_USE_GL, tmp, 0); if (val == 0) { @@ -406,7 +406,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem } } - public static int glXGetConfig(long display, XVisualInfo info, int attrib, int[] tmp, int tmp_offset) { + static int glXGetConfig(long display, XVisualInfo info, int attrib, int[] tmp, int tmp_offset) { if (display == 0) { throw new GLException("No display connection"); } @@ -417,11 +417,11 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem return tmp[tmp_offset]; } - public static String toHexString(int val) { + static String toHexString(int val) { return "0x"+Integer.toHexString(val); } - public static String toHexString(long val) { + static String toHexString(long val) { return "0x"+Long.toHexString(val); } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java index b2f493932..fcd2e4266 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java @@ -63,7 +63,7 @@ import com.jogamp.opengl.impl.Debug; public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFactory { protected static final boolean DEBUG = Debug.debug("GraphicsConfiguration"); - public X11GLXGraphicsConfigurationFactory() { + X11GLXGraphicsConfigurationFactory() { GraphicsConfigurationFactory.registerFactory(javax.media.nativewindow.x11.X11GraphicsDevice.class, this); } @@ -89,7 +89,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac } /** - protected static X11GLXGraphicsConfiguration createDefaultGraphicsConfigurationFBConfig(AbstractGraphicsScreen absScreen, boolean onscreen, boolean usePBuffer) { + static X11GLXGraphicsConfiguration createDefaultGraphicsConfigurationFBConfig(AbstractGraphicsScreen absScreen, boolean onscreen, boolean usePBuffer) { if (absScreen == null) { throw new IllegalArgumentException("AbstractGraphicsScreen is null"); } @@ -138,10 +138,10 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac return new X11GLXGraphicsConfiguration(x11Screen, (null!=capsFB)?capsFB:availableCaps, availableCaps, null, xvis, fbcfg, fbid); } */ - protected static X11GLXGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen, - GLCapabilitiesImmutable capsReq, - GLCapabilitiesChooser chooser, - X11GraphicsScreen x11Screen) { + static X11GLXGraphicsConfiguration chooseGraphicsConfigurationStatic(GLCapabilitiesImmutable capsChosen, + GLCapabilitiesImmutable capsReq, + GLCapabilitiesChooser chooser, + X11GraphicsScreen x11Screen) { if (x11Screen == null) { throw new IllegalArgumentException("AbstractGraphicsScreen is null"); } @@ -176,7 +176,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac return res; } - protected static X11GLXGraphicsConfiguration fetchGraphicsConfigurationFBConfig(X11GraphicsScreen x11Screen, int fbID, GLProfile glp) { + static X11GLXGraphicsConfiguration fetchGraphicsConfigurationFBConfig(X11GraphicsScreen x11Screen, int fbID, GLProfile glp) { AbstractGraphicsDevice absDevice = x11Screen.getDevice(); long display = absDevice.getHandle(); int screen = x11Screen.getIndex(); @@ -411,11 +411,11 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac return new X11GLXGraphicsConfiguration(x11Screen, caps[chosen], capsReq, chooser, retXVisualInfo, 0, -1); } - public static String toHexString(int val) { + static String toHexString(int val) { return "0x"+Integer.toHexString(val); } - public static String toHexString(long val) { + static String toHexString(long val) { return "0x"+Long.toHexString(val); } |