MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / DrawSceneDepth

Method DrawSceneDepth

Source/Engine/Renderer/Renderer.cpp:295–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295void Renderer::DrawSceneDepth(GPUContext* context, SceneRenderTask* task, GPUTexture* output, const Array<Actor*>& customActors)
296{
297 CHECK(context && task && output && output->IsDepthStencil());
298
299 // Prepare
300 RenderContext renderContext(task);
301 renderContext.List = RenderList::GetFromPool();
302 renderContext.View.Pass = DrawPass::Depth;
303 renderContext.View.Prepare(renderContext);
304
305 // Call drawing (will collect draw calls)
306 DrawActors(renderContext, customActors);
307
308 // Sort draw calls
309 renderContext.List->SortDrawCalls(renderContext, false, DrawCallsListType::Depth, DrawPass::Depth);
310
311 // Execute draw calls
312 const float width = (float)output->Width();
313 const float height = (float)output->Height();
314 context->SetViewport(width, height);
315 context->SetRenderTarget(output->View(), static_cast<GPUTextureView*>(nullptr));
316 renderContext.List->ExecuteDrawCalls(renderContext, DrawCallsListType::Depth);
317
318 // Cleanup
319 RenderList::ReturnToPool(renderContext.List);
320}
321
322void Renderer::DrawPostFxMaterial(GPUContext* context, const RenderContext& renderContext, MaterialBase* material, GPUTexture* output, GPUTextureView* input)
323{

Callers 2

DrawSelectionDepthMethod · 0.45
DrawSelectionDepthMethod · 0.45

Calls 7

IsDepthStencilMethod · 0.80
SortDrawCallsMethod · 0.80
ExecuteDrawCallsMethod · 0.80
PrepareMethod · 0.45
SetViewportMethod · 0.45
SetRenderTargetMethod · 0.45
ViewMethod · 0.45

Tested by

no test coverage detected