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

Method OnPrepareResources

trinity/Tr2ImpostorManager.cpp:162–169  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Implements Tr2DeviceResource method. Creates rendering resources. Return Value: true always --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

160// true always
161// --------------------------------------------------------------------------------------
162bool Tr2ImpostorManager::OnPrepareResources()
163{
164 m_rt->Create( m_width, m_height, 1, Tr2RenderContextEnum::PIXEL_FORMAT_B8G8R8A8_UNORM );
165 m_itemRt->Create( uint32_t( m_itemWidth * m_maxUpdates ), m_itemHeight, 1, Tr2RenderContextEnum::PIXEL_FORMAT_B8G8R8A8_UNORM );
166 m_ds->Create( uint32_t( m_itemWidth * m_maxUpdates ), m_itemHeight, Tr2Renderer::GetShaderModel() >= TR2SM_3_0_DEPTH ? Tr2RenderContextEnum::DSFMT_READABLE : Tr2RenderContextEnum::DSFMT_D24S8, 1, 0 );
167 m_atlasDirty = true;
168 return true;
169}
170
171// --------------------------------------------------------------------------------------
172// Description:

Callers

nothing calls this directly

Calls 2

GetShaderModelFunction · 0.85
CreateMethod · 0.45

Tested by

no test coverage detected