TDME2 1.9.121
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
BatchRendererTriangles Class Referencefinal

Batch renderer for transparent triangles. More...

#include <tdme/engine/subsystems/rendering/BatchRendererTriangles.h>

Collaboration diagram for BatchRendererTriangles:
Collaboration graph

Public Member Functions

 BatchRendererTriangles (Renderer *renderer, int32_t id)
 Public constructor. More...
 
 ~BatchRendererTriangles ()
 Destructor. More...
 
bool isAcquired ()
 
bool acquire ()
 Acquire. More...
 
void release ()
 Release. More...
 
void initialize ()
 Init. More...
 
void dispose ()
 Dispose. More...
 

Private Member Functions

void clear ()
 Clears this batch vbo renderer. More...
 
void render ()
 Render. More...
 
bool addVertex (const Vector3 &vertex, const Vector3 &normal, const Vector2 &textureCoordinate)
 Adds a vertex to this transparent render faces group. More...
 

Private Attributes

Rendererrenderer { nullptr }
 
vector< int32_t > * vboIds { nullptr }
 
int32_t id
 
bool acquired
 
int32_t vertices
 
ByteBufferfbModelMatricesByteBuffer { nullptr }
 
FloatBuffer fbModelMatrices
 
ByteBufferfbEffectColorMulsByteBuffer { nullptr }
 
FloatBuffer fbEffectColorMuls
 
ByteBufferfbEffectColorAddsByteBuffer { nullptr }
 
FloatBuffer fbEffectColorAdds
 
ByteBufferfbVerticesByteBuffer { nullptr }
 
FloatBuffer fbVertices
 
ByteBufferfbNormalsByteBuffer { nullptr }
 
FloatBuffer fbNormals
 
ByteBufferfbTextureCoordinatesByteBuffer { nullptr }
 
FloatBuffer fbTextureCoordinates
 

Static Private Attributes

static constexpr int32_t TRIANGLE_COUNT { 1024 }
 
static constexpr int32_t VERTEX_COUNT { TRIANGLE_COUNT * 3 }
 

Friends

class TransparentRenderFacesGroup
 

Detailed Description

Batch renderer for transparent triangles.

Author
andreas.drewke
Version
$Id$

Definition at line 37 of file BatchRendererTriangles.h.

Constructor & Destructor Documentation

◆ BatchRendererTriangles()

BatchRendererTriangles ( Renderer renderer,
int32_t  id 
)

Public constructor.

Parameters
rendererrenderer
idid

Definition at line 32 of file BatchRendererTriangles.cpp.

◆ ~BatchRendererTriangles()

Destructor.

Definition at line 49 of file BatchRendererTriangles.cpp.

Member Function Documentation

◆ acquire()

bool acquire ( )

Acquire.

Definition at line 64 of file BatchRendererTriangles.cpp.

◆ addVertex()

bool addVertex ( const Vector3 vertex,
const Vector3 normal,
const Vector2 textureCoordinate 
)
inlineprivate

Adds a vertex to this transparent render faces group.

Parameters
vertexvertex
normalnormal
textureCoordinatetexture coordinate
Returns
success

Definition at line 79 of file BatchRendererTriangles.h.

◆ clear()

void clear ( )
private

Clears this batch vbo renderer.

Definition at line 138 of file BatchRendererTriangles.cpp.

◆ dispose()

void dispose ( )

Dispose.

Definition at line 130 of file BatchRendererTriangles.cpp.

◆ initialize()

void initialize ( )

Init.

Definition at line 78 of file BatchRendererTriangles.cpp.

◆ isAcquired()

bool isAcquired ( )
Returns
acquired

Definition at line 59 of file BatchRendererTriangles.cpp.

◆ release()

void release ( )

Release.

Definition at line 73 of file BatchRendererTriangles.cpp.

◆ render()

void render ( )
private

Render.

Definition at line 88 of file BatchRendererTriangles.cpp.

Friends And Related Function Documentation

◆ TransparentRenderFacesGroup

friend class TransparentRenderFacesGroup
friend

Definition at line 39 of file BatchRendererTriangles.h.

Member Data Documentation

◆ acquired

bool acquired
private

Definition at line 47 of file BatchRendererTriangles.h.

◆ fbEffectColorAdds

FloatBuffer fbEffectColorAdds
private

Definition at line 54 of file BatchRendererTriangles.h.

◆ fbEffectColorAddsByteBuffer

ByteBuffer* fbEffectColorAddsByteBuffer { nullptr }
private

Definition at line 53 of file BatchRendererTriangles.h.

◆ fbEffectColorMuls

FloatBuffer fbEffectColorMuls
private

Definition at line 52 of file BatchRendererTriangles.h.

◆ fbEffectColorMulsByteBuffer

ByteBuffer* fbEffectColorMulsByteBuffer { nullptr }
private

Definition at line 51 of file BatchRendererTriangles.h.

◆ fbModelMatrices

FloatBuffer fbModelMatrices
private

Definition at line 50 of file BatchRendererTriangles.h.

◆ fbModelMatricesByteBuffer

ByteBuffer* fbModelMatricesByteBuffer { nullptr }
private

Definition at line 49 of file BatchRendererTriangles.h.

◆ fbNormals

FloatBuffer fbNormals
private

Definition at line 58 of file BatchRendererTriangles.h.

◆ fbNormalsByteBuffer

ByteBuffer* fbNormalsByteBuffer { nullptr }
private

Definition at line 57 of file BatchRendererTriangles.h.

◆ fbTextureCoordinates

FloatBuffer fbTextureCoordinates
private

Definition at line 60 of file BatchRendererTriangles.h.

◆ fbTextureCoordinatesByteBuffer

ByteBuffer* fbTextureCoordinatesByteBuffer { nullptr }
private

Definition at line 59 of file BatchRendererTriangles.h.

◆ fbVertices

FloatBuffer fbVertices
private

Definition at line 56 of file BatchRendererTriangles.h.

◆ fbVerticesByteBuffer

ByteBuffer* fbVerticesByteBuffer { nullptr }
private

Definition at line 55 of file BatchRendererTriangles.h.

◆ id

int32_t id
private

Definition at line 46 of file BatchRendererTriangles.h.

◆ renderer

Renderer* renderer { nullptr }
private

Definition at line 44 of file BatchRendererTriangles.h.

◆ TRIANGLE_COUNT

constexpr int32_t TRIANGLE_COUNT { 1024 }
staticconstexprprivate

Definition at line 42 of file BatchRendererTriangles.h.

◆ vboIds

vector<int32_t>* vboIds { nullptr }
private

Definition at line 45 of file BatchRendererTriangles.h.

◆ VERTEX_COUNT

constexpr int32_t VERTEX_COUNT { TRIANGLE_COUNT * 3 }
staticconstexprprivate

Definition at line 43 of file BatchRendererTriangles.h.

◆ vertices

int32_t vertices
private

Definition at line 48 of file BatchRendererTriangles.h.


The documentation for this class was generated from the following files: