|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.renderer.Batch
com.threerings.opengl.renderer.SimpleBatch
public class SimpleBatch
A batch that consists of a set of render states and a stateless draw command.
| Nested Class Summary | |
|---|---|
static class |
SimpleBatch.CallList
Draws the batch by calling a display list containing the geometry. |
static class |
SimpleBatch.DrawArrays
Draws the batch by calling GL11.glDrawArrays(int, int, int). |
static class |
SimpleBatch.DrawBufferElements
Draws the batch by calling GL11.glDrawElements(int, java.nio.ByteBuffer) using the current buffer object. |
static class |
SimpleBatch.DrawBufferRangeElements
Draws the batch by calling GL12.glDrawRangeElements(int, int, int, java.nio.ByteBuffer) using the current buffer object. |
static class |
SimpleBatch.DrawCommand
The superclass for the stateless draw commands that actually draw the primitives. |
static class |
SimpleBatch.DrawElements
Draws the batch by calling GL11.glDrawElements(int, java.nio.ByteBuffer). |
static class |
SimpleBatch.DrawRangeElements
Draws the batch by calling GL12.glDrawRangeElements(int, int, int, java.nio.ByteBuffer). |
static class |
SimpleBatch.DrawShortElements
Draws the batch by calling GL11.glDrawElements(int, java.nio.ByteBuffer) using a short buffer. |
static class |
SimpleBatch.DrawShortRangeElements
Draws the batch by calling GL12.glDrawRangeElements(int, int, int, java.nio.ByteBuffer) using a short buffer. |
| Field Summary |
|---|
| Fields inherited from class com.threerings.opengl.renderer.Batch |
|---|
depth, key |
| Constructor Summary | |
|---|---|
SimpleBatch(RenderState[] states,
SimpleBatch.DrawCommand command)
Creates a new batch with the specified states and command. |
|
| Method Summary | |
|---|---|
SimpleBatch |
clone()
|
static SimpleBatch.DrawElements |
createDrawBufferElements(int mode,
int start,
int end,
int count,
int type,
long offset)
Creates a SimpleBatch.DrawBufferRangeElements if the driver supports it; otherwise, falls back
and creates a SimpleBatch.DrawBufferElements. |
static SimpleBatch.DrawElements |
createDrawShortElements(int mode,
int start,
int end,
ShortBuffer indices)
Creates a SimpleBatch.DrawShortRangeElements if the driver supports it; otherwise, falls back
and creates a SimpleBatch.DrawShortElements. |
boolean |
draw(Renderer renderer)
Draws this batch using the specified renderer. |
SimpleBatch.DrawCommand |
getCommand()
Returns a reference to the batch's draw command. |
int |
getPrimitiveCount()
Returns the number of primitives in this batch (optional; returns zero by default). |
RenderState[] |
getStates()
Returns a reference to the batch's set of render states. |
void |
updateKey()
Updates the batch's state key using the current set of states. |
| Methods inherited from class com.threerings.opengl.renderer.Batch |
|---|
compareKeys |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleBatch(RenderState[] states,
SimpleBatch.DrawCommand command)
| Method Detail |
|---|
public static SimpleBatch.DrawElements createDrawBufferElements(int mode,
int start,
int end,
int count,
int type,
long offset)
SimpleBatch.DrawBufferRangeElements if the driver supports it; otherwise, falls back
and creates a SimpleBatch.DrawBufferElements.
public static SimpleBatch.DrawElements createDrawShortElements(int mode,
int start,
int end,
ShortBuffer indices)
SimpleBatch.DrawShortRangeElements if the driver supports it; otherwise, falls back
and creates a SimpleBatch.DrawShortElements.
public RenderState[] getStates()
public SimpleBatch.DrawCommand getCommand()
public void updateKey()
public boolean draw(Renderer renderer)
Batch
draw in class Batchpublic int getPrimitiveCount()
Batch
getPrimitiveCount in class Batchpublic SimpleBatch clone()
clone in class Batch
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||