com.neovisionaries.android.opengl
Class ElementArrayBuffer

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

public class ElementArrayBuffer
extends VertexBuffer<ElementArrayBuffer>

OpenGL ES vertex buffer of element array type.

Author:
Takahiko Kawasaki

Constructor Summary
ElementArrayBuffer()
          A constructor to create a vertex buffer of element array type (GL_ELEMENT_ARRAY_BUFFER).
 
Method Summary
 boolean isBound()
          Check if this element array buffer is bound.
static void unbind()
          Unbind the element array buffer (call glBindBuffer(GL_ELEMENT_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

ElementArrayBuffer

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

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

isBound

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

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

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

unbind

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

See Also:
glBindBuffer