# OgreD3D7DeviceList.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 (c) 2000-2005 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 __D3DDEVICELIST_H__
    00026 #define __D3DDEVICELIST_H__
    00027
    00028 // Precompiler options
    00029 #include "OgreD3D7Prerequisites.h"
    00030
    00031 namespace Ogre {
    00032
    00033     class _OgreD3DExport D3DDevice;
    00037     class  _OgreD3DExport D3DDeviceList
    00038     {
    00039
    00040     private:
    00041
    00042
    00043         // STL list of drivers (Vector used to allow random access)
    00044         std::vector<D3DDevice> mDeviceList;
    00045
    00046         void AddDevice(    LPSTR lpDeviceDesc,
    00047                         LPSTR lpDeviceName,
    00048                         LPD3DDEVICEDESC7 lpD3DDeviceDesc);
    00049
    00050
    00051     public:
    00052         // Pointer to D3D interface
    00053         LPDIRECT3D7 lpD3D;
    00054
    00055
    00056         D3DDeviceList(LPDIRECT3D7 lpD3D); // Only allowed Constructor
    00057         ~D3DDeviceList();
    00058         BOOL enumerate(void); //Forces an enumeration / re-enumeration
    00059
    00060         // List accessors
    00061         D3DDevice* item(size_t index);
    00062         size_t count(void);
    00063
    00074         D3DDevice* getBest(unsigned int minColourDepth);
    00075
    00076
    00077         // Non-member callbacks
    00078         friend static HRESULT CALLBACK D3DEnumDevicesCallback(
    00079                                     LPSTR lpDeviceDescription,
    00080                                     LPSTR lpDeviceName,
    00081                                     LPD3DDEVICEDESC7 lpD3DDeviceDesc,
    00082                                     LPVOID lpContext);
    00083     };
    00084
    00085 }// Namespace Ogre
    00086 #endif

Copyright © 2000-2005 by The OGRE Team
Last modified Sun Nov 20 12:35:57 2005