示例#1
0
void PostProcessChain::Run(RenderTarget &mainTarget)
{
	// Implement your own solution for the Post-process lab
	RunSolution(mainTarget);

	// We need the destination of the effect chain to be written to the mainTarget before we return
	RenderContext *sceneContext =  RenderController::GetInstance()->GetScreenContextPtr();
	RenderShapeTarget *screenShape = RenderController::GetInstance()->GetScreenShapePtr();
		
	mainTarget.ActivateTarget(0);
	screenShape->SetRenderTarget(sourceTargetPtr);
	screenShape->AddToContextSet();
	sceneContext->RenderProcess();
	sceneContext->ClearRenderSet();
	mainTarget.RevertTarget();
}