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

Method SetTextureRes

trinity/Tr2AtlasTexture.cpp:508–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506}
507
508void Tr2AtlasTexture::SetTextureRes( TriTextureRes* p )
509{
510 // TODO: What if the texture has already been loaded?
511 // This is intended to be used on a newly created object
512 m_textureRes = p;
513 SetPrepared( true );
514 SetGood( true );
515
516 m_x = 0;
517 m_y = 0;
518 m_width = m_textureRes->GetWidth();
519 m_textureWidth = m_width;
520 m_height = m_textureRes->GetHeight();
521 m_textureHeight = m_height;
522
523 CalcReciprocals();
524 CalcTextureWindow();
525}
526
527TriTextureRes* Tr2AtlasTexture::GetTextureRes()
528{

Callers

nothing calls this directly

Calls 2

GetWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected