MCPcopy Create free account
hub / github.com/defold/defold / ClearRenderConstant

Function ClearRenderConstant

engine/gamesys/src/gamesys/components/comp_private.cpp:532–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532int ClearRenderConstant(HComponentRenderConstants constants, dmhash_t name_hash)
533{
534 int index = FindRenderConstant(constants, name_hash);
535 if (index >= 0)
536 {
537 constants->m_RenderConstants.EraseSwap(index);
538 }
539
540 dmhash_t* checksum = constants->m_ConstantChecksums.Get(name_hash);
541 if (checksum)
542 {
543 constants->m_ConstantChecksums.Erase(name_hash);
544 constants->m_Updated |= checksum != 0; // did it exist?
545 }
546 return checksum != 0 ? 1 : 0;
547}
548
549void HashRenderConstants(HComponentRenderConstants constants, HashState32* state)
550{

Callers 5

CompMeshOnMessageFunction · 0.85
CompSpriteOnMessageFunction · 0.85
CompModelOnMessageFunction · 0.85
CompTileGridOnMessageFunction · 0.85
TEST_FFunction · 0.85

Calls 3

FindRenderConstantFunction · 0.85
GetMethod · 0.45
EraseMethod · 0.45

Tested by 1

TEST_FFunction · 0.68