TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ SetUniform3f()

void Shader::SetUniform3f ( std::string  name,
float *  value 
)

Definition at line 135 of file Shader.cpp.

136{
137 if (uniformLocations.find(name) == uniformLocations.end())
138 {
139 uint32_t loc = glGetUniformLocation(m_Shader, name.c_str());
140 uniformLocations.insert(std::make_pair(name, loc));
141 glUniform3f(loc, value[0], value[1], value[2]);
142 }
143
144 else
145 {
146 uint32_t loc = uniformLocations[name];
147 glUniform3f(loc, value[0], value[1], value[2]);
148 }
149}