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

Function GetRenderConstant

engine/render/src/render/program_utils.cpp:71–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 static inline const RenderConstant* GetRenderConstant(const dmArray<RenderConstant>& constants, dmhash_t name_hash)
72 {
73 uint32_t n = constants.Size();
74 for (uint32_t i = 0; i < n; ++i)
75 {
76 if (GetConstantName(constants[i].m_Constant) == name_hash)
77 {
78 return &constants[i];
79 }
80 }
81 return 0;
82 }
83
84 void SetProgramRenderConstant(const dmArray<RenderConstant>& constants, dmhash_t name_hash, const dmVMath::Vector4* values, uint32_t count)
85 {

Callers 3

SetProgramRenderConstantFunction · 0.70
SetProgramConstantTypeFunction · 0.70
GetProgramConstantFunction · 0.70

Calls 2

GetConstantNameFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected