//------------------------------------------------------------------------ void TerrainBatch::createGpuIndexData() { destroyGpuIndexData(); if ( !mGpuIndexData ) { // clone, using default buffer manager ie hardware mGpuIndexData = MG_NEW IndexData(); populateIndexData(); } }
//--------------------------------------------------------------------- void TerrainQuadTreeNode::createGpuIndexData() { for (size_t lod = 0; lod < mLodLevels.size(); ++lod) { LodLevel* ll = mLodLevels[lod]; if (!ll->pIndexBuf) { // clone, using default buffer manager ie hardware populateIndexData(ll->batchSize, &ll->pIndexBuf, ll->nIndexCount); } if (ll->nIndexCount == 0) { int asdf = 0; } } }