summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/windows
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-13 13:47:30 +0200
committerSven Gothel <[email protected]>2011-10-13 13:47:30 +0200
commit3fd89ccc138eddb915372cff4843f69f764048a7 (patch)
treee56ee402ffbec00220e4bead29b39a73b467f48e /src/jogl/classes/jogamp/opengl/windows
parent5d33b0a3ef993ff2d257c90abc3d84bc93269cd0 (diff)
MacOSX: Always release ctx on main thread (offscreen was frozen as well); Cleanup Warnings and OSX ContextUpdater
-
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/windows')
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java11
2 files changed, 9 insertions, 6 deletions
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
index 4df3b7e34..b2c95de39 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsBitmapWGLDrawable.java
@@ -93,7 +93,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
capabilities.getGreenBits() +
capabilities.getBlueBits() +
capabilities.getAlphaBits());
- header.setBiSize(header.size());
+ header.setBiSize(BITMAPINFOHEADER.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
@@ -118,7 +118,7 @@ public class WindowsBitmapWGLDrawable extends WindowsWGLDrawable {
System.err.println("WindowsBitmapWGLDrawable: " + width+"x"+height +
", bpp " + bitsPerPixel +
", bytes " + byteNum +
- ", header sz " + header.size() +
+ ", header sz " + BITMAPINFOHEADER.size() +
", DIB ptr num " + pb.capacity()+
", "+capabilities+
", werr "+werr);
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
index 83354a7fb..7be2c1ac7 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsPbufferWGLDrawable.java
@@ -46,10 +46,12 @@ import javax.media.opengl.GL;
import javax.media.opengl.GLContext;
import javax.media.opengl.GLDrawableFactory;
import javax.media.opengl.GLException;
-import javax.media.opengl.GLPbuffer;
+// import javax.media.opengl.GLPbuffer;
import javax.media.opengl.GLProfile;
import jogamp.nativewindow.windows.GDI;
+import jogamp.opengl.GLDrawableImpl;
+
import javax.media.opengl.GLCapabilitiesImmutable;
public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
@@ -152,11 +154,12 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
boolean rtt = chosenCaps.getPbufferRenderToTexture();
boolean rect = chosenCaps.getPbufferRenderToTextureRectangle();
boolean useFloat = chosenCaps.getPbufferFloatingPointBuffers();
- boolean ati = false;
+ // boolean ati = false;
+ /**
if (useFloat) {
ati = (floatMode == GLPbuffer.ATI_FLOAT);
- }
+ } */
int[] pformats = new int[WindowsWGLGraphicsConfiguration.MAX_PFORMATS];
int nformats;
@@ -243,7 +246,7 @@ public class WindowsPbufferWGLDrawable extends WindowsWGLDrawable {
{
WGLGLCapabilities newCaps = WindowsWGLGraphicsConfiguration.wglARBPFID2GLCapabilities(sharedResource, parentHdc, pfdid, glProfile, false, true);
if(null == newCaps) {
- throw new GLException("pbuffer creation error: unable to re-query chosen PFD ID: " + pfdid + ", hdc " + this.toHexString(tmpHdc));
+ throw new GLException("pbuffer creation error: unable to re-query chosen PFD ID: " + pfdid + ", hdc " + GLDrawableImpl.toHexString(tmpHdc));
}
if(newCaps.isOnscreen() || !newCaps.isPBuffer()) {
throw new GLException("Error: Selected Onscreen Caps for PBuffer: "+newCaps);