jjdh API

jjdh.opengl.engine.buffers
Class AbstractBuffer

java.lang.Object
  extended by jjdh.opengl.engine.buffers.AbstractBuffer
All Implemented Interfaces:
GLSwitchable, GLBuffer
Direct Known Subclasses:
SingleFloatBuffer, SingleIntegerBuffer

public abstract class AbstractBuffer
extends Object
implements GLBuffer


Field Summary
protected  ByteBuffer byteBuffer
           
protected  boolean isVBO
           
protected  int vboIndex
           
 
Constructor Summary
AbstractBuffer()
           
 
Method Summary
 void bind(javax.media.opengl.GL gl)
          Try to load this buffer as an VBO into OpenGL.
 void bind(javax.media.opengl.GL gl, int glMode)
           
 void dispose(javax.media.opengl.GL gl)
          Releases all of the native OpenGL resources used by this buffer.
 boolean isBindable(javax.media.opengl.GL gl)
          Finds out if the buffer can be loaded as an VBO into OpenGL.
 boolean isVBO()
          Finds out if this buffer is loaded as an VBO into OpenGL or not.
protected  void recreateByteBuffer(int capacity)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jjdh.opengl.core.interfaces.GLSwitchable
disable, enable
 

Field Detail

byteBuffer

protected ByteBuffer byteBuffer

isVBO

protected boolean isVBO

vboIndex

protected int vboIndex
Constructor Detail

AbstractBuffer

public AbstractBuffer()
Method Detail

recreateByteBuffer

protected void recreateByteBuffer(int capacity)

isBindable

public boolean isBindable(javax.media.opengl.GL gl)
Description copied from interface: GLBuffer
Finds out if the buffer can be loaded as an VBO into OpenGL.

Specified by:
isBindable in interface GLBuffer
Parameters:
gl - an interface to OpenGL
Returns:
if this buffer can be loaded as an VBO into OpenGL

bind

public void bind(javax.media.opengl.GL gl)
Description copied from interface: GLBuffer
Try to load this buffer as an VBO into OpenGL.

Specified by:
bind in interface GLBuffer
Parameters:
gl - an interface to OpenGL

bind

public void bind(javax.media.opengl.GL gl,
                 int glMode)

dispose

public void dispose(javax.media.opengl.GL gl)
Description copied from interface: GLBuffer
Releases all of the native OpenGL resources used by this buffer.

Specified by:
dispose in interface GLBuffer

isVBO

public boolean isVBO()
Description copied from interface: GLBuffer
Finds out if this buffer is loaded as an VBO into OpenGL or not.

Specified by:
isVBO in interface GLBuffer
Returns:
whether this buffer is loaded as an VBO into OpenGL or not

toString

public String toString()
Overrides:
toString in class Object

jjdh API

Copyright © 2006 Jonas Jacobi and Dennis Heidsiek. All Rights Reserved.