OgreConfig.h 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. -----------------------------------------------------------------------------
  3. This source file is part of OGRE
  4. (Object-oriented Graphics Rendering Engine)
  5. For the latest info, see http://www.ogre3d.org/
  6. Copyright (c) 2000-2011 Torus Knot Software Ltd
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. -----------------------------------------------------------------------------
  23. */
  24. #ifndef __Config_H_
  25. #define __Config_H_
  26. // Include the CMake-generated build settings.
  27. // If you get complaints that this file is missing, then you're probably
  28. // trying to link directly against your source dir. You must then add
  29. // %BUILD_DIR%/include to your include search path to find OgreBuildSettings.h.
  30. #include "OgreBuildSettings.h"
  31. /** If set to 1, profiling code will be included in the application. When you
  32. are deploying your application you will probably want to set this to 0 */
  33. #ifndef OGRE_PROFILING
  34. #define OGRE_PROFILING 0
  35. #endif
  36. /** There are three modes for handling asserts in OGRE:
  37. 0 - STANDARD - Standard asserts in debug builds, nothing in release builds
  38. 1 - RELEASE_EXCEPTIONS - Standard asserts in debug builds, exceptions in release builds
  39. 2 - EXCEPTIONS - Exceptions in debug builds, exceptions in release builds
  40. */
  41. #define OGRE_ASSERT_MODE 0
  42. /** If set to >0, OGRE will always 'think' that the graphics card only has the
  43. number of texture units specified. Very useful for testing multipass fallback.
  44. */
  45. #define OGRE_PRETEND_TEXTURE_UNITS 0
  46. /** If set to 1, Real is typedef'ed to double. Otherwise, Real is typedef'ed
  47. to float. Setting this allows you to perform mathematical operations in the
  48. CPU (Quaternion, Vector3 etc) with more precision, but bear in mind that the
  49. GPU still operates in single-precision mode.
  50. */
  51. #ifndef OGRE_DOUBLE_PRECISION
  52. #define OGRE_DOUBLE_PRECISION 0
  53. #endif
  54. /** Define number of texture coordinate sets allowed per vertex.
  55. */
  56. #define OGRE_MAX_TEXTURE_COORD_SETS 6
  57. /** Define max number of texture layers allowed per pass on any card.
  58. */
  59. #define OGRE_MAX_TEXTURE_LAYERS 16
  60. /** Define max number of lights allowed per pass.
  61. */
  62. #define OGRE_MAX_SIMULTANEOUS_LIGHTS 8
  63. /** Define max number of blending weights allowed per vertex.
  64. */
  65. #define OGRE_MAX_BLEND_WEIGHTS 4
  66. /** Define this if you want to link OGRE as a static lib (preferably as a project file)
  67. */
  68. //#define OGRE_STATIC_LIB
  69. // define the memory allocator configuration to use
  70. #define OGRE_MEMORY_ALLOCATOR_STD 1
  71. #define OGRE_MEMORY_ALLOCATOR_NED 2
  72. #define OGRE_MEMORY_ALLOCATOR_USER 3
  73. #define OGRE_MEMORY_ALLOCATOR_NEDPOOLING 4
  74. #ifndef OGRE_MEMORY_ALLOCATOR
  75. # define OGRE_MEMORY_ALLOCATOR OGRE_MEMORY_ALLOCATOR_NEDPOOLING
  76. #endif
  77. // Whether to use the custom memory allocator in STL containers
  78. #ifndef OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR
  79. # define OGRE_CONTAINERS_USE_CUSTOM_MEMORY_ALLOCATOR 1
  80. #endif
  81. //if you want to make Ogre::String use the custom memory allocator then set:
  82. //#define OGRE_STRING_USE_CUSTOM_MEMORY_ALLOCATOR 1
  83. // Doing this will mean Ogre's strings will not be compatible with std::string however
  84. #ifndef OGRE_STRING_USE_CUSTOM_MEMORY_ALLOCATOR
  85. # define OGRE_STRING_USE_CUSTOM_MEMORY_ALLOCATOR 0
  86. #endif
  87. // enable or disable the memory tracker, recording the memory allocations & tracking leaks
  88. // default is to disable since it's expensive, but you can enable if needed per build target
  89. #ifndef OGRE_MEMORY_TRACKER_DEBUG_MODE
  90. # define OGRE_MEMORY_TRACKER_DEBUG_MODE 0
  91. #endif
  92. #ifndef OGRE_MEMORY_TRACKER_RELEASE_MODE
  93. # define OGRE_MEMORY_TRACKER_RELEASE_MODE 0
  94. #endif
  95. /** Define max number of multiple render targets (MRTs) to render to at once.
  96. */
  97. #define OGRE_MAX_MULTIPLE_RENDER_TARGETS 8
  98. /** Support for multithreading, there are 3 options
  99. OGRE_THREAD_SUPPORT = 0
  100. No support for threading.
  101. OGRE_THREAD_SUPPORT = 1
  102. Thread support for background loading, by both loading and constructing resources
  103. in a background thread. Resource management and SharedPtr handling becomes
  104. thread-safe, and resources may be completely loaded in the background.
  105. The places where threading is available are clearly
  106. marked, you should assume state is NOT thread safe unless otherwise
  107. stated in relation to this flag.
  108. OGRE_THREAD_SUPPORT = 2
  109. Thread support for background resource preparation. This means that resource
  110. data can streamed into memory in the background, but the final resource
  111. construction (including RenderSystem dependencies) is still done in the primary
  112. thread. Has a lower synchronisation primitive overhead than full threading
  113. while still allowing the major blocking aspects of resource management (I/O)
  114. to be done in the background.
  115. */
  116. #ifndef OGRE_THREAD_SUPPORT
  117. #define OGRE_THREAD_SUPPORT 0
  118. #endif
  119. #if OGRE_THREAD_SUPPORT != 0 && OGRE_THREAD_SUPPORT != 1 && OGRE_THREAD_SUPPORT != 2
  120. #define OGRE_THREAD_SUPPORT 0
  121. #endif
  122. /** Provider for threading functionality, there are 4 options.
  123. OGRE_THREAD_PROVIDER = 0
  124. No support for threading.
  125. OGRE_THREAD_PROVIDER = 1
  126. Boost libraries provide threading functionality.
  127. OGRE_THREAD_PROVIDER = 2
  128. Poco libraries provide threading functionality.
  129. OGRE_THREAD_PROVIDER = 3
  130. TBB library provides threading functionality.
  131. */
  132. #ifndef OGRE_THREAD_PROVIDER
  133. #define OGRE_THREAD_PROVIDER 0
  134. #endif
  135. /** Disables use of the FreeImage image library for loading images.
  136. WARNING: Use only when you want to provide your own image loading code via codecs.
  137. */
  138. #ifndef OGRE_NO_FREEIMAGE
  139. #define OGRE_NO_FREEIMAGE 0
  140. #endif
  141. /** Disables use of the DevIL image library for loading images.
  142. By default DevIL is disabled in Eihort in favour of FreeImage, but you may re-enable
  143. it if you choose
  144. */
  145. #ifndef OGRE_NO_DEVIL
  146. #define OGRE_NO_DEVIL 1
  147. #endif
  148. /** Disables use of the internal image codec for loading DDS files.
  149. WARNING: Use only when you want to provide your own image loading code via codecs.
  150. */
  151. #ifndef OGRE_NO_DDS_CODEC
  152. #define OGRE_NO_DDS_CODEC 0
  153. #endif
  154. /** Disables use of the ZIP archive support.
  155. WARNING: Disabling this will make the samples unusable.
  156. */
  157. #ifndef OGRE_NO_ZIP_ARCHIVE
  158. #define OGRE_NO_ZIP_ARCHIVE 0
  159. #endif
  160. /** Enables the use of the new script compilers when Ogre compiles resource scripts.
  161. */
  162. #ifndef OGRE_USE_NEW_COMPILERS
  163. #define OGRE_USE_NEW_COMPILERS 1
  164. #endif
  165. #endif