From 76f7552c4a219b116e86949f271e613ba0f6f160 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 1 Aug 2011 20:14:26 +0200 Subject: Cont. fix 'Allow VBO/Texture Name (int) < 0' Refines spec GLArrayData and it's implementations. see commit 4d33a2df1e991ab75817dcb44061d88d3c499cdb see commit 2dbd16fc3edf29b39ba37a11b9fbf1b2aad75c45 --- .../com/jogamp/opengl/util/GLArrayDataClient.java | 8 ++++---- .../com/jogamp/opengl/util/GLArrayDataServer.java | 8 ++++---- .../com/jogamp/opengl/util/GLArrayDataWrapper.java | 16 ++++++++-------- 3 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java index d80d398aa..4296ebee2 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java @@ -52,7 +52,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData { GLArrayDataClient adc = new GLArrayDataClient(); GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc); - adc.init(name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, -1, -1, -1, -1); + adc.init(name, index, comps, dataType, normalized, 0, null, initialSize, false, glArrayHandler, 0, 0, 0, 0); return adc; } @@ -83,7 +83,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData { GLArrayDataClient adc = new GLArrayDataClient(); GLArrayHandler glArrayHandler = new GLFixedArrayHandler(adc); - adc.init(name, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, -1, -1, -1, -1); + adc.init(name, index, comps, dataType, normalized, stride, buffer, comps*comps, false, glArrayHandler, 0, 0, 0, 0); return adc; } @@ -104,7 +104,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData { GLArrayDataClient adc = new GLArrayDataClient(); GLArrayHandler glArrayHandler = new GLSLArrayHandler(st, adc); - adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, -1, -1, -1, -1); + adc.init(name, -1, comps, dataType, normalized, 0, null, initialSize, true, glArrayHandler, 0, 0, 0, 0); return adc; } @@ -127,7 +127,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData { GLArrayDataClient adc = new GLArrayDataClient(); GLArrayHandler glArrayHandler = new GLSLArrayHandler(st, adc); - adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, -1, -1, -1, -1); + adc.init(name, -1, comps, dataType, normalized, stride, buffer, comps*comps, true, glArrayHandler, 0, 0, 0, 0); return adc; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java index 23c237909..b244184b0 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataServer.java @@ -216,16 +216,16 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE ", elements "+getElementNumber()+ ", components "+components+ ", stride "+stride+"u "+strideB+"b "+strideL+"c"+ - ", initialSize "+initialSize+ - ", vboUsage 0x"+Integer.toHexString(vboUsage)+ - ", vboTarget 0x"+Integer.toHexString(vboTarget)+ + ", initialSize "+initialSize+ ", vboEnabled "+vboEnabled+ ", vboName "+vboName+ + ", vboUsage 0x"+Integer.toHexString(vboUsage)+ + ", vboTarget 0x"+Integer.toHexString(vboTarget)+ + ", vboOffset 0x"+Long.toHexString(vboOffset)+ ", sealed "+sealed+ ", bufferEnabled "+bufferEnabled+ ", bufferWritten "+bufferWritten+ ", buffer "+buffer+ - ", offset "+vboOffset+ ", alive "+alive+ "]"; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java index 5f0c9b8db..798e1bca3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataWrapper.java @@ -102,15 +102,15 @@ public class GLArrayDataWrapper implements GLArrayData { public final String getName() { return name; } - public final long getVBOOffset() { return vboEnabled?vboOffset:-1; } + public final long getVBOOffset() { return vboEnabled?vboOffset:0; } - public final int getVBOName() { return vboEnabled?vboName:-1; } + public final int getVBOName() { return vboEnabled?vboName:0; } public final boolean isVBO() { return vboEnabled; } - public final int getVBOUsage() { return vboEnabled?vboUsage:-1; } + public final int getVBOUsage() { return vboEnabled?vboUsage:0; } - public final int getVBOTarget() { return vboEnabled?vboTarget:-1; } + public final int getVBOTarget() { return vboEnabled?vboTarget:0; } public final Buffer getBuffer() { return buffer; } @@ -139,7 +139,7 @@ public class GLArrayDataWrapper implements GLArrayData { buffer = null; vboName=0; vboEnabled=false; - vboOffset=-1; + vboOffset=0; alive = false; } @@ -154,11 +154,11 @@ public class GLArrayDataWrapper implements GLArrayData { ", components "+components+ ", stride "+stride+"u "+strideB+"b "+strideL+"c"+ ", buffer "+buffer+ - ", offset "+vboOffset+ - ", vboUsage 0x"+Integer.toHexString(vboUsage)+ - ", vboTarget 0x"+Integer.toHexString(vboTarget)+ ", vboEnabled "+vboEnabled+ ", vboName "+vboName+ + ", vboUsage 0x"+Integer.toHexString(vboUsage)+ + ", vboTarget 0x"+Integer.toHexString(vboTarget)+ + ", vboOffset 0x"+Long.toHexString(vboOffset)+ ", alive "+alive+ "]"; } -- cgit v1.2.3