30constexpr int32_t BatchRendererTriangles::VERTEX_COUNT;
32BatchRendererTriangles::BatchRendererTriangles(
Renderer* renderer, int32_t
id)
84 vboIds = vboManaged->getVBOIds();
static Engine * getInstance()
Returns engine instance.
static VBOManager * getVBOManager()
array< float, 4 > & getArray() const
Class representing texture UV coordinates data.
VBOManager_VBOManaged * addVBO(const string &vboId, int32_t ids, bool useGPUMemory, bool shared, bool &created)
Adds a VBO to manager or retrieve VBO if existing.
void removeVBO(const string &vboId)
Removes a VBO from manager.
virtual void drawInstancedTrianglesFromBufferObjects(int contextIdx, int32_t triangles, int32_t trianglesOffset, int32_t instances)=0
Draw instanced triangles from buffer objects.
virtual void bindEffectColorMulsBufferObject(int contextIdx, int32_t bufferObjectId, int32_t divisor)=0
Bind effect color muls buffer object.
array< float, 4 > & getEffectColorMul(int contextIdx)
Get effect color mul.
virtual void bindModelMatricesBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind model matrices buffer object.
virtual bool isInstancedRenderingAvailable()=0
Checks if instanced rendering is available.
virtual void drawTrianglesFromBufferObjects(int contextIdx, int32_t triangles, int32_t trianglesOffset)=0
Draw triangles from buffer objects.
int32_t CONTEXTINDEX_DEFAULT
virtual void uploadBufferObject(int contextIdx, int32_t bufferObjectId, int32_t size, FloatBuffer *data)=0
Uploads buffer data to buffer object.
virtual void bindTextureCoordinatesBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind texture coordinates buffer object.
array< float, 4 > & getEffectColorAdd(int contextIdx)
Get effect color add.
virtual void bindVerticesBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind vertices buffer object.
virtual void bindEffectColorAddsBufferObject(int contextIdx, int32_t bufferObjectId, int32_t divisor)=0
Bind effect color adds buffer object.
virtual void bindNormalsBufferObject(int contextIdx, int32_t bufferObjectId)=0
Bind normals buffer object.
Batch renderer for transparent triangles.
ByteBuffer * fbModelMatricesByteBuffer
ByteBuffer * fbEffectColorMulsByteBuffer
~BatchRendererTriangles()
Destructor.
ByteBuffer * fbEffectColorAddsByteBuffer
ByteBuffer * fbVerticesByteBuffer
FloatBuffer fbEffectColorAdds
static constexpr int32_t VERTEX_COUNT
ByteBuffer * fbNormalsByteBuffer
vector< int32_t > * vboIds
FloatBuffer fbTextureCoordinates
void clear()
Clears this batch vbo renderer.
ByteBuffer * fbTextureCoordinatesByteBuffer
FloatBuffer fbEffectColorMuls
FloatBuffer fbModelMatrices
Buffers used to transfer data between main memory to graphics board memory.
Matrix4x4 & identity()
Setup identity matrix.
array< float, 16 > & getArray() const
Returns array data.
virtual int32_t getPosition()
FloatBuffer * put(float value)
Put a float value into float buffer.