ImmediateModeQuads wraps ImmediateMode to deal with quad rendering only. More...
Public Member Functions | |
ImmediateModeQuads (GraphicsContextAlpha gl, uint max_quads, params VertexFormat[] formats) | |
Constructor. | |
void | Dispose () |
Dispose implementation. | |
void | ImmBeginQuads (uint num_quads) |
Prepare for registering n quads for rendering. | |
void | ImmAddQuad (T v0, T v1, T v2, T v3) |
Add a quad. | |
void | ImmAddQuad (T[] v) |
Add a quad. | |
void | ImmEndQuads () |
Draw all the quads added since the last ImmBeginQuads. | |
Properties | |
bool | Disposed [get] |
Return true if this object been disposed. | |
uint | MaxQuads [get] |
Return the maximum (total) number of quads we can add per frame. |
ImmediateModeQuads wraps ImmediateMode to deal with quad rendering only.
This is used by SpriteRenderer and other places.
void ImmAddQuad | ( | T | v0, |
T | v1, | ||
T | v2, | ||
T | v3 | ||
) |
Add a quad.
v2----v3
| |
v0----v1
void ImmAddQuad | ( | T[] | v | ) |
Add a quad.
v[2]----v[3]
| |
v[0]----v[1]
void ImmBeginQuads | ( | uint | num_quads | ) |
Prepare for registering n quads for rendering.
num_quads | The maximum number of quads you intend to add. |