Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/ogre/RenderSystems/Direct3D9/include/OgreD3D9Prerequisites.h @ 46

Last change on this file since 46 was 5, checked in by anonymous, 17 years ago

=hoffentlich gehts jetzt

File size: 3.1 KB
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-2006 Torus Knot Software Ltd
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
24You may alternatively use this source under the terms of a specific version of
25the OGRE Unrestricted License provided you have obtained such a license from
26Torus Knot Software Ltd.
27-----------------------------------------------------------------------------
28*/
29#ifndef __D3D9PREREQUISITES_H__
30#define __D3D9PREREQUISITES_H__
31
32#include "OgrePrerequisites.h"
33
34// Define versions for if DirectX is in use (Win32 only)
35#define DIRECT3D_VERSION 0x0900
36
37// some D3D commonly used macros
38#define SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
39#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
40#define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
41
42
43#include "OgreNoMemoryMacros.h"
44#undef NOMINMAX
45#define NOMINMAX // required to stop windows.h screwing up std::min definition
46#include <d3d9.h>
47#include <d3dx9.h>
48#include <dxerr9.h>
49#include "OgreMemoryMacros.h"
50
51
52namespace Ogre
53{
54        // Predefine classes
55        class D3D9RenderSystem;
56        class D3D9RenderWindow;
57        class D3D9Texture;
58        class D3D9TextureManager;
59        class D3D9Driver;
60        class D3D9DriverList;
61        class D3D9VideoMode;
62        class D3D9VideoModeList;
63        class D3D9GpuProgram;
64        class D3D9GpuProgramManager;
65    class D3D9HardwareBufferManager;
66    class D3D9HardwareIndexBuffer;
67    class D3D9HLSLProgramFactory;
68    class D3D9HLSLProgram;
69    class D3D9VertexDeclaration;
70
71// Should we ask D3D to manage vertex/index buffers automatically?
72// Doing so avoids lost devices, but also has a performance impact
73// which is unacceptably bad when using very large buffers
74#define OGRE_D3D_MANAGE_BUFFERS 1
75
76    //-------------------------------------------
77        // Windows setttings
78        //-------------------------------------------
79#if (OGRE_PLATFORM == OGRE_PLATFORM_WIN32) && !defined(OGRE_STATIC_LIB)
80#       ifdef OGRED3DENGINEDLL_EXPORTS
81#               define _OgreD3D9Export __declspec(dllexport)
82#       else
83#       if defined( __MINGW32__ )
84#           define _OgreD3D9Export
85#       else
86#               define _OgreD3D9Export __declspec(dllimport)
87#       endif
88#       endif
89#else
90#       define _OgreD3D9Export
91#endif  // OGRE_WIN32
92}
93#endif
Note: See TracBrowser for help on using the repository browser.