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

Method FindAtlas

trinity/Tr2TextureAtlasMan.cpp:20–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18}
19
20Tr2TextureAtlas* Tr2TextureAtlasMan::FindAtlas( Tr2RenderContextEnum::PixelFormat fmt )
21{
22 CcpAutoMutex lock( m_atlasesMutex );
23
24 for( auto it = m_atlases.begin(); it != m_atlases.end(); ++it )
25 {
26 if( ( *it )->GetFormat() == fmt )
27 {
28 return *it;
29 }
30 }
31
32 return NULL;
33}
34
35// TODO: Error handling
36void Tr2TextureAtlasMan::AddAtlas( Tr2RenderContextEnum::PixelFormat fmt, unsigned int width, unsigned int height )

Callers 4

DoPrepareMethod · 0.80
Tr2Sprite2dSceneMethod · 0.80
OnPrepareResourcesMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetFormatMethod · 0.45

Tested by

no test coverage detected