aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/util
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-07-24 17:22:11 +0200
committerMichael Bien <[email protected]>2009-07-24 17:22:11 +0200
commit2a8e9876ca4567de3b08813c280d006f9b2c32e6 (patch)
treea44911062f30e557255162772c9b5fa64d1ad59a /src/jogl/classes/com/sun/opengl/util
parent801df10c0ee6ac6da81f1eb770dbc8a7ff7c5e38 (diff)
parent0906140a18690a9dced8dec12dfdd8cf4c95a4df (diff)
Merge branch 'master' of ssh://[email protected]/jogl~jogl-git
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/util')
-rwxr-xr-xsrc/jogl/classes/com/sun/opengl/util/FBObject.java28
1 files changed, 16 insertions, 12 deletions
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: