diff options
Diffstat (limited to 'src/classes/javax')
-rw-r--r-- | src/classes/javax/media/opengl/util/ImmModeSink.java | 11 |
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; |