aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/impl/windows
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-11-11 18:58:31 +0100
committerMichael Bien <[email protected]>2009-11-11 18:58:31 +0100
commit1360f3839ec52a8da5420946781327cb859597c4 (patch)
tree375d0fb91a520c1cd15625242d928ab5bc226313 /src/jogl/classes/com/sun/opengl/impl/windows
parent1c73b8b7d9bdc6e060b1a81c3b92c998df1359e2 (diff)
refactoring: new struct accessor method naming conventions.
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/impl/windows')
-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
2 files changed, 45 insertions, 45 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;
}