Merge branch 'ryzom/ark-features' into main/gingo-test
[ryzomcore.git] / nel / src / 3d / landscape_def.cpp
blob0c463e1679fa0e877c140af2d0e23c3aebff0def
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include "std3d.h"
20 #include "nel/3d/landscape_def.h"
21 #include "nel/misc/common.h"
24 using namespace NLMISC;
26 #ifdef DEBUG_NEW
27 #define new DEBUG_NEW
28 #endif
30 namespace NL3D
34 // ***************************************************************************
35 sint CLandscapeGlobals::CurrentDate=0;
36 sint CLandscapeGlobals::CurrentRenderDate=0;
37 CVector CLandscapeGlobals::RefineCenter= CVector::Null;
38 float CLandscapeGlobals::RefineThreshold= 0.001f;
39 float CLandscapeGlobals::OORefineThreshold= 1.0f / CLandscapeGlobals::RefineThreshold;
41 CVector CLandscapeGlobals::PZBModelPosition= CVector::Null;
43 float CLandscapeGlobals::TileDistNear= 50;
44 float CLandscapeGlobals::TileDistFar= CLandscapeGlobals::TileDistNear+20;
45 float CLandscapeGlobals::TileDistNearSqr= sqr(CLandscapeGlobals::TileDistNear);
46 float CLandscapeGlobals::TileDistFarSqr= sqr(CLandscapeGlobals::TileDistFar);
47 float CLandscapeGlobals::OOTileDistDeltaSqr= 1.0f / (CLandscapeGlobals::TileDistFarSqr - CLandscapeGlobals::TileDistNearSqr);
48 sint CLandscapeGlobals::TileMaxSubdivision=0;
49 CBSphere CLandscapeGlobals::TileFarSphere;
50 CBSphere CLandscapeGlobals::TileNearSphere;
51 float CLandscapeGlobals::TilePixelSize= 128;
52 float CLandscapeGlobals::TilePixelBias128= 0.5f/CLandscapeGlobals::TilePixelSize;
53 float CLandscapeGlobals::TilePixelScale128= 1-1/CLandscapeGlobals::TilePixelSize;
54 float CLandscapeGlobals::TilePixelBias256= 0.5f/(CLandscapeGlobals::TilePixelSize*2);
55 float CLandscapeGlobals::TilePixelScale256= 1-1/(CLandscapeGlobals::TilePixelSize*2);
58 float CLandscapeGlobals::Far0Dist= 200; // 200m.
59 float CLandscapeGlobals::Far1Dist= 400; // 400m.
60 float CLandscapeGlobals::FarTransition= 10; // Alpha transition= 10m.
63 bool CLandscapeGlobals::VertexProgramEnabled= false;
65 CFarVertexBufferInfo CLandscapeGlobals::CurrentFar0VBInfo;
66 CFarVertexBufferInfo CLandscapeGlobals::CurrentFar1VBInfo;
67 CNearVertexBufferInfo CLandscapeGlobals::CurrentTileVBInfo;
69 CLandscapeVBAllocator *CLandscapeGlobals::CurrentFar0VBAllocator= NULL;
70 CLandscapeVBAllocator *CLandscapeGlobals::CurrentFar1VBAllocator= NULL;
71 CLandscapeVBAllocator *CLandscapeGlobals::CurrentTileVBAllocator= NULL;
74 IDriver *CLandscapeGlobals::PatchCurrentDriver= NULL;
75 CIndexBuffer CLandscapeGlobals::PassTriArray("CLandscapeGlobals::PassTriArray");
76 CIndexBufferReadWrite CLandscapeGlobals::PassTriArrayIBA;
77 uint NL3D_LandscapeGlobals_PassNTri= 0;
78 void *NL3D_LandscapeGlobals_PassTriCurPtr= NULL;
79 CIndexBuffer::TFormat NL3D_LandscapeGlobals_PassTriFormat= CIndexBuffer::IndicesUnknownFormat;
82 } // NL3D