MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / preloadMaterials

Method preloadMaterials

Engine/source/terrain/terrCell.cpp:1065–1083  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1063}
1064
1065void TerrCell::preloadMaterials()
1066{
1067 PROFILE_SCOPE( TerrCell_PreloadMaterials );
1068
1069 // If we have a VB then we need a material.
1070 if ( mVertexBuffer.isValid() )
1071 {
1072 TerrainCellMaterial *material = getMaterial();
1073 material->getReflectMat();
1074
1075 if ( GFX->getPixelShaderVersion() > 2.0f &&
1076 String::compare( LIGHTMGR->getId(), "BLM" ) != 0)
1077 material->getDeferredMat();
1078 }
1079
1080 for ( U32 i = 0; i < 4; i++ )
1081 if ( mChildren[i] )
1082 mChildren[i]->preloadMaterials();
1083}
1084
1085TerrainCellMaterial* TerrCell::getMaterial()
1086{

Callers 1

setFileMethod · 0.80

Calls 6

compareFunction · 0.85
getDeferredMatMethod · 0.80
getIdMethod · 0.65
isValidMethod · 0.45
getReflectMatMethod · 0.45
getPixelShaderVersionMethod · 0.45

Tested by

no test coverage detected