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

Function GetProgramSamplerIndex

engine/render/src/render/program_utils.cpp:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 }
57
58 int32_t GetProgramSamplerIndex(const dmArray<Sampler>& samplers, dmhash_t name_hash)
59 {
60 uint32_t num_samplers = samplers.Size();
61 for (int i = 0; i < num_samplers; ++i)
62 {
63 if (samplers[i].m_NameHash == name_hash)
64 {
65 return i;
66 }
67 }
68 return -1;
69 }
70
71 static inline const RenderConstant* GetRenderConstant(const dmArray<RenderConstant>& constants, dmhash_t name_hash)
72 {

Callers 1

GetRenderContextTexturesFunction · 0.85

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected