MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / createWarningMatInstance

Method createWarningMatInstance

Engine/source/materials/materialManager.cpp:194–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194BaseMatInstance * 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
216BaseMatInstance * MaterialManager::getWarningMatInstance()

Callers 3

initMethod · 0.80
mapMaterialMethod · 0.80
initMethod · 0.80

Calls 5

setCullModeMethod · 0.80
findObjectFunction · 0.50
createMatInstanceMethod · 0.45
addStateBlockDescMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected