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

Method SetupShadowMaps

trinity/Interior/Tr2InteriorScene.cpp:660–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660void Tr2InteriorScene::SetupShadowMaps()
661{
662 m_lightRenderTargets.Clear();
663
664 for( int i = 0; i < (int)( m_lights.size() ) && i < m_shadowCount; i++ )
665 {
666 Tr2RenderTargetPtr rt;
667 rt.CreateInstance();
668 rt->SetName( "ShadowMap" );
669 rt->Create( m_shadowSize, m_shadowSize, 1, Tr2RenderContextEnum::PIXEL_FORMAT_R32_FLOAT, 1, 0 );
670 m_lightRenderTargets.Append( rt );
671 }
672
673 // Setup depth stencil texture
674 m_lightDepthStencil = Tr2DepthStencilPtr();
675 m_lightDepthStencil.CreateInstance();
676 m_lightDepthStencil->Create( m_shadowSize, m_shadowSize, Tr2RenderContextEnum::DSFMT_D32, 0, 0 );
677}
678
679// --------------------------------------------------------------------------------------
680// Description

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.80
CreateInstanceMethod · 0.80
AppendMethod · 0.80
ClearMethod · 0.45
SetNameMethod · 0.45
CreateMethod · 0.45

Tested by

no test coverage detected