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 |
|
---|
7 | Copyright (c) 2000-2005 The OGRE Team
|
---|
8 | Also see acknowledgements in Readme.html
|
---|
9 |
|
---|
10 | This program is free software; you can redistribute it and/or modify it under
|
---|
11 | the terms of the GNU Lesser General Public License as published by the Free Software
|
---|
12 | Foundation; either version 2 of the License, or (at your option) any later
|
---|
13 | version.
|
---|
14 |
|
---|
15 | This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
---|
18 |
|
---|
19 | You should have received a copy of the GNU Lesser General Public License along with
|
---|
20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
---|
21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
---|
22 | http://www.gnu.org/copyleft/lesser.txt.
|
---|
23 | -----------------------------------------------------------------------------
|
---|
24 | */
|
---|
25 | #ifndef __D3D9PREREQUISITES_H__
|
---|
26 | #define __D3D9PREREQUISITES_H__
|
---|
27 |
|
---|
28 | #include "OgrePrerequisites.h"
|
---|
29 |
|
---|
30 | // Define versions for if DirectX is in use (Win32 only)
|
---|
31 | #define DIRECT3D_VERSION 0x0900
|
---|
32 |
|
---|
33 | // some D3D commonly used macros
|
---|
34 | #define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
|
---|
35 | #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
|
---|
36 | #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
|
---|
37 |
|
---|
38 |
|
---|
39 | #include "OgreNoMemoryMacros.h"
|
---|
40 | #undef NOMINMAX
|
---|
41 | #define NOMINMAX // required to stop windows.h screwing up std::min definition
|
---|
42 | #include <d3d9.h>
|
---|
43 | #include <d3dx9.h>
|
---|
44 | #include <dxerr9.h>
|
---|
45 | #include "OgreMemoryMacros.h"
|
---|
46 |
|
---|
47 |
|
---|
48 | namespace Ogre
|
---|
49 | {
|
---|
50 | // Predefine classes
|
---|
51 | class D3D9RenderSystem;
|
---|
52 | class D3D9RenderWindow;
|
---|
53 | class D3D9Texture;
|
---|
54 | class D3D9TextureManager;
|
---|
55 | class D3D9Driver;
|
---|
56 | class D3D9DriverList;
|
---|
57 | class D3D9VideoMode;
|
---|
58 | class D3D9VideoModeList;
|
---|
59 | class D3D9GpuProgram;
|
---|
60 | class D3D9GpuProgramManager;
|
---|
61 | class D3D9HardwareBufferManager;
|
---|
62 | class D3D9HardwareIndexBuffer;
|
---|
63 | class D3D9HLSLProgramFactory;
|
---|
64 | class D3D9HLSLProgram;
|
---|
65 | class D3D9VertexDeclaration;
|
---|
66 |
|
---|
67 | // Should we ask D3D to manage vertex/index buffers automatically?
|
---|
68 | // Doing so avoids lost devices, but also has a performance impact
|
---|
69 | // which is unacceptably bad when using very large buffers
|
---|
70 | #define OGRE_D3D_MANAGE_BUFFERS 1
|
---|
71 |
|
---|
72 | //-------------------------------------------
|
---|
73 | // Windows setttings
|
---|
74 | //-------------------------------------------
|
---|
75 | #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
|
---|
76 | # if OGRE_DYNAMIC_LINKAGE == 0
|
---|
77 | # pragma warn( "No dynamic linkage" )
|
---|
78 | # define _OgreD3D9Export
|
---|
79 | # else
|
---|
80 | # ifdef OGRED3DENGINEDLL_EXPORTS
|
---|
81 | # define _OgreD3D9Export __declspec(dllexport)
|
---|
82 | # else
|
---|
83 | # define _OgreD3D9Export __declspec(dllimport)
|
---|
84 | # endif
|
---|
85 | # endif
|
---|
86 | #endif // OGRE_WIN32
|
---|
87 | }
|
---|
88 | #endif
|
---|