OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OgreD3D9VideoMode.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2011 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __D3D9VIDEOMODE_H__
29 #define __D3D9VIDEOMODE_H__
30 
31 #include "OgreD3D9Prerequisites.h"
32 #include "OgreString.h"
33 
34 namespace Ogre
35 {
36  static unsigned int modeCount = 0;
37 
39  {
40  private:
41  D3DDISPLAYMODE mDisplayMode;
42  unsigned int modeNumber;
43 
44  public:
45  D3D9VideoMode() { modeNumber = ++modeCount; ZeroMemory( &mDisplayMode, sizeof(D3DDISPLAYMODE) ); }
46  D3D9VideoMode( const D3D9VideoMode &ob ) { modeNumber = ++modeCount; mDisplayMode = ob.mDisplayMode; }
47  D3D9VideoMode( D3DDISPLAYMODE d3ddm ) { modeNumber = ++modeCount; mDisplayMode = d3ddm; }
49  {
50  modeCount--;
51  }
52 
53  unsigned int getWidth() const { return mDisplayMode.Width; }
54  unsigned int getHeight() const { return mDisplayMode.Height; }
55  D3DFORMAT getFormat() const { return mDisplayMode.Format; }
56  unsigned int getRefreshRate() const { return mDisplayMode.RefreshRate; }
57  unsigned int getColourDepth() const;
58  D3DDISPLAYMODE getDisplayMode() const { return mDisplayMode; }
59  void increaseRefreshRate(unsigned int rr) { mDisplayMode.RefreshRate = rr; }
60  String getDescription() const;
61  };
62 }
63 #endif
unsigned int getRefreshRate() const
D3DDISPLAYMODE getDisplayMode() const
unsigned int getHeight() const
D3DFORMAT getFormat() const
unsigned int getWidth() const
D3D9VideoMode(D3DDISPLAYMODE d3ddm)
void increaseRefreshRate(unsigned int rr)
#define _OgreD3D9Export
static unsigned int modeCount
D3DDISPLAYMODE mDisplayMode
_StringBase String
D3D9VideoMode(const D3D9VideoMode &ob)