Beispiel #1
0
void Camera::render( RenderBlock& block, bool clearView )
{
	if (!activeView) return;
	
	RenderDevice* renderDevice = GetRenderDevice();
	renderDevice->setActiveView( activeView );

	if (clearView)
		renderDevice->clearView();
    for (auto it= drawer.renderables.end() -1;it >= drawer.renderables.begin();--it)
        block.renderables.Insert(block.renderables.begin(), *it);


	renderDevice->render( block );
}
Beispiel #2
0
void Camera::render( RenderBlock& block, bool clearView )
{
	if( !activeView ) return;
	
	RenderDevice* renderDevice = GetRenderDevice();
	renderDevice->setActiveView( activeView );

	if( clearView )
		renderDevice->clearView();

	block.renderables.insert(
		block.renderables.begin(),
		drawer.renderables.begin(),
		drawer.renderables.end() );

	renderDevice->render( block );
}
Beispiel #3
0
void RenderTarget::removeViews()
{
	RenderDevice* renderDevice = GetRenderDevice();

	for( size_t i = 0; i < views.size(); i++ )
	{
		RenderView* view = views[i];

		if( renderDevice->getActiveView() == view )
		{
			// Remove the active view from the render device.
			renderDevice->setActiveView(nullptr);
		}

		Deallocate(view);
	}

	views.clear();
}