aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2008-08-12 13:26:44 +0000
committerSven Gothel <[email protected]>2008-08-12 13:26:44 +0000
commit79518c0e5b4be7512979b1643f78bb2e53c6f1d6 (patch)
treee00f566d2e18c5e4ddb4754eaf23bcf9c5ce42ad /src/classes/javax/media
parent65d46b634610cfb40f0ed25394bc0058b6ef420d (diff)
Adding build.xml property: 'javacdebug' and 'javacdebuglevel',
to optionally disable the debug information in the result. This speeds up the runtime on the handheld! .. ImmModeSink: Experimental disable VBO usage (perf. tests) in case high frequency data change has an impact (-> Ragdoll). (Negative ..) .. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1751 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/javax/media')
-rw-r--r--src/classes/javax/media/opengl/util/ImmModeSink.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/util/ImmModeSink.java b/src/classes/javax/media/opengl/util/ImmModeSink.java
index b2c2c8f2c..df74db5cc 100644
--- a/src/classes/javax/media/opengl/util/ImmModeSink.java
+++ b/src/classes/javax/media/opengl/util/ImmModeSink.java
@@ -46,6 +46,10 @@ public class ImmModeSink {
vComps, vDataType, cComps, cDataType, nComps, nDataType, tComps, tDataType, true);
}
+ public static boolean usesVBO() { return vboUsage; }
+
+ public static void setVBOUsage(boolean v) { vboUsage = v; }
+
public void destroy(GL gl) {
destroyList(gl);
@@ -268,6 +272,7 @@ public class ImmModeSink {
private VBOSet vboSet;
private ArrayList vboSetList;
+ private static boolean vboUsage = true;
protected static class VBOSet {
protected VBOSet (int glBufferUsage, int initialSize,
@@ -298,6 +303,12 @@ public class ImmModeSink {
this.normalVBO = GLArrayDataServer.createGLSL(GLContext.mgl_Normal, nComps, nDataType, false, initialSize, glBufferUsage);
this.texcoordVBO = GLArrayDataServer.createGLSL(GLContext.mgl_MultiTexCoord, tComps, tDataType, false, initialSize, glBufferUsage);
}
+ if(!vboUsage) {
+ this.vertexVBO.setVBOUsage(vboUsage);
+ this.colorVBO.setVBOUsage(vboUsage);
+ this.normalVBO.setVBOUsage(vboUsage);
+ this.texcoordVBO.setVBOUsage(vboUsage);
+ }
this.sealed=false;
this.mode = -1;