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

Function FindUniformLocation

engine/graphics/src/graphics.cpp:2216–2230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2214 }
2215
2216 HUniformLocation FindUniformLocation(HProgram program, dmhash_t name_hash)
2217 {
2218 uint32_t uniform_count = GetUniformCount(program);
2219 for (uint32_t i = 0; i < uniform_count; ++i)
2220 {
2221 Uniform uniform;
2222 GetUniform(program, i, &uniform);
2223 if (uniform.m_NameHash == name_hash)
2224 {
2225 return uniform.m_Location;
2226 }
2227 }
2228
2229 return INVALID_UNIFORM_LOCATION;
2230 }
2231
2232 HUniformLocation FindUniformLocation(HProgram program, const char* name)
2233 {

Callers

nothing calls this directly

Calls 2

GetUniformCountFunction · 0.85
GetUniformFunction · 0.70

Tested by

no test coverage detected