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

Function GetUniform

engine/graphics/src/null/graphics_null.cpp:1139–1152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1137 }
1138
1139 const Uniform* GetUniform(HProgram prog, dmhash_t name_hash)
1140 {
1141 NullProgram* program = (NullProgram*)prog;
1142 uint32_t count = program->m_BaseProgram.m_Uniforms.Size();
1143 for (uint32_t i = 0; i < count; ++i)
1144 {
1145 Uniform& uniform = program->m_BaseProgram.m_Uniforms[i];
1146 if (uniform.m_NameHash == name_hash)
1147 {
1148 return &uniform;
1149 }
1150 }
1151 return 0x0;
1152 }
1153
1154 static void NullSetViewport(HContext context, int32_t x, int32_t y, int32_t width, int32_t height)
1155 {

Callers 2

TEST_FFunction · 0.50
GetUniformLocationFunction · 0.50

Calls 1

SizeMethod · 0.45

Tested by 2

TEST_FFunction · 0.40
GetUniformLocationFunction · 0.40