Torque2D Reference
|
#include <BatchRender.h>
Public Member Functions | |
BatchRender () | |
virtual | ~BatchRender () |
void | setStrictOrderMode (const bool strictOrder, const bool forceFlush=false) |
Set the strict order mode. More... | |
bool | getStrictOrderMode (void) const |
Gets the strict order mode. More... | |
void | setBlendMode (GLenum srcFactor, GLenum dstFactor, const ColorF &blendColor=ColorF(1.0f, 1.0f, 1.0f, 1.0f)) |
Turns-on blend mode with the specified blend factors and color. More... | |
void | setBlendOff (void) |
Turns-off blend mode. More... | |
void | setBlendMode (const SceneRenderRequest *pSceneRenderRequest) |
void | setAlphaTestMode (const F32 alphaTestMode) |
Set alpha-test mode. More... | |
void | setAlphaTestMode (const SceneRenderRequest *pSceneRenderRequest) |
void | setWireframeMode (const bool enabled) |
Sets the wireframe mode. More... | |
bool | getWireframeMode (void) const |
void | setBatchEnabled (const bool enabled) |
Sets the batch enabled mode. More... | |
bool | getBatchEnabled (void) const |
Gets the batch enabled mode. More... | |
void | setDebugStats (DebugStats *pDebugStats) |
Sets the debug stats to use. More... | |
void | SubmitTriangles (const U32 vertexCount, const Vector2 *pVertexArray, const Vector2 *pTextureArray, TextureHandle &texture, const ColorF &color=ColorF(-1.0f,-1.0f,-1.0f)) |
void | SubmitQuad (const Vector2 &vertexPos0, const Vector2 &vertexPos1, const Vector2 &vertexPos2, const Vector2 &vertexPos3, const Vector2 &texturePos0, const Vector2 &texturePos1, const Vector2 &texturePos2, const Vector2 &texturePos3, TextureHandle &texture, const ColorF &color=ColorF(-1.0f,-1.0f,-1.0f)) |
void | flush (U32 &reasonMetric) |
Flush (render) any pending batches with a reason metric. More... | |
void | flush (void) |
Flush (render) any pending batches. More... | |
Static Public Member Functions | |
static void | RenderQuad (const Vector2 &vertexPos0, const Vector2 &vertexPos1, const Vector2 &vertexPos2, const Vector2 &vertexPos3, const Vector2 &texturePos0, const Vector2 &texturePos1, const Vector2 &texturePos2, const Vector2 &texturePos3) |
BatchRender | ( | ) |
|
virtual |
void flush | ( | U32 & | reasonMetric | ) |
Flush (render) any pending batches with a reason metric.
void flush | ( | void | ) |
Flush (render) any pending batches.
|
inline |
Gets the batch enabled mode.
|
inline |
Gets the strict order mode.
|
inline |
|
inlinestatic |
Render a quad immediately without affecting current batch. All render state should be set beforehand directly. Vertex and textures are indexed as: 3 ___ 2 |\ | | \ | 0| _|1
|
inline |
Set alpha-test mode.
void setAlphaTestMode | ( | const SceneRenderRequest * | pSceneRenderRequest | ) |
|
inline |
Sets the batch enabled mode.
|
inline |
Turns-on blend mode with the specified blend factors and color.
void setBlendMode | ( | const SceneRenderRequest * | pSceneRenderRequest | ) |
|
inline |
Turns-off blend mode.
|
inline |
Sets the debug stats to use.
|
inline |
Set the strict order mode.
|
inline |
Sets the wireframe mode.
void SubmitQuad | ( | const Vector2 & | vertexPos0, |
const Vector2 & | vertexPos1, | ||
const Vector2 & | vertexPos2, | ||
const Vector2 & | vertexPos3, | ||
const Vector2 & | texturePos0, | ||
const Vector2 & | texturePos1, | ||
const Vector2 & | texturePos2, | ||
const Vector2 & | texturePos3, | ||
TextureHandle & | texture, | ||
const ColorF & | color = ColorF(-1.0f, -1.0f, -1.0f) |
||
) |
Submit a quad for batching. Vertex and textures are indexed as: 3 ___ 2 |\ | | \ | 0| _|1
void SubmitTriangles | ( | const U32 | vertexCount, |
const Vector2 * | pVertexArray, | ||
const Vector2 * | pTextureArray, | ||
TextureHandle & | texture, | ||
const ColorF & | color = ColorF(-1.0f, -1.0f, -1.0f) |
||
) |
Submit triangles for batching. Vertex and textures are indexed as: 2 5 |\ |\ | \ | \ 0| _\1 3| _\4