28 #ifndef __D3D9PREREQUISITES_H__
29 #define __D3D9PREREQUISITES_H__
38 #if OGRE_THREAD_SUPPORT
39 # define OGRE_LOCK_RECURSIVE_MUTEX(name) name.lock();
40 # define OGRE_UNLOCK_RECURSIVE_MUTEX(name) name.unlock();
42 # define OGRE_LOCK_RECURSIVE_MUTEX(name)
43 # define OGRE_UNLOCK_RECURSIVE_MUTEX(name)
46 #if OGRE_THREAD_SUPPORT == 1
47 # define D3D9_DEVICE_ACCESS_LOCK OGRE_LOCK_RECURSIVE_MUTEX(msDeviceAccessMutex);
48 # define D3D9_DEVICE_ACCESS_UNLOCK OGRE_UNLOCK_RECURSIVE_MUTEX(msDeviceAccessMutex);
49 # define D3D9_DEVICE_ACCESS_CRITICAL_SECTION OGRE_LOCK_MUTEX(msDeviceAccessMutex);
51 # define D3D9_DEVICE_ACCESS_LOCK
52 # define D3D9_DEVICE_ACCESS_UNLOCK
53 # define D3D9_DEVICE_ACCESS_CRITICAL_SECTION
57 #define DIRECT3D_VERSION 0x0900
60 #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
61 #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
62 #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
66 # define D3D_DEBUG_INFO
69 #define WIN32_LEAN_AND_MEAN
70 #if !defined(NOMINMAX) && defined(_MSC_VER)
71 # define NOMINMAX // required to stop windows.h messing up std::min
81 class D3D9DepthBuffer;
82 class D3D9RenderSystem;
83 class D3D9RenderWindow;
85 class D3D9TextureManager;
89 class D3D9VideoModeList;
91 class D3D9GpuProgramManager;
92 class D3D9HardwareBufferManager;
93 class D3D9HardwareIndexBuffer;
94 class D3D9HLSLProgramFactory;
95 class D3D9HLSLProgram;
96 class D3D9VertexDeclaration;
106 #define OGRE_D3D_MANAGE_BUFFERS 1
111 #if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && !defined(OGRE_STATIC_LIB)
112 # ifdef OGRED3DENGINEDLL_EXPORTS
113 # define _OgreD3D9Export __declspec(dllexport)
115 # if defined( __MINGW32__ )
116 # define _OgreD3D9Export
118 # define _OgreD3D9Export __declspec(dllimport)
122 # define _OgreD3D9Export
SharedPtr< D3D9GpuProgram > D3D9GpuProgramPtr
SharedPtr< D3D9Texture > D3D9TexturePtr
Reference-counted shared pointer, used for objects where implicit destruction is required.
SharedPtr< D3D9HLSLProgram > D3D9HLSLProgramPtr
Represents a Direct3D rendering resource.