ECS/Project/Project/Renderers/RenderableTypeBatch/RenderableTypeBatch.cpp
//	Add the provided Renderable to the Batch.
Add the provided Renderable to the Batch.
Add the provided Renderable to the Batch .
void RenderableTypeBatch::addRenderable(std::shared_ptr<RenderableMetaData> newRenderable)
{
	if (newRenderable->renderableType == renderableType)
	{
		newRenderable->renderableIndex = renderableMetaDatas.size();
		renderableMetaDatas.push_back(newRenderable);
		renderableTransformMatrices.push_back(newRenderable->renderable->getTransformMatrix());
		dirtyTransformMatrixBuffer = true;
	}
}
void RenderableTypeBatch :: addRenderable ( std :: shared_ptr < RenderableMetaData > newRenderable ) { if ( newRenderable -> renderableType == renderableType ) { newRenderable -> renderableIndex = renderableMetaDatas . size ( ) ; renderableMetaDatas . push_back ( newRenderable ) ; renderableTransformMatrices . push_back ( newRenderable -> renderable -> getTransformMatrix ( ) ) ; dirtyTransformMatrixBuffer = true ; } }
Add the provided Renderable to the Batch.
Add the provided Renderable to the Batch .
//	Check if we have the correct Renderable Type. //	Update the Renderable Entry. //	Add it to the list of RenderableMetaDatas. //	Add the Transform Matrix to the list of Transform Matrices. //	Signal that the OpenGL Buffer no longer represents the Transforms.