Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 167 vs 168 for /trunk/Source Code/Environment/Terrain/TerrainChunk.cpp

Diff revisions: vs.
  @@ -9,13 +9,13 @@
9 9 #include "Geometry/Material/Headers/Material.h"
10 10
11 11 void TerrainChunk::Load(U8 depth, const vec2<U32>& pos, const vec2<U32>& HMsize){
12 - for(U8 i=0; i < TERRAIN_CHUNKS_LOD; i++) ComputeIndicesArray(i, depth, pos, HMsize);
12 + for(U8 i=0; i < Config::TERRAIN_CHUNKS_LOD; i++) ComputeIndicesArray(i, depth, pos, HMsize);
13 13
14 - _grassData._grassVisibility = GET_ACTIVE_SCENE()->state()->getGrassVisibility();
14 + _grassData._grassVisibility = GET_ACTIVE_SCENE()->state().getGrassVisibility();
15 15 }
16 16
17 17 void TerrainChunk::ComputeIndicesArray(I8 lod, U8 depth, const vec2<U32>& position, const vec2<U32>& heightMapSize){
18 - assert(lod < TERRAIN_CHUNKS_LOD);
18 + assert(lod < Config::TERRAIN_CHUNKS_LOD);
19 19
20 20 U32 offset = (U32)pow(2.0f, (F32)(lod));
21 21 U32 div = (U32)pow(2.0f, (F32)(depth+lod));
  @@ -50,7 +50,7 @@
50 50 }
51 51
52 52 void TerrainChunk::Destroy(){
53 - for(U8 i=0; i<TERRAIN_CHUNKS_LOD; i++){
53 + for(U8 i = 0; i < Config::TERRAIN_CHUNKS_LOD; i++){
54 54 _indice[i].clear();
55 55 _indOffsetW[i] = 0;
56 56 _indOffsetH[i] = 0;
  @@ -59,7 +59,7 @@
59 59 }
60 60
61 61 I32 TerrainChunk::DrawGround(I8 lod, ShaderProgram* const program, VertexBufferObject* const vbo){
62 - assert(lod < TERRAIN_CHUNKS_LOD);
62 + assert(lod < Config::TERRAIN_CHUNKS_LOD);
63 63 if(lod>0) lod--;
64 64
65 65 program->Uniform("LODFactor", 1.0f / (lod+1));
  @@ -72,7 +72,7 @@
72 72 }
73 73
74 74 void TerrainChunk::DrawGrass(I8 lod, F32 d,U32 geometryIndex, Transform* const parentTransform){
75 - assert(lod < TERRAIN_CHUNKS_LOD);
75 + assert(lod < Config::TERRAIN_CHUNKS_LOD);
76 76 if(lod != 0) return;
77 77 if(d > _grassData._grassVisibility) { //if we go beyond grass visibility limit ...
78 78 return; // ... do not draw grass