aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java24
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java66
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java4
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java6
-rw-r--r--src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java2
5 files changed, 51 insertions, 51 deletions
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
index cb8390504..cd0491867 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsOffscreenWGLDrawable.java
@@ -72,25 +72,25 @@ public class WindowsOffscreenWGLDrawable extends WindowsWGLDrawable {
int width = getWidth();
int height = getHeight();
BITMAPINFO info = BITMAPINFO.create();
- BITMAPINFOHEADER header = info.bmiHeader();
+ BITMAPINFOHEADER header = info.getBmiHeader();
int bitsPerPixel = (capabilities.getRedBits() +
capabilities.getGreenBits() +
capabilities.getBlueBits() +
capabilities.getAlphaBits());
- header.biSize(header.size());
- header.biWidth(width);
+ header.setBiSize(header.size());
+ header.setBiWidth(width);
// NOTE: negating the height causes the DIB to be in top-down row
// order rather than bottom-up; ends up being correct during pixel
// readback
- header.biHeight(-1 * height);
- header.biPlanes((short) 1);
- header.biBitCount((short) bitsPerPixel);
- header.biXPelsPerMeter(0);
- header.biYPelsPerMeter(0);
- header.biClrUsed(0);
- header.biClrImportant(0);
- header.biCompression(WGL.BI_RGB);
- header.biSizeImage(width * height * bitsPerPixel / 8);
+ header.setBiHeight(-1 * height);
+ header.setBiPlanes((short) 1);
+ header.setBiBitCount((short) bitsPerPixel);
+ header.setBiXPelsPerMeter(0);
+ header.setBiYPelsPerMeter(0);
+ header.setBiClrUsed(0);
+ header.setBiClrImportant(0);
+ header.setBiCompression(WGL.BI_RGB);
+ header.setBiSizeImage(width * height * bitsPerPixel / 8);
long hdc = WGL.CreateCompatibleDC(0);
if (hdc == 0) {
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index 6baedcc66..d6ea21b15 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -536,25 +536,25 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
// PIXELFORMAT
public static GLCapabilities PFD2GLCapabilities(GLProfile glp, PIXELFORMATDESCRIPTOR pfd, boolean onscreen, boolean usePBuffer) {
- if ((pfd.dwFlags() & WGL.PFD_SUPPORT_OPENGL) == 0) {
+ if ((pfd.getDwFlags() & WGL.PFD_SUPPORT_OPENGL) == 0) {
return null;
}
GLCapabilities res = new GLCapabilities(glp);
- res.setRedBits (pfd.cRedBits());
- res.setGreenBits (pfd.cGreenBits());
- res.setBlueBits (pfd.cBlueBits());
- res.setAlphaBits (pfd.cAlphaBits());
- res.setAccumRedBits (pfd.cAccumRedBits());
- res.setAccumGreenBits(pfd.cAccumGreenBits());
- res.setAccumBlueBits (pfd.cAccumBlueBits());
- res.setAccumAlphaBits(pfd.cAccumAlphaBits());
- res.setDepthBits (pfd.cDepthBits());
- res.setStencilBits (pfd.cStencilBits());
- res.setDoubleBuffered((pfd.dwFlags() & WGL.PFD_DOUBLEBUFFER) != 0);
- res.setStereo ((pfd.dwFlags() & WGL.PFD_STEREO) != 0);
- res.setHardwareAccelerated( ((pfd.dwFlags() & WGL.PFD_GENERIC_FORMAT) == 0) ||
- ((pfd.dwFlags() & WGL.PFD_GENERIC_ACCELERATED) != 0) );
- res.setOnscreen ( onscreen && ((pfd.dwFlags() & WGL.PFD_DRAW_TO_WINDOW) != 0) );
+ res.setRedBits (pfd.getCRedBits());
+ res.setGreenBits (pfd.getCGreenBits());
+ res.setBlueBits (pfd.getCBlueBits());
+ res.setAlphaBits (pfd.getCAlphaBits());
+ res.setAccumRedBits (pfd.getCAccumRedBits());
+ res.setAccumGreenBits(pfd.getCAccumGreenBits());
+ res.setAccumBlueBits (pfd.getCAccumBlueBits());
+ res.setAccumAlphaBits(pfd.getCAccumAlphaBits());
+ res.setDepthBits (pfd.getCDepthBits());
+ res.setStencilBits (pfd.getCStencilBits());
+ res.setDoubleBuffered((pfd.getDwFlags() & WGL.PFD_DOUBLEBUFFER) != 0);
+ res.setStereo ((pfd.getDwFlags() & WGL.PFD_STEREO) != 0);
+ res.setHardwareAccelerated( ((pfd.getDwFlags() & WGL.PFD_GENERIC_FORMAT) == 0) ||
+ ((pfd.getDwFlags() & WGL.PFD_GENERIC_ACCELERATED) != 0) );
+ res.setOnscreen ( onscreen && ((pfd.getDwFlags() & WGL.PFD_DRAW_TO_WINDOW) != 0) );
res.setPBuffer ( usePBuffer );
/* FIXME: Missing ??
if (GLXUtil.isMultisampleAvailable()) {
@@ -590,24 +590,24 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
if (caps.getStereo()) {
pfdFlags |= WGL.PFD_STEREO;
}
- pfd.dwFlags(pfdFlags);
- pfd.iPixelType((byte) WGL.PFD_TYPE_RGBA);
- pfd.cColorBits((byte) colorDepth);
- pfd.cRedBits ((byte) caps.getRedBits());
- pfd.cGreenBits((byte) caps.getGreenBits());
- pfd.cBlueBits ((byte) caps.getBlueBits());
- pfd.cAlphaBits((byte) caps.getAlphaBits());
+ pfd.setDwFlags(pfdFlags);
+ pfd.setIPixelType((byte) WGL.PFD_TYPE_RGBA);
+ pfd.setCColorBits((byte) colorDepth);
+ pfd.setCRedBits ((byte) caps.getRedBits());
+ pfd.setCGreenBits((byte) caps.getGreenBits());
+ pfd.setCBlueBits ((byte) caps.getBlueBits());
+ pfd.setCAlphaBits((byte) caps.getAlphaBits());
int accumDepth = (caps.getAccumRedBits() +
caps.getAccumGreenBits() +
caps.getAccumBlueBits());
- pfd.cAccumBits ((byte) accumDepth);
- pfd.cAccumRedBits ((byte) caps.getAccumRedBits());
- pfd.cAccumGreenBits((byte) caps.getAccumGreenBits());
- pfd.cAccumBlueBits ((byte) caps.getAccumBlueBits());
- pfd.cAccumAlphaBits((byte) caps.getAccumAlphaBits());
- pfd.cDepthBits((byte) caps.getDepthBits());
- pfd.cStencilBits((byte) caps.getStencilBits());
- pfd.iLayerType((byte) WGL.PFD_MAIN_PLANE);
+ pfd.setCAccumBits ((byte) accumDepth);
+ pfd.setCAccumRedBits ((byte) caps.getAccumRedBits());
+ pfd.setCAccumGreenBits((byte) caps.getAccumGreenBits());
+ pfd.setCAccumBlueBits ((byte) caps.getAccumBlueBits());
+ pfd.setCAccumAlphaBits((byte) caps.getAccumAlphaBits());
+ pfd.setCDepthBits((byte) caps.getDepthBits());
+ pfd.setCStencilBits((byte) caps.getStencilBits());
+ pfd.setILayerType((byte) WGL.PFD_MAIN_PLANE);
/* FIXME: Missing:
caps.getSampleBuffers()
@@ -623,8 +623,8 @@ public class WindowsWGLGraphicsConfiguration extends DefaultGraphicsConfiguratio
public static PIXELFORMATDESCRIPTOR createPixelFormatDescriptor() {
PIXELFORMATDESCRIPTOR pfd = PIXELFORMATDESCRIPTOR.create();
- pfd.nSize((short) pfd.size());
- pfd.nVersion((short) 1);
+ pfd.setNSize((short) pfd.size());
+ pfd.setNVersion((short) 1);
return pfd;
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
index 348664cdd..e1dca3af0 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -332,7 +332,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
try{
int[] count = new int[1];
XVisualInfo template = XVisualInfo.create();
- template.visualid(visualID);
+ template.setVisualid(visualID);
XVisualInfo[] infos = X11Lib.XGetVisualInfoCopied(display, X11Lib.VisualIDMask, template, count, 0);
if (infos == null || infos.length == 0) {
return null;
@@ -343,7 +343,7 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
}
if (DEBUG) {
System.err.println("!!! Fetched XVisualInfo for visual ID 0x" + Long.toHexString(visualID));
- System.err.println("!!! Resulting XVisualInfo: visualid = 0x" + Long.toHexString(res.visualid()));
+ System.err.println("!!! Resulting XVisualInfo: visualid = 0x" + Long.toHexString(res.getVisualid()));
}
return res;
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 908d12aa1..808f2ab7d 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -291,12 +291,12 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
if (recommendedVis == null) {
System.err.println("null visual");
} else {
- System.err.println("visual id 0x" + Long.toHexString(recommendedVis.visualid()));
+ System.err.println("visual id 0x" + Long.toHexString(recommendedVis.getVisualid()));
}
}
int[] count = new int[1];
XVisualInfo template = XVisualInfo.create();
- template.screen(screen);
+ template.setScreen(screen);
infos = X11Lib.XGetVisualInfoCopied(display, X11Lib.VisualScreenMask, template, count, 0);
if (infos == null || infos.length<1) {
throw new GLException("Error while enumerating available XVisualInfos");
@@ -305,7 +305,7 @@ public class X11GLXGraphicsConfigurationFactory extends GraphicsConfigurationFac
for (int i = 0; i < infos.length; i++) {
caps[i] = X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(glProfile, display, infos[i], onscreen, false, isMultisampleAvailable);
// Attempt to find the visual chosen by glXChooseVisual
- if (recommendedVis != null && recommendedVis.visualid() == infos[i].visualid()) {
+ if (recommendedVis != null && recommendedVis.getVisualid() == infos[i].getVisualid()) {
recommendedIndex = i;
}
}
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
index e02df3cc6..30772f8ab 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11OffscreenGLXDrawable.java
@@ -68,7 +68,7 @@ public class X11OffscreenGLXDrawable extends X11GLXDrawable {
NativeWindow nw = getNativeWindow();
X11GLXGraphicsConfiguration config = (X11GLXGraphicsConfiguration) nw.getGraphicsConfiguration().getNativeGraphicsConfiguration();
XVisualInfo vis = config.getXVisualInfo();
- int bitsPerPixel = vis.depth();
+ int bitsPerPixel = vis.getDepth();
AbstractGraphicsScreen aScreen = config.getScreen();
AbstractGraphicsDevice aDevice = aScreen.getDevice();
long dpy = aDevice.getHandle();