| 189 | } |
| 190 | |
| 191 | bool 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 | |
| 223 | bool Material::parsePass(Technique* technique, Properties* passProperties) |
| 224 | { |
nothing calls this directly
no test coverage detected