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

Method parseTechnique

core/renderer/Material.cpp:191–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189}
190
191bool Material::parseTechnique(Properties* techniqueProperties)
192{
193 auto technique = Technique::create(this);
194 _techniques.pushBack(technique);
195
196 // first one is the default one
197 if (!_currentTechnique)
198 _currentTechnique = technique;
199
200 // name
201 technique->setName(techniqueProperties->getId());
202
203 // passes
204 auto space = techniqueProperties->getNextNamespace();
205 while (space)
206 {
207 const char* name = space->getNamespace();
208 if (strcmp(name, "pass") == 0)
209 {
210 parsePass(technique, space);
211 }
212 else if (strcmp(name, "renderState") == 0)
213 {
214 parseRenderState(&technique->getStateBlock(), space);
215 }
216
217 space = techniqueProperties->getNextNamespace();
218 }
219
220 return true;
221}
222
223bool Material::parsePass(Technique* technique, Properties* passProperties)
224{

Callers

nothing calls this directly

Calls 6

createFunction · 0.85
pushBackMethod · 0.80
getNextNamespaceMethod · 0.80
getNamespaceMethod · 0.80
setNameMethod · 0.45
getIdMethod · 0.45

Tested by

no test coverage detected