| 858 | } |
| 859 | |
| 860 | void GroundCover::_initMaterial() |
| 861 | { |
| 862 | SAFE_DELETE(mMaterialInst); |
| 863 | |
| 864 | if (mMaterialAsset.notNull() && mMaterialAsset->getStatus() == MaterialAsset::Ok) |
| 865 | mMaterialInst = mMaterial->createMatInstance(); |
| 866 | else |
| 867 | mMaterialInst = MATMGR->createMatInstance("WarningMaterial"); |
| 868 | |
| 869 | // Add our special feature that makes it all work... |
| 870 | FeatureSet features = MATMGR->getDefaultFeatures(); |
| 871 | features.addFeature( MFT_Foliage ); |
| 872 | |
| 873 | // Our feature requires a pointer back to this object |
| 874 | // to properly setup its shader consts. |
| 875 | mMaterialInst->setUserObject( this ); |
| 876 | |
| 877 | // DO IT! |
| 878 | mMaterialInst->init( features, getGFXVertexFormat<GCVertex>() ); |
| 879 | } |
| 880 | |
| 881 | void GroundCover::_initShapes() |
| 882 | { |
nothing calls this directly
no test coverage detected