Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# OgreD3D9Prerequisites.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright © 2000-2002 The OGRE Team
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023 -----------------------------------------------------------------------------
    00024 */
    00025 #ifndef __D3D9PREREQUISITES_H__
    00026 #define __D3D9PREREQUISITES_H__
    00027
    00028 #include "OgrePrerequisites.h"
    00029
    00030 // Define versions for if DirectX is in use (Win32 only)
    00031 #define DIRECT3D_VERSION 0x0900
    00032
    00033 // some D3D commonly used macros
    00034 #define SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
    00035 #define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
    00036 #define SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
    00037
    00038
    00039 #include "OgreNoMemoryMacros.h"
    00040 #define NOMINMAX // required to stop windows.h screwing up std::min definition
    00041 #include <d3d9.h>
    00042 #include <d3dx9.h>
    00043 #include <dxerr9.h>
    00044 #include "OgreMemoryMacros.h"
    00045
    00046
    00047 namespace Ogre
    00048 {
    00049     // Predefine classes
    00050     class D3D9RenderSystem;
    00051     class D3D9Texture;
    00052     class D3D9TextureManager;
    00053     class D3D9Driver;
    00054     class D3D9DriverList;
    00055     class D3D9VideoMode;
    00056     class D3D9VideoModeList;
    00057     class D3D9GpuProgram;
    00058     class D3D9GpuProgramManager;
    00059     class D3D9HardwareBufferManager;
    00060     class D3D9HardwareIndexBuffer;
    00061     class D3D9HLSLProgramFactory;
    00062     class D3D9HLSLProgram;
    00063     class D3D9VertexDeclaration;
    00064
    00065 // Should we ask D3D to manage vertex/index buffers automatically?
    00066 // Doing so avoids lost devices, but also has a performance impact
    00067 // which is unacceptably bad when using very large buffers
    00068 #define OGRE_D3D_MANAGE_BUFFERS 1
    00069
    00070     //-------------------------------------------
    00071     // Windows setttings
    00072     //-------------------------------------------
    00073 #if OGRE_PLATFORM == PLATFORM_WIN32
    00074 #   if OGRE_DYNAMIC_LINKAGE == 0
    00075 #       pragma warn( "No dynamic linkage" )
    00076 #       define _OgreD3D9Export
    00077 #   else
    00078 #       ifdef OGRED3DENGINEDLL_EXPORTS
    00079 #           define _OgreD3D9Export __declspec(dllexport)
    00080 #       else
    00081 #           define _OgreD3D9Export __declspec(dllimport)
    00082 #       endif
    00083 #   endif
    00084 #endif  // OGRE_WIN32
    00085 }
    00086 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:20 2004