CmPrerequisites.h 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. /*-------------------------------------------------------------------------
  2. This source file is a part of OGRE
  3. (Object-oriented Graphics Rendering Engine)
  4. For the latest info, see http://www.ogre3d.org/
  5. Copyright (c) 2000-2011 Torus Knot Software Ltd
  6. Permission is hereby granted, free of charge, to any person obtaining a copy
  7. of this software and associated documentation files (the "Software"), to deal
  8. in the Software without restriction, including without limitation the rights
  9. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. copies of the Software, and to permit persons to whom the Software is
  11. furnished to do so, subject to the following conditions:
  12. The above copyright notice and this permission notice shall be included in
  13. all copies or substantial portions of the Software.
  14. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. THE SOFTWARE
  21. -------------------------------------------------------------------------*/
  22. #ifndef __OgrePrerequisites_H__
  23. #define __OgrePrerequisites_H__
  24. #include "CmPrerequisitesUtil.h"
  25. #define CM_MAX_TEXTURE_LAYERS 16
  26. #define CM_MAX_MULTIPLE_RENDER_TARGETS 8
  27. //----------------------------------------------------------------------------
  28. // Windows Settings
  29. #if CM_PLATFORM == CM_PLATFORM_WIN32
  30. // If we're not including this from a client build, specify that the stuff
  31. // should get exported. Otherwise, import it.
  32. # if defined( CM_STATIC_LIB )
  33. // Linux compilers don't have symbol import/export directives.
  34. # define CM_EXPORT
  35. # else
  36. # if defined( CM_EXPORTS )
  37. # define CM_EXPORT __declspec( dllexport )
  38. # else
  39. # if defined( __MINGW32__ )
  40. # define CM_EXPORT
  41. # else
  42. # define CM_EXPORT __declspec( dllimport )
  43. # endif
  44. # endif
  45. # endif
  46. // Win32 compilers use _DEBUG for specifying debug builds.
  47. // for MinGW, we set DEBUG
  48. # if defined(_DEBUG) || defined(DEBUG)
  49. # define CM_DEBUG_MODE 1
  50. # else
  51. # define CM_DEBUG_MODE 0
  52. # endif
  53. #endif // CM_PLATFORM == CM_PLATFORM_WIN32
  54. namespace CamelotEngine {
  55. // Pre-declare classes
  56. // Allows use of pointers in header files without including individual .h
  57. // so decreases dependencies between files
  58. class Camera;
  59. class Color;
  60. class GpuProgram;
  61. class GpuProgramManager;
  62. class GpuProgramParameters;
  63. class HardwareIndexBuffer;
  64. class HardwareOcclusionQuery;
  65. class HardwareVertexBuffer;
  66. class HardwarePixelBuffer;
  67. class HighLevelGpuProgram;
  68. class HighLevelGpuProgramManager;
  69. class HighLevelGpuProgramFactory;
  70. class IndexData;
  71. class Pass;
  72. class Technique;
  73. class Shader;
  74. class Material;
  75. class RenderSystem;
  76. class RenderSystemCapabilities;
  77. class RenderTarget;
  78. class RenderTexture;
  79. class MultiRenderTarget;
  80. class RenderWindow;
  81. class RenderOperation;
  82. class StringInterface;
  83. class TextureState;
  84. class TextureManager;
  85. class Viewport;
  86. class VertexBufferBinding;
  87. class VertexData;
  88. class VertexDeclaration;
  89. class Input;
  90. class InputHandler;
  91. class Renderable;
  92. class Renderer;
  93. class RendererFactory;
  94. class WorkQueue;
  95. // Asset import
  96. class SpecificImporter;
  97. class Importer;
  98. // Resources
  99. class Resource;
  100. class Resources;
  101. class Texture;
  102. class Mesh;
  103. // Scene
  104. class GameObject;
  105. class Component;
  106. class SceneManager;
  107. // RTTI
  108. class MeshRTTI;
  109. }
  110. /* Shared pointer typedefs*/
  111. namespace CamelotEngine
  112. {
  113. typedef std::shared_ptr<GpuProgram> GpuProgramPtr;
  114. typedef std::shared_ptr<GpuProgramParameters> GpuProgramParametersPtr;
  115. typedef std::shared_ptr<HighLevelGpuProgram> HighLevelGpuProgramPtr;
  116. typedef std::shared_ptr<HardwarePixelBuffer> HardwarePixelBufferPtr;
  117. typedef std::shared_ptr<VertexDeclaration> VertexDeclarationPtr;
  118. typedef std::shared_ptr<Mesh> MeshPtr;
  119. typedef std::shared_ptr<Texture> TexturePtr;
  120. typedef std::shared_ptr<Resource> ResourcePtr;
  121. typedef std::shared_ptr<Camera> CameraPtr;
  122. typedef std::shared_ptr<Renderable> RenderablePtr;
  123. typedef std::shared_ptr<Technique> TechniquePtr;
  124. typedef std::shared_ptr<Pass> PassPtr;
  125. typedef std::shared_ptr<Shader> ShaderPtr;
  126. typedef std::shared_ptr<Material> MaterialPtr;
  127. typedef std::shared_ptr<Renderer> RendererPtr;
  128. typedef std::shared_ptr<RendererFactory> RendererFactoryPtr;
  129. typedef std::shared_ptr<WorkQueue> WorkQueuePtr;
  130. typedef std::shared_ptr<Component> ComponentPtr;
  131. typedef std::shared_ptr<GameObject> GameObjectPtr;
  132. }
  133. // All type IDs
  134. namespace CamelotEngine
  135. {
  136. enum TypeID_Core
  137. {
  138. TID_Texture = 1001,
  139. TID_Mesh = 1002,
  140. TID_MeshData = 1003,
  141. TID_VertexDeclaration = 1004,
  142. TID_VertexData = 1005,
  143. TID_Component = 1006,
  144. TID_Camera = 1007,
  145. TID_Renderable = 1008,
  146. TID_ResourceRef = 1009,
  147. TID_GpuProgram = 1010,
  148. TID_ResourceRefData = 1011,
  149. TID_CgProgram = 1012,
  150. TID_ResourceMetaData = 1013,
  151. TID_Pass = 1014,
  152. TID_Technique = 1015,
  153. TID_Shader = 1016,
  154. TID_Material = 1017,
  155. TID_MaterialParams = 1018,
  156. TID_FloatParamKVP = 1019,
  157. TID_MaterialTexParamKVP = 1020
  158. };
  159. }
  160. /************************************************************************/
  161. /* Resource references */
  162. /************************************************************************/
  163. #include "CmResourceRef.h"
  164. namespace CamelotEngine
  165. {
  166. typedef ResourceRef<Resource> BaseResourceRef;
  167. typedef ResourceRef<Texture> TextureRef;
  168. typedef ResourceRef<Mesh> MeshRef;
  169. typedef ResourceRef<GpuProgram> GpuProgramRef;
  170. typedef ResourceRef<HighLevelGpuProgram> HighLevelGpuProgramRef;
  171. typedef ResourceRef<Material> MaterialRef;
  172. }
  173. #endif // __OgrePrerequisites_H__