Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 322 vs 325 for /trunk/Source Code/Environment/Vegetation/Vegetation.cpp

Diff revisions: vs.
  @@ -29,7 +29,6 @@
29 29 _success(false),
30 30 _culledFinal(false),
31 31 _shadowMapped(true),
32 - _terrainSGN(nullptr),
33 32 _terrainChunk(nullptr),
34 33 _instanceCountGrass(0),
35 34 _instanceCountTrees(0),
  @@ -75,20 +74,19 @@
75 74 _grassPositions.clear();
76 75 RemoveResource(_cullShader);
77 76
78 - SAFE_DELETE(_grassGPUBuffer[0]);
79 - SAFE_DELETE(_grassGPUBuffer[1]);
80 - SAFE_DELETE(_treeGPUBuffer[0]);
81 - SAFE_DELETE(_treeGPUBuffer[1]);
82 - SAFE_DELETE(_grassMatrices);
77 + MemoryManager::SAFE_DELETE( _grassGPUBuffer[0] );
78 + MemoryManager::SAFE_DELETE( _grassGPUBuffer[1] );
79 + MemoryManager::SAFE_DELETE( _treeGPUBuffer[0] );
80 + MemoryManager::SAFE_DELETE( _treeGPUBuffer[1] );
81 + MemoryManager::SAFE_DELETE( _grassMatrices );
83 82 PRINT_FN(Locale::get("UNLOAD_VEGETATION_END"));
84 83 }
85 84
86 - void Vegetation::initialize(TerrainChunk* const terrainChunk, SceneGraphNode* const terrainSGN) {
85 + void Vegetation::initialize( TerrainChunk* const terrainChunk ) {
87 86 assert(terrainChunk);
88 87 assert(_map.data() != nullptr);
89 88
90 89 _terrainChunk = terrainChunk;
91 - _terrainSGN = terrainSGN;
92 90
93 91 _cullShader->Uniform("ObjectExtent", vec3<F32>(1.0f, 1.0f, 1.0f));
94 92 _cullShader->UniformTexture("HiZBuffer", 0);