| 1063 | } |
| 1064 | |
| 1065 | void 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 | |
| 1085 | TerrainCellMaterial* TerrCell::getMaterial() |
| 1086 | { |
no test coverage detected