| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- /*-------------------------------------------------------------------------
- This source file is a part of OGRE
- (Object-oriented Graphics Rendering Engine)
- For the latest info, see http://www.ogre3d.org/
- Copyright (c) 2000-2011 Torus Knot Software Ltd
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE
- -------------------------------------------------------------------------*/
- #ifndef __OgrePrerequisites_H__
- #define __OgrePrerequisites_H__
- #include "CmPrerequisitesUtil.h"
- #define CM_MAX_TEXTURE_LAYERS 16
- #define CM_MAX_MULTIPLE_RENDER_TARGETS 8
- //----------------------------------------------------------------------------
- // Windows Settings
- #if CM_PLATFORM == CM_PLATFORM_WIN32
- // If we're not including this from a client build, specify that the stuff
- // should get exported. Otherwise, import it.
- # if defined( CM_STATIC_LIB )
- // Linux compilers don't have symbol import/export directives.
- # define CM_EXPORT
- # else
- # if defined( CM_EXPORTS )
- # define CM_EXPORT __declspec( dllexport )
- # else
- # if defined( __MINGW32__ )
- # define CM_EXPORT
- # else
- # define CM_EXPORT __declspec( dllimport )
- # endif
- # endif
- # endif
- // Win32 compilers use _DEBUG for specifying debug builds.
- // for MinGW, we set DEBUG
- # if defined(_DEBUG) || defined(DEBUG)
- # define CM_DEBUG_MODE 1
- # else
- # define CM_DEBUG_MODE 0
- # endif
- #endif // CM_PLATFORM == CM_PLATFORM_WIN32
- namespace CamelotEngine {
- // Pre-declare classes
- // Allows use of pointers in header files without including individual .h
- // so decreases dependencies between files
- class Camera;
- class Color;
- class GpuProgram;
- class GpuProgramManager;
- class GpuProgramParameters;
- class HardwareIndexBuffer;
- class HardwareOcclusionQuery;
- class HardwareVertexBuffer;
- class HardwarePixelBuffer;
- class HighLevelGpuProgram;
- class HighLevelGpuProgramManager;
- class HighLevelGpuProgramFactory;
- class IndexData;
- class Pass;
- class Technique;
- class Shader;
- class Material;
- class RenderSystem;
- class RenderSystemCapabilities;
- class RenderTarget;
- class RenderTexture;
- class MultiRenderTarget;
- class RenderWindow;
- class RenderOperation;
- class StringInterface;
- class TextureState;
- class TextureManager;
- class Viewport;
- class VertexBufferBinding;
- class VertexData;
- class VertexDeclaration;
- class Input;
- class InputHandler;
- class Renderable;
- class Renderer;
- class RendererFactory;
- class WorkQueue;
- // Asset import
- class SpecificImporter;
- class Importer;
- // Resources
- class Resource;
- class Resources;
- class Texture;
- class Mesh;
- // Scene
- class GameObject;
- class Component;
- class SceneManager;
- // RTTI
- class MeshRTTI;
- }
- /* Shared pointer typedefs*/
- namespace CamelotEngine
- {
- typedef std::shared_ptr<GpuProgram> GpuProgramPtr;
- typedef std::shared_ptr<GpuProgramParameters> GpuProgramParametersPtr;
- typedef std::shared_ptr<HighLevelGpuProgram> HighLevelGpuProgramPtr;
- typedef std::shared_ptr<HardwarePixelBuffer> HardwarePixelBufferPtr;
- typedef std::shared_ptr<VertexDeclaration> VertexDeclarationPtr;
- typedef std::shared_ptr<Mesh> MeshPtr;
- typedef std::shared_ptr<Texture> TexturePtr;
- typedef std::shared_ptr<Resource> ResourcePtr;
- typedef std::shared_ptr<Camera> CameraPtr;
- typedef std::shared_ptr<Renderable> RenderablePtr;
- typedef std::shared_ptr<Technique> TechniquePtr;
- typedef std::shared_ptr<Pass> PassPtr;
- typedef std::shared_ptr<Shader> ShaderPtr;
- typedef std::shared_ptr<Material> MaterialPtr;
- typedef std::shared_ptr<Renderer> RendererPtr;
- typedef std::shared_ptr<RendererFactory> RendererFactoryPtr;
- typedef std::shared_ptr<WorkQueue> WorkQueuePtr;
- typedef std::shared_ptr<Component> ComponentPtr;
- typedef std::shared_ptr<GameObject> GameObjectPtr;
- }
- // All type IDs
- namespace CamelotEngine
- {
- enum TypeID_Core
- {
- TID_Texture = 1001,
- TID_Mesh = 1002,
- TID_MeshData = 1003,
- TID_VertexDeclaration = 1004,
- TID_VertexData = 1005,
- TID_Component = 1006,
- TID_Camera = 1007,
- TID_Renderable = 1008,
- TID_ResourceRef = 1009,
- TID_GpuProgram = 1010,
- TID_ResourceRefData = 1011,
- TID_CgProgram = 1012,
- TID_ResourceMetaData = 1013,
- TID_Pass = 1014,
- TID_Technique = 1015,
- TID_Shader = 1016,
- TID_Material = 1017,
- TID_MaterialParams = 1018,
- TID_FloatParamKVP = 1019,
- TID_MaterialTexParamKVP = 1020
- };
- }
- /************************************************************************/
- /* Resource references */
- /************************************************************************/
- #include "CmResourceRef.h"
- namespace CamelotEngine
- {
- typedef ResourceRef<Resource> BaseResourceRef;
- typedef ResourceRef<Texture> TextureRef;
- typedef ResourceRef<Mesh> MeshRef;
- typedef ResourceRef<GpuProgram> GpuProgramRef;
- typedef ResourceRef<HighLevelGpuProgram> HighLevelGpuProgramRef;
- typedef ResourceRef<Material> MaterialRef;
- }
- #endif // __OgrePrerequisites_H__
|