source: OGRE/trunk/ogrenew/RenderSystems/Direct3D7/include/OgreD3D7DeviceList.h @ 657

Revision 657, 3.2 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 __D3DDEVICELIST_H__
26#define __D3DDEVICELIST_H__
27
28// Precompiler options
29#include "OgreD3D7Prerequisites.h"
30
31namespace Ogre {
32
33    class _OgreD3DExport D3DDevice;
34    /**
35      Encapsulates enumeration of Direct3D devices. Utility class for D3DRenderSystem.
36     */
37    class  _OgreD3DExport D3DDeviceList
38    {
39
40    private:
41
42
43        // STL list of drivers (Vector used to allow random access)
44        std::vector<D3DDevice> mDeviceList;
45
46        void AddDevice(    LPSTR lpDeviceDesc,
47                        LPSTR lpDeviceName,
48                        LPD3DDEVICEDESC7 lpD3DDeviceDesc);
49
50
51    public:
52        // Pointer to D3D interface
53        LPDIRECT3D7 lpD3D;
54
55
56        D3DDeviceList(LPDIRECT3D7 lpD3D); // Only allowed Constructor
57        ~D3DDeviceList();
58        BOOL enumerate(void); //Forces an enumeration / re-enumeration
59
60        // List accessors
61        D3DDevice* item(size_t index);
62        size_t count(void);
63
64        /**
65          Retrieves the 'best' 3D device type
66
67          This method returns the device type that is 'best' out of those available. The 3 types
68          that might be present are software emulation, hardware accelerated (HAL), and hardware transform
69          and light. Generally the latter are preferred over the former, however in some cases (mainly
70          very low-end cards) the hardware accelerated device type supports less features than the software
71          mode so may be preferred. In addition some HALs don't support the full range of rendering bit depths
72          (e.g. Matrox Millennium 1/2) so if a 32-bit colour depth is chosen, software mode must be used.
73        */
74        D3DDevice* getBest(unsigned int minColourDepth);
75
76
77        // Non-member callbacks
78        friend static HRESULT CALLBACK D3DEnumDevicesCallback(
79                                    LPSTR lpDeviceDescription,
80                                    LPSTR lpDeviceName,
81                                    LPD3DDEVICEDESC7 lpD3DDeviceDesc,
82                                    LPVOID lpContext);
83    };
84
85}// Namespace Ogre
86#endif
Note: See TracBrowser for help on using the repository browser.