| 192 | } |
| 193 | |
| 194 | BaseMatInstance * MaterialManager::createWarningMatInstance() |
| 195 | { |
| 196 | Material *warnMat = static_cast<Material*>(Sim::findObject("WarningMaterial")); |
| 197 | |
| 198 | BaseMatInstance *warnMatInstance = NULL; |
| 199 | |
| 200 | if( warnMat != NULL ) |
| 201 | { |
| 202 | warnMatInstance = warnMat->createMatInstance(); |
| 203 | |
| 204 | GFXStateBlockDesc desc; |
| 205 | desc.setCullMode(GFXCullNone); |
| 206 | warnMatInstance->addStateBlockDesc(desc); |
| 207 | |
| 208 | warnMatInstance->init( getDefaultFeatures(), |
| 209 | getGFXVertexFormat<GFXVertexPNTTB>() ); |
| 210 | } |
| 211 | |
| 212 | return warnMatInstance; |
| 213 | } |
| 214 | |
| 215 | // Gets the global warning material instance, callers should not free this copy |
| 216 | BaseMatInstance * MaterialManager::getWarningMatInstance() |
no test coverage detected