ECS/Project/Project/Renderers/RenderableTypeBatch/RenderableTypeBatch.cpp
//	Remove the provided Renderable from the Batch,
Remove the provided Renderable from the Batch.
Remove the provided Renderable from the Batch .
void RenderableTypeBatch::removeRenderable(std::shared_ptr<RenderableMetaData> deadRenderable)
{
	if (deadRenderable->renderableType == renderableType)
	{
		int renderableIndex = deadRenderable->renderableIndex;
		(renderableMetaDatas)[renderableIndex] = (renderableMetaDatas)[renderableMetaDatas.size() - 1];
		(renderableTransformMatrices)[renderableIndex] = (renderableTransformMatrices)[renderableTransformMatrices.size() - 1];
		(renderableMetaDatas)[renderableIndex]->renderableIndex = renderableIndex;
		renderableMetaDatas.pop_back();
		renderableTransformMatrices.pop_back();
		Mark the Transform Matrix Buffer as incorrect.
		dirtyTransformMatrixBuffer = true;
		deadRenderable->renderableIndex = 0;
	}
}
void RenderableTypeBatch :: removeRenderable ( std :: shared_ptr < RenderableMetaData > deadRenderable ) { if ( deadRenderable -> renderableType == renderableType ) { int renderableIndex = deadRenderable -> renderableIndex ; ( renderableMetaDatas ) [ renderableIndex ] = ( renderableMetaDatas ) [ renderableMetaDatas . size ( ) - 1 ] ; ( renderableTransformMatrices ) [ renderableIndex ] = ( renderableTransformMatrices ) [ renderableTransformMatrices . size ( ) - 1 ] ; ( renderableMetaDatas ) [ renderableIndex ] -> renderableIndex = renderableIndex ; renderableMetaDatas . pop_back ( ) ; renderableTransformMatrices . pop_back ( ) ; dirtyTransformMatrixBuffer = true ; deadRenderable -> renderableIndex = 0 ; } }
Remove the provided Renderable from the Batch,
Remove the provided Renderable from the Batch
//	Check if we have the correct Renderable Type. //	Find the index of the renderable. //	 //	 //	Mark the Transform Matrix Buffer as incorrect.