com.threerings.opengl.renderer
Class SimpleBatch.DrawBufferElements

java.lang.Object
  extended by com.threerings.opengl.renderer.SimpleBatch.DrawCommand
      extended by com.threerings.opengl.renderer.SimpleBatch.DrawElements
          extended by com.threerings.opengl.renderer.SimpleBatch.DrawBufferElements
Enclosing class:
SimpleBatch

public static class SimpleBatch.DrawBufferElements
extends SimpleBatch.DrawElements

Draws the batch by calling GL11.glDrawElements(int, java.nio.ByteBuffer) using the current buffer object.


Field Summary
protected  int _count
          The number of elements to render.
protected  long _offset
          The offset into the index buffer.
protected  int _type
          The type of data in the index buffer.
 
Fields inherited from class com.threerings.opengl.renderer.SimpleBatch.DrawElements
_mode
 
Constructor Summary
SimpleBatch.DrawBufferElements(int mode, int count, int type, long offset)
           
 
Method Summary
 boolean call()
          Calls the draw command, causing the batch's primitives to be rendered.
 int getPrimitiveCount()
          Returns the number of primitives rendered by this command.
 void setLimits(int offset, int length)
          Sets the limits defining the range of indices to draw.
 
Methods inherited from class com.threerings.opengl.renderer.SimpleBatch.DrawElements
setRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_count

protected int _count
The number of elements to render.


_type

protected int _type
The type of data in the index buffer.


_offset

protected long _offset
The offset into the index buffer.

Constructor Detail

SimpleBatch.DrawBufferElements

public SimpleBatch.DrawBufferElements(int mode,
                                      int count,
                                      int type,
                                      long offset)
Method Detail

setLimits

public void setLimits(int offset,
                      int length)
Description copied from class: SimpleBatch.DrawElements
Sets the limits defining the range of indices to draw.

Specified by:
setLimits in class SimpleBatch.DrawElements

call

public boolean call()
Description copied from class: SimpleBatch.DrawCommand
Calls the draw command, causing the batch's primitives to be rendered.

Specified by:
call in class SimpleBatch.DrawCommand
Returns:
true if the command affected the color state, in which case it should be invalidated.

getPrimitiveCount

public int getPrimitiveCount()
Description copied from class: SimpleBatch.DrawCommand
Returns the number of primitives rendered by this command.

Specified by:
getPrimitiveCount in class SimpleBatch.DrawCommand