MCPcopy Create free account
hub / github.com/carbonengine/trinity / BeginRenderPass

Function BeginRenderPass

trinity/Eve/EveSpaceSceneRenderDriver.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21{
22
23void BeginRenderPass( Tr2RenderContext& renderContext, const std::initializer_list<Tr2TextureAL>& colorAttachments, const Tr2TextureAL& depthAttachment )
24{
25 uint32_t index = 0;
26 for( auto& colorAttachment : colorAttachments )
27 {
28 renderContext.m_esm.SetRenderTarget( index++, colorAttachment );
29 }
30 // clear out remaining slots, generously assuming max 4 render targets
31 const uint32_t maxRenderTargets = 4;
32 for( ; index < maxRenderTargets; ++index )
33 {
34 renderContext.m_esm.SetRenderTarget( index++, Tr2TextureAL{} );
35 }
36 renderContext.m_esm.SetDepthStencilBuffer( depthAttachment );
37 renderContext.m_esm.SetFullScreenViewport();
38}
39
40Tr2GpuResourcePool::Texture GetEmptySSAO( Tr2GpuResourcePool& gpuResourcePool )
41{

Callers 2

ApplyDistortionFunction · 0.85
ExecuteMethod · 0.85

Calls 3

SetDepthStencilBufferMethod · 0.80
SetFullScreenViewportMethod · 0.80
SetRenderTargetMethod · 0.45

Tested by

no test coverage detected