aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/impl/windows
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2010-11-26 04:42:39 +0100
committerSven Gothel <sgothel@jausoft.com>2010-11-26 04:42:39 +0100
commita77abd78367fd8e172b6bae0fa742ac3c89bb243 (patch)
tree66c4c52bf2065dc46fda33431d3b77f1ec85ff11 /src/jogl/classes/com/jogamp/opengl/impl/windows
parent237ab306f4dba00316b8e09f571cf7cb5612d0c3 (diff)
Reduce visibility -> package private
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/impl/windows')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawable.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java73
-rw-r--r--src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java30
3 files changed, 52 insertions, 53 deletions
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);
}
}