source: OGRE/trunk/ogrenew/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h @ 657

Revision 657, 2.9 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4    (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2005 The OGRE Team
8Also see acknowledgements in Readme.html
9
10This program is free software; you can redistribute it and/or modify it under
11the terms of the GNU Lesser General Public License as published by the Free Software
12Foundation; either version 2 of the License, or (at your option) any later
13version.
14
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18
19You should have received a copy of the GNU Lesser General Public License along with
20this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21Place - Suite 330, Boston, MA 02111-1307, USA, or go to
22http://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#define NOMINMAX // required to stop windows.h screwing up std::min definition
41#include <d3d9.h>
42#include <d3dx9.h>
43#include <dxerr9.h>
44#include "OgreMemoryMacros.h"
45
46
47namespace Ogre
48{
49        // Predefine classes
50        class D3D9RenderSystem;
51        class D3D9RenderWindow;
52        class D3D9Texture;
53        class D3D9TextureManager;
54        class D3D9Driver;
55        class D3D9DriverList;
56        class D3D9VideoMode;
57        class D3D9VideoModeList;
58        class D3D9GpuProgram;
59        class D3D9GpuProgramManager;
60    class D3D9HardwareBufferManager;
61    class D3D9HardwareIndexBuffer;
62    class D3D9HLSLProgramFactory;
63    class D3D9HLSLProgram;
64    class D3D9VertexDeclaration;
65
66// Should we ask D3D to manage vertex/index buffers automatically?
67// Doing so avoids lost devices, but also has a performance impact
68// which is unacceptably bad when using very large buffers
69#define OGRE_D3D_MANAGE_BUFFERS 1
70   
71    //-------------------------------------------
72        // Windows setttings
73        //-------------------------------------------
74#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
75#       if OGRE_DYNAMIC_LINKAGE == 0
76#               pragma warn( "No dynamic linkage" )
77#               define _OgreD3D9Export
78#       else
79#               ifdef OGRED3DENGINEDLL_EXPORTS
80#                       define _OgreD3D9Export __declspec(dllexport)
81#               else
82#                       define _OgreD3D9Export __declspec(dllimport)
83#               endif
84#       endif
85#endif  // OGRE_WIN32
86}
87#endif
Note: See TracBrowser for help on using the repository browser.