Beispiel #1
0
void Renderer::addRenderable( Renderable& s, RenderLayer::ID layerID )
{				
	//get the needed layer	
	RenderLayer& layer = getLayer( layerID );
	
	s._notifyRenderInfo( this, layerID, layer.elements.size() );
	
	//append at the end
	layer.elements.emplace( &s );
}
Beispiel #2
0
void Renderer::removeRenderable( Renderable& s )
{	
	getLayer(s.getLayer()).elements.erase(&s);
	s._notifyRenderInfo( NULL, 0, 0 );
}