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

Method CreateDynamic

engine/PoseidonGL33/TextureBankGL33_Core.cpp:457–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

455}
456
457Texture* TextBankGL33::CreateDynamic(int w, int h, const void* rgba, uint32_t size, bool mipmap)
458{
459 int idx = FindFree();
460 TextureGL33* tex = new TextureGL33();
461 _texture.Access(idx);
462 _texture[idx] = tex;
463 if (!tex->InitFromRGBA(w, h, rgba, size, mipmap))
464 {
465 LOG_WARN(Graphics, "GL33: Failed to create dynamic texture {}x{}", w, h);
466 return nullptr;
467 }
468 return tex;
469}
470
471void TextBankGL33::UpdateDynamic(Texture* tex, const void* rgba, uint32_t size)
472{

Callers

nothing calls this directly

Calls 2

AccessMethod · 0.80
InitFromRGBAMethod · 0.80

Tested by

no test coverage detected