|
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. | |
| bool | getStrictOrderMode (void) const |
| Gets the strict order mode. | |
| 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. | |
| void | setBlendOff (void) |
| Turns-off blend mode. | |
| void | setBlendMode (const SceneRenderRequest *pSceneRenderRequest) |
| void | setAlphaTestMode (const F32 alphaTestMode) |
| Set alpha-test mode. | |
| void | setAlphaTestMode (const SceneRenderRequest *pSceneRenderRequest) |
| void | setWireframeMode (const bool enabled) |
| Sets the wireframe mode. | |
| bool | getWireframeMode (void) const |
| void | setBatchEnabled (const bool enabled) |
| Sets the batch enabled mode. | |
| bool | getBatchEnabled (void) const |
| Gets the batch enabled mode. | |
| void | setDebugStats (DebugStats *pDebugStats) |
| Sets the debug stats to use. | |
| void | SubmitTriangles (const U32 vertexCount, const Vector2 *pVertexArray, const Vector2 *pTextureArray, const ColorF *pColorArray, TextureHandle &texture) |
| 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. | |
| void | flush (void) |
| Flush (render) any pending batches. | |
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) |
Static Public Attributes | |
| static const U32 | maxVertexCount = BATCHRENDER_BUFFERSIZE |
| 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.
| void setBlendMode | ( | const SceneRenderRequest * | pSceneRenderRequest | ) |
|
inline |
Turns-on blend mode with the specified blend factors and color.
|
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, | ||
| const ColorF * | pColorArray, | ||
| TextureHandle & | texture | ||
| ) |
Submit triangles for batching. Vertex and textures are indexed as: 2 5 |\ |\ | \ | \ 0| _\1 3| _\4
|
static |