From 0906140a18690a9dced8dec12dfdd8cf4c95a4df Mon Sep 17 00:00:00 2001 From: sg215889 Date: Fri, 24 Jul 2009 07:29:28 -0700 Subject: Add: Extended support for CVM crosscompile: - Clean up X11 dependency - NativeWindow: - Seperate X11 out of core. - Add nativewindow.x11.jar and nativewindow.x11.cdc.jar - Newt: - Seperate X11,win,osx out of core. - Add newt.x11.jar, newt.win.jar, newt.osx.jar and the CDC variants Fix: External Context & Drawable (X11 and Windows) - Properly fetch current context values (ctx, display, drawable, ..) - Create GraphicsConfiguration based on the given pixelformat/FBConfig Fix: Java2D OpenGL Usage - Using the external context as shared for the external drawable - JAWTUtil: Skip locking in case of OGL-Flush-Queue - TODO: Windows FBO still does not work .. (X11 is fine) --- src/jogl/classes/com/sun/opengl/util/FBObject.java | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/jogl/classes/com/sun/opengl/util') diff --git a/src/jogl/classes/com/sun/opengl/util/FBObject.java b/src/jogl/classes/com/sun/opengl/util/FBObject.java index c308f430f..84b79dff4 100755 --- a/src/jogl/classes/com/sun/opengl/util/FBObject.java +++ b/src/jogl/classes/com/sun/opengl/util/FBObject.java @@ -50,15 +50,8 @@ public class FBObject { } - public boolean validateStatus(GL gl) - { - if(!gl.glIsFramebuffer(fb)) { - vStatus=-1; - return false; - } - vStatus=gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER); - //vStatus=gl.glCheckFramebufferStatus(fb); - + public boolean validateStatus(GL gl) { + vStatus = getStatus(gl, fb); switch(vStatus) { case GL.GL_FRAMEBUFFER_COMPLETE: return true; @@ -76,9 +69,20 @@ public class FBObject { } } - public String getStatusString() - { - switch(vStatus) { + public static int getStatus(GL gl, int fb) { + if(!gl.glIsFramebuffer(fb)) { + return -1; + } + return gl.glCheckFramebufferStatus(gl.GL_FRAMEBUFFER); + //return gl.glCheckFramebufferStatus(fb); + } + + public String getStatusString() { + return getStatusString(vStatus); + } + + public static String getStatusString(int fbStatus) { + switch(fbStatus) { case -1: return "NOT A FBO"; case GL.GL_FRAMEBUFFER_COMPLETE: -- cgit v1.2.3