MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Copy

Method Copy

engine/PoseidonGL33/TextureBankGL33_Core.cpp:170–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170TextureGL33* TextBankGL33::Copy(int from)
171{
172 if (from < 0)
173 return nullptr;
174 const TextureGL33* source = _texture[from];
175 if (!source)
176 return nullptr;
177 const char* sName = source->Name();
178
179 int iFree = FindFree();
180 PoseidonAssert(iFree >= 0);
181 TextureGL33* texture = new TextureGL33;
182
183 if (texture->Init(sName))
184 return nullptr;
185
186 _texture.Access(iFree);
187 _texture[iFree] = texture;
188 return texture;
189}
190
191Ref<Texture> TextBankGL33::Load(RStringB name)
192{

Callers

nothing calls this directly

Calls 3

AccessMethod · 0.80
NameMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected