Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
VideoSettings.h
Go to the documentation of this file.
1 /* Project nGenEx
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: nGenEx.lib
6  FILE: VideoSettings.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Video Settings class
13 */
14 
15 #ifndef VideoSettings_h
16 #define VideoSettings_h
17 
18 #include "Types.h"
19 #include "Video.h"
20 
21 // +--------------------------------------------------------------------+
22 
23 struct VideoMode
24 {
25  enum Format {
26  FMT_NONE = 0,
27  FMT_R5G5B5 = 24,
28  FMT_R5G6B5 = 23,
29  FMT_R8G8B8 = 20,
31  };
32 
33  VideoMode() : width(0), height(0), refresh(0), format(0) { }
34  VideoMode(int w, int h, Format f, int r=0) : width(w), height(h), refresh(r), format(f) { }
35 
36  int operator == (const VideoMode& m) const { return m.width == width &&
37  m.height == height &&
38  m.format == format; }
39  int operator != (const VideoMode& m) const { return m.width != width ||
40  m.height != height ||
41  m.format != format; }
42 
43  const char* GetDescription() const;
44 
45  int width;
46  int height;
47  int refresh;
48  int format;
49 };
50 
51 // +--------------------------------------------------------------------+
52 
54 {
57 
62  DWORD device_type;
67  char adapter_desc[128];
68  char device_desc[128];
69 };
70 
71 // +--------------------------------------------------------------------+
72 
74 {
75 public:
81  };
82 
83  VideoSettings();
85 
86  // accessor methods
87 
88  bool IsWindowed() const;
89  bool UseEffects() const;
90  int GetWidth() const;
91  int GetHeight() const;
92  int GetDepth() const;
93  int GetPixSize() const;
94  int GetRefreshRate() const;
95 
96  const char* GetModeDescription() const;
97 
98  int GetVertexProcessing() const;
99  int GetDepthBufferBits() const;
100  int GetAdapterIndex() const;
101  int GetDeviceIndex() const;
102  DWORD GetDeviceType() const;
103  DWORD GetDepthStencilFormat() const;
104  DWORD GetBackBufferFormat() const;
105  const char* GetAdapterDesc() const;
106  const char* GetDeviceDesc() const;
107 
108  // properties
109 
118 
119  // feature set
120 
121  bool shadows;
122  bool bumpmaps;
123  bool specmaps;
125  DWORD enable_vs;
126  DWORD enable_ps;
127  float depth_bias;
128 };
129 
130 #endif VideoSettings_h
131