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

Method GetTexture

trinity/Tr2AtlasTexture.cpp:45–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45Tr2TextureAL* Tr2AtlasTexture::GetTexture()
46{
47 // are we part of an atlas? If so, go get the texture from that to guarantee pointer identity.
48 if( m_textureAtlas && m_atlasArea )
49 {
50 return m_textureAtlas->GetTexture();
51 }
52
53 if( m_texture.IsValid() )
54 {
55 return &m_texture;
56 }
57
58 if( m_textureRes && m_textureRes->IsGood() )
59 {
60 return m_textureRes->GetTexture();
61 }
62
63 return nullptr;
64}
65
66// --------------------------------------------------------------------------------------
67// Description:

Callers 4

ReleaseResourcesMethod · 0.45
LockBufferMethod · 0.45
LockBufferAndMarginMethod · 0.45
UnlockBufferMethod · 0.45

Calls 2

IsValidMethod · 0.45
IsGoodMethod · 0.45

Tested by

no test coverage detected