com.neovisionaries.android.opengl
Class ArrayBuffer

java.lang.Object
  extended by com.neovisionaries.android.opengl.VertexBuffer<ArrayBuffer>
      extended by com.neovisionaries.android.opengl.ArrayBuffer

public class ArrayBuffer
extends VertexBuffer<ArrayBuffer>

OpenGL ES vertex buffer of array type.

Author:
Takahiko Kawasaki

Constructor Summary
ArrayBuffer()
          A constructor to create a vertex buffer of array type (GL_ARRAY_BUFFER).
 
Method Summary
 boolean isBound()
          Check if this array buffer is bound.
static void unbind()
          Unbind the array buffer (call glBindBuffer(GL_ARRAY_BUFFER, 0)).
 
Methods inherited from class com.neovisionaries.android.opengl.VertexBuffer
bind, delete, getId, getState, getType, setData, setData, setData, setData, setSubData, setSubData, setSubData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayBuffer

public ArrayBuffer()
            throws GLESException
A constructor to create a vertex buffer of array type (GL_ARRAY_BUFFER). super(VertexBufferType.ARRAY) is called. After this constructor returns, the state of this instance is CREATED.

Throws:
GLESException - glGenBuffers() failed.
See Also:
VertexBuffer(VertexBufferType), glGenBuffers
Method Detail

isBound

public boolean isBound()
Check if this array buffer is bound.

This method returns true if the value returned from GLESState.getArrayBufferBinding() and the value returned from VertexBuffer.getId() are identical.

Specified by:
isBound in class VertexBuffer<ArrayBuffer>
Returns:
True if this array buffer is bound.
See Also:
GLESState.getArrayBufferBinding()

unbind

public static void unbind()
Unbind the array buffer (call glBindBuffer(GL_ARRAY_BUFFER, 0)).

See Also:
glBindBuffer