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/config.h

Diff revisions: vs.
  @@ -32,35 +32,53 @@
32 32 #ifndef _CONFIG_HEADER_
33 33 #define _CONFIG_HEADER_
34 34
35 - ///Application desired framerate for physics simulations
36 - #define TARGET_FRAME_RATE 60
37 - ///Application update rate
38 - #define TICKS_PER_SECOND 25
39 - ///Maximum frameskip
40 - #define MAX_FRAMESKIP 5
41 - ///Minimum triangle count for a mesh to apply depth rendering optimisations
42 - #define DEPTH_VBO_MIN_TRIANGLES 1000
43 - ///Minimum vbo size in bytes for a mesh to apply depth rendering optimisations (4MB default)
44 - #define DEPTH_VBO_MIN_BYTES 4 * 1024 * 1024
35 + namespace Config
36 + {
37 + /// How many textures to store per material. bump(0) + opacity(1) + spec(2) + tex[3..MAX_TEXTURE_STORAGE - 1]
38 + const int MAX_TEXTURE_STORAGE = 6;
39 + /// Application desired framerate for physics simulations
40 + const int TARGET_FRAME_RATE = 60;
41 + /// Application update rate
42 + const int TICKS_PER_SECOND = 25;
43 + /// Maximum frameskip
44 + const int MAX_FRAMESKIP = 5;
45 + /// Minimum triangle count for a mesh to apply depth rendering optimisations
46 + const int DEPTH_VBO_MIN_TRIANGLES = 1000;
47 + /// Minimum vbo size in bytes for a mesh to apply depth rendering optimisations (4MB default)
48 + const int DEPTH_VBO_MIN_BYTES = 4 * 1024 * 1024;
49 +
50 + /// How many clip planes should the shaders us
51 + const int MAX_CLIP_PLANES = 6;
52 + /// How many lights should affect a single node
53 + const int MAX_LIGHTS_PER_SCENE_NODE = 4;
54 + const int MAX_SHADOW_CASTING_LIGHTS_PER_NODE = 2;
55 + /// How many "units" away should a directional light source be from the camera's position
56 + const int DIRECTIONAL_LIGHT_DISTANCE = 500;
57 + /// Terrain LOD configuration
58 + /// Camera distance to the terrain chunk is calculated as follows:
59 + /// vector EyeToChunk = terrainBoundingBoxCenter - EyePos; cameraDistance = EyeToChunk.length();
60 + const int TERRAIN_CHUNKS_LOD = 3; //< Number of LOD levels for the terrain
61 + const int TERRAIN_CHUNK_LOD0 = 100; //< Relative distance for LOD0->LOD1 selection
62 + const int TERRAIN_CHUNK_LOD1 = 180; //< Relative distance for LOD0->LOD2 selection
63 +
64 + /// SceneNode LOD selection
65 + /// Distance computation is identical to the of the terrain (using SceneNode's bounding box)
66 + const int SCENE_NODE_LOD = 3;
67 + const int SCENE_NODE_LOD0 = 100; //< Relative distance for LOD0->LOD1 selection
68 + const int SCENE_NODE_LOD1 = 180; //< Relative distance for LOD0->LOD2 selection
69 +
70 + /// Edit the maximum number of concurrent threads that this application may start excluding tasks.
71 + /// Default 2 without: Rendering + Update + A.I. + Networking + PhysX
72 + const int THREAD_LIMIT = 2;
73 + }
45 74
75 + ///Direct 3D desired target version
46 76 #define TARGET_D3D_VERSION D3D11 /*or D3D10*/
47 77
48 - ///How many lights should affect a single node
49 - #define MAX_LIGHTS_PER_SCENE_NODE 4
50 - #define MAX_SHADOW_CASTING_LIGHTS_PER_NODE 2
51 -
52 - ///Terrain LOD configuration
53 - ///Camera distance to the terrain chunk is calculated as follows:
54 - /// vector EyeToChunk = terrainBoundingBoxCenter - EyePos; cameraDistance = EyeToChunk.length();
55 - #define TERRAIN_CHUNKS_LOD 3 //< Number of LOD levels for the terrain
56 - #define TERRAIN_CHUNK_LOD0 100.0f //< Relative distance for LOD0->LOD1 selection
57 - #define TERRAIN_CHUNK_LOD1 180.0f //< Relative distance for LOD0->LOD2 selection
58 -
59 - ///SceneNode LOD selection
60 - ///Distance computation is identical to the of the terrain (using SceneNode's bounding box)
61 - #define SCENE_NODE_LOD 3
62 - #define SCENE_NODE_LOD0 100.0f //< Relative distance for LOD0->LOD1 selection
63 - #define SCENE_NODE_LOD1 180.0f //< Relative distance for LOD0->LOD2 selection
78 + ///Comment this out to show the debug console
79 + #ifndef HIDE_DEBUG_CONSOLE
80 + #define HIDE_DEBUG_CONSOLE
81 + #endif //HIDE_DEBUG_CONSOLE
64 82
65 83 ///Current platform
66 84 #ifndef _WIN32
  @@ -76,23 +94,21 @@
76 94 //#define LINUX
77 95 #endif
78 96
97 + ///OS specific stuff
98 + #if defined( __WIN32__ ) || defined( _WIN32 )
99 + #define OS_WINDOWS
100 + #elif defined( __APPLE_CC__ ) // Apple OS X could be supported in the future
101 + #define OS_APPLE
102 + #else //Linux is the only other OS supported
103 + #define OS_NIX
104 + #endif
105 +
79 106 //#define HAVE_POSIX_MEMALIGN
80 107 #define HAVE_ALIGNED_MALLOC
81 108 #ifdef HAVE_ALIGNED_MALLOC
82 109 //#define __GNUC__
83 110 #endif
84 111
85 - ///Edit the maximum number of concurrent threads that this application may start excluding tasks.
86 - ///Default 2 without: Rendering + Update + A.I. + Networking + PhysX
87 - #ifndef THREAD_LIMIT
88 - #define THREAD_LIMIT 2
89 - #endif //THREAD_LIMIT
90 -
91 - ///Comment this out to show the debug console
92 - #ifndef HIDE_DEBUG_CONSOLE
93 - #define HIDE_DEBUG_CONSOLE
94 - #endif //HIDE_DEBUG_CONSOLE
95 -
96 112 ///Please enter the desired log file name
97 113 #ifndef OUTPUT_LOG_FILE
98 114 #define OUTPUT_LOG_FILE "console.log"
  @@ -102,11 +118,6 @@
102 118 #define ERROR_LOG_FILE "errors.log"
103 119 #endif //ERROR_LOG_FILE
104 120
105 - ///Show log timestamps
106 - #ifndef SHOW_LOG_TIMESTAMPS
107 - #define SHOW_LOG_TIMESTAMPS
108 - #endif //SHOW_LOG_TIMESTAMPS
109 -
110 121 ///Reduce Build time on Windows Platform
111 122 #ifndef VC_EXTRALEAN
112 123 #define VC_EXTRALEAN
  @@ -157,4 +168,8 @@
157 168 #define MAX_ALLOWED_JOYSTICKS 4
158 169 #endif
159 170
171 + ///If the target machine uses the nVidia Optimus layout (IntelHD + nVidia discreet GPU) this will force the engine to use the nVidia GPU always
172 + #ifdef WINDOWS_OS
173 + #define FORCE_NV_OPTIMUS_HIGHPERFORMANCE
174 + #endif
160 175 #endif //_CONFIG_HEADER