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

Function GetMaterialAttributeIndex

engine/render/src/render/material.cpp:416–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414 }
415
416 uint8_t GetMaterialAttributeIndex(HMaterial material, dmhash_t name_hash)
417 {
418 dmArray<dmGraphics::VertexAttributeInfo>& infos = material->m_VertexAttributeInfos;
419 for (int i = 0; i < infos.Size(); ++i)
420 {
421 if (infos[i].m_NameHash == name_hash)
422 {
423 return i;
424 }
425 }
426 return INVALID_MATERIAL_ATTRIBUTE_INDEX;
427 }
428
429 uint32_t GetMaterialConstantCount(HMaterial material)
430 {

Callers 2

SetMaterialFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected