MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / _CreateRT

Method _CreateRT

ogsr_engine/Layers/xrRender/ResourceManager_Resources.cpp:360–378  ·  view source on GitHub ↗

--------------------------------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

358
359//--------------------------------------------------------------------------------------------------------------
360CRT* CResourceManager::_CreateRT(LPCSTR Name, u32 w, u32 h, D3DFORMAT f, u32 SampleCount)
361{
362 R_ASSERT(Name && Name[0] && w && h);
363
364 // ***** first pass - search already created RT
365 LPSTR N = LPSTR(Name);
366 map_RT::iterator I = m_rtargets.find(N);
367 if (I != m_rtargets.end())
368 return I->second;
369 else
370 {
371 CRT* RT = xr_new<CRT>();
372 RT->dwFlags |= xr_resource_flagged::RF_REGISTERED;
373 m_rtargets.insert(mk_pair(RT->set_name(Name), RT));
374 if (RDEVICE.b_is_Ready)
375 RT->create(Name, w, h, f);
376 return RT;
377 }
378}
379void CResourceManager::_DeleteRT(const CRT* RT)
380{
381 if (0 == (RT->dwFlags & xr_resource_flagged::RF_REGISTERED))

Callers 1

createMethod · 0.45

Calls 5

findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
set_nameMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected