MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / set

Method set

Source/Effect/Effect.cpp:102–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void Pass::set(String name, float var) {
103 std::string uname(name);
104 auto it = _uniforms.find(uname);
105 if (it != _uniforms.end() && !it->second->getValue()->as<Texture2D>()) {
106 it->second->getValue()->set(var);
107 } else {
108 bgfx::UniformHandle handle = bgfx::createUniform(uname.c_str(), bgfx::UniformType::Vec4);
109 _uniforms[uname] = Uniform::create(handle, Value::alloc(var));
110 }
111}
112
113void Pass::set(String name, float var1, float var2, float var3, float var4) {
114 set(name, Vec4{var1, var2, var3, var4});

Callers

nothing calls this directly

Calls 12

createUniformFunction · 0.85
toVec4Method · 0.80
findMethod · 0.65
setMethod · 0.65
toStringMethod · 0.65
createFunction · 0.50
allocFunction · 0.50
setFunction · 0.50
endMethod · 0.45
getValueMethod · 0.45
c_strMethod · 0.45
setSlotMethod · 0.45

Tested by

no test coverage detected