TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ SetUniformi()

void Shader::SetUniformi ( std::string  name,
int  value 
)

Definition at line 151 of file Shader.cpp.

152{
153 if (uniformLocations.find(name) == uniformLocations.end())
154 {
155 uint32_t loc = glGetUniformLocation(m_Shader, name.c_str());
156 uniformLocations.insert(std::make_pair(name, loc));
157 glUniform1i(loc, value);
158 }
159
160 else
161 {
162 uint32_t loc = uniformLocations[name];
163 glUniform1i(loc, value);
164 }
165}