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

Method _initMaterial

Engine/source/environment/meshRoad.cpp:884–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

882}
883
884void MeshRoad::_initMaterial()
885{
886 for ( U32 i = 0; i < SurfaceCount; i++ )
887 {
888 if ( mMatInst[i] )
889 SAFE_DELETE( mMatInst[i] );
890
891 if ( mMaterial[i] )
892 mMatInst[i] = mMaterial[i]->createMatInstance();
893 else
894 mMatInst[i] = MATMGR->createMatInstance( "WarningMaterial" );
895
896 mMatInst[i]->init( MATMGR->getDefaultFeatures(), getGFXVertexFormat<GFXVertexPNTT>() );
897 }
898}
899
900void MeshRoad::_debugRender( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance* )
901{

Callers

nothing calls this directly

Calls 2

createMatInstanceMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected