aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
diff options
context:
space:
mode:
authorHarvey Harrison <[email protected]>2013-10-17 22:27:27 -0700
committerHarvey Harrison <[email protected]>2013-10-17 22:27:27 -0700
commit5e9c02bce7b241a0bf95c8abca9a91cd25e51ed3 (patch)
tree78e913afc74a64e519d69dfb9aa886dd41ec16ed /src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
parent2ebf1bf35928e35ded6e38df64dee7aa578ae3c7 (diff)
jogl: remove all trailing whitespace
Signed-off-by: Harvey Harrison <[email protected]>
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java80
1 files changed, 40 insertions, 40 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
index e0bbbc33c..2d685a1a8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/GLArrayDataClient.java
@@ -53,13 +53,13 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* and starting with a new created Buffer object with initialElementCount size
*
* On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
- * On profile ES2 the fixed function emulation will transform these calls to
+ * On profile ES2 the fixed function emulation will transform these calls to
* EnableVertexAttribArray and VertexAttribPointer calls,
* and a predefined vertex attribute variable name will be chosen.
- *
- * The default name mapping will be used,
+ *
+ * The default name mapping will be used,
* see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
- *
+ *
* @param index The GL array index
* @param comps The array component number
* @param dataType The array index GL data type
@@ -67,7 +67,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* @param initialElementCount
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
- */
+ */
public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int initialElementCount)
throws GLException
{
@@ -82,13 +82,13 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* and starting with a given Buffer object incl it's stride
*
* On profiles GL2 and ES1 the fixed function pipeline behavior is as expected.
- * On profile ES2 the fixed function emulation will transform these calls to
+ * On profile ES2 the fixed function emulation will transform these calls to
* EnableVertexAttribArray and VertexAttribPointer calls,
* and a predefined vertex attribute variable name will be chosen.
- *
- * The default name mapping will be used,
+ *
+ * The default name mapping will be used,
* see {@link GLPointerFuncUtil#getPredefinedArrayIndexName(int)}.
- *
+ *
* @param index The GL array index
* @param comps The array component number
* @param dataType The array index GL data type
@@ -97,8 +97,8 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
* @param buffer the user define data
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
- */
- public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int stride,
+ */
+ public static GLArrayDataClient createFixed(int index, int comps, int dataType, boolean normalized, int stride,
Buffer buffer)
throws GLException
{
@@ -111,13 +111,13 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
/**
* Create a client side buffer object, using a custom GLSL array attribute name
* and starting with a new created Buffer object with initialElementCount size
- * @param name The custom name for the GL attribute.
+ * @param name The custom name for the GL attribute.
* @param comps The array component number
* @param dataType The array index GL data type
* @param normalized Whether the data shall be normalized
* @param initialElementCount
*/
- public static GLArrayDataClient createGLSL(String name, int comps,
+ public static GLArrayDataClient createGLSL(String name, int comps,
int dataType, boolean normalized, int initialElementCount)
throws GLException
{
@@ -130,7 +130,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
/**
* Create a client side buffer object, using a custom GLSL array attribute name
* and starting with a given Buffer object incl it's stride
- * @param name The custom name for the GL attribute.
+ * @param name The custom name for the GL attribute.
* @param comps The array component number
* @param dataType The array index GL data type
* @param normalized Whether the data shall be normalized
@@ -157,8 +157,8 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
}
}
-
- //
+
+ //
// Data read access
//
@@ -167,7 +167,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
@Override
public final boolean sealed() { return sealed; }
-
+
@Override
public final boolean enabled() { return bufferEnabled; }
@@ -195,10 +195,10 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
seal(seal);
enableBuffer(gl, seal);
}
-
+
@Override
public void enableBuffer(GL gl, boolean enable) {
- if( enableBufferAlways || bufferEnabled != enable ) {
+ if( enableBufferAlways || bufferEnabled != enable ) {
if(enable) {
checkSeal(true);
// init/generate VBO name if not done yet
@@ -208,7 +208,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
bufferEnabled = enable;
}
}
-
+
@Override
public boolean bindBuffer(GL gl, boolean bind) {
if(bind) {
@@ -218,7 +218,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
return glArrayHandler.bindBuffer(gl, bind);
}
-
+
@Override
public void setEnableAlways(boolean always) {
enableBufferAlways = always;
@@ -328,15 +328,15 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
", isVertexAttribute "+isVertexAttribute+
", usesGLSL "+usesGLSL+
", usesShaderState "+(null!=shaderState)+
- ", dataType 0x"+Integer.toHexString(componentType)+
- ", bufferClazz "+componentClazz+
+ ", dataType 0x"+Integer.toHexString(componentType)+
+ ", bufferClazz "+componentClazz+
", elements "+getElementCount()+
- ", components "+components+
+ ", components "+components+
", stride "+strideB+"b "+strideL+"c"+
- ", initialElementCount "+initialElementCount+
- ", sealed "+sealed+
- ", bufferEnabled "+bufferEnabled+
- ", bufferWritten "+bufferWritten+
+ ", initialElementCount "+initialElementCount+
+ ", sealed "+sealed+
+ ", bufferEnabled "+bufferEnabled+
+ ", bufferWritten "+bufferWritten+
", buffer "+buffer+
", alive "+alive+
"]";
@@ -345,16 +345,16 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
// non public matters
protected final boolean growBufferIfNecessary(int spare) {
- if(buffer==null || buffer.remaining()<spare) {
+ if(buffer==null || buffer.remaining()<spare) {
growBuffer(Math.max(initialElementCount, spare));
return true;
}
return false;
}
- protected final void growBuffer(int additionalElements) {
+ protected final void growBuffer(int additionalElements) {
if(!alive || sealed) {
- throw new GLException("Invalid state: "+this);
+ throw new GLException("Invalid state: "+this);
}
// add the stride delta
@@ -362,7 +362,7 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
final int osize = (buffer!=null) ? buffer.capacity() : 0;
final int nsize = osize + ( additionalElements * components );
-
+
if(componentClazz==ByteBuffer.class) {
ByteBuffer newBBuffer = Buffers.newDirectByteBuffer( nsize );
if(buffer!=null) {
@@ -401,18 +401,18 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
protected final void checkSeal(boolean test) throws GLException {
if(!alive) {
- throw new GLException("Invalid state: "+this);
- }
+ throw new GLException("Invalid state: "+this);
+ }
if(sealed!=test) {
if(test) {
- throw new GLException("Not Sealed yet, seal first:\n\t"+this);
+ throw new GLException("Not Sealed yet, seal first:\n\t"+this);
} else {
- throw new GLException("Already Sealed, can't modify VBO:\n\t"+this);
+ throw new GLException("Already Sealed, can't modify VBO:\n\t"+this);
}
}
}
- protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data,
+ protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data,
int initialElementCount, boolean isVertexAttribute, GLArrayHandler handler,
int vboName, long vboOffset, int vboUsage, int vboTarget, boolean usesGLSL)
throws GLException
@@ -433,12 +433,12 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}
private boolean isValidated = false;
-
+
protected void init_vbo(GL gl) {
if(!isValidated ) {
isValidated = true;
validate(gl.getGLProfile(), true);
- }
+ }
}
protected GLArrayDataClient() { }
@@ -453,6 +453,6 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
protected GLArrayHandler glArrayHandler;
protected boolean usesGLSL;
protected ShaderState shaderState;
-
+
}