MCPcopy Create free account
hub / github.com/axmolengine/axmol / resetUniforms

Method resetUniforms

core/renderer/backend/ProgramState.cpp:192–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void ProgramState::resetUniforms()
193{
194#if AX_ENABLE_CACHE_TEXTURE_DATA
195 if (_program == nullptr)
196 return;
197
198 const auto& uniformLocation = _program->getAllUniformsLocation();
199 for (const auto& uniform : uniformLocation)
200 {
201 auto location = uniform.second;
202 auto mappedLocation = _program->getMappedLocation(location);
203
204 // check if current location had been set before
205 if (_vertexTextureInfos.find(location) != _vertexTextureInfos.end())
206 {
207 _vertexTextureInfos[location].location = mappedLocation;
208 }
209 }
210#endif
211}
212
213ProgramState::~ProgramState()
214{

Callers 1

initMethod · 0.95

Calls 4

getMappedLocationMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected