com.threerings.opengl.renderer
Class BufferObject

java.lang.Object
  extended by com.threerings.opengl.renderer.BufferObject

public class BufferObject
extends Object

An OpenGL buffer object.


Constructor Summary
BufferObject(Renderer renderer)
          Creates a new buffer object for the specified renderer.
 
Method Summary
 void delete()
          Deletes this buffer object, rendering it unusable.
 int getId()
          Returns this buffer's OpenGL identifier.
 void setData(FloatBuffer data)
          Sets the data in this buffer.
 void setData(FloatBuffer data, int usage)
          Sets the data in this buffer.
 void setData(long size)
          Initializes the data in this buffer.
 void setData(long size, int usage)
          Initializes the data in this buffer.
 void setData(ShortBuffer data)
          Sets the data in this buffer.
 void setData(ShortBuffer data, int usage)
          Sets the data in this buffer.
 void setSubData(long offset, FloatBuffer data)
          Sets part of the data in this buffer.
 void setSubData(long offset, ShortBuffer data)
          Sets part of the data in this buffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferObject

public BufferObject(Renderer renderer)
Creates a new buffer object for the specified renderer.

Method Detail

getId

public final int getId()
Returns this buffer's OpenGL identifier.


setData

public void setData(long size)
Initializes the data in this buffer.


setData

public void setData(long size,
                    int usage)
Initializes the data in this buffer.


setData

public void setData(FloatBuffer data)
Sets the data in this buffer.


setData

public void setData(FloatBuffer data,
                    int usage)
Sets the data in this buffer.


setData

public void setData(ShortBuffer data)
Sets the data in this buffer.


setData

public void setData(ShortBuffer data,
                    int usage)
Sets the data in this buffer.


setSubData

public void setSubData(long offset,
                       FloatBuffer data)
Sets part of the data in this buffer.


setSubData

public void setSubData(long offset,
                       ShortBuffer data)
Sets part of the data in this buffer.


delete

public void delete()
Deletes this buffer object, rendering it unusable.



Copyright © 2011. All Rights Reserved.