Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
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,
30
FMT_X8R8G8B8
= 22
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
53
struct
VideoDeviceInfo
54
{
55
VideoDeviceInfo
();
56
~VideoDeviceInfo
();
57
58
int
vertex_processing
;
59
int
depth_buffer_bits
;
60
int
adapter_index
;
61
int
device_index
;
62
DWORD
device_type
;
63
DWORD
depth_stencil_format
;
64
DWORD
back_buffer_format
;
65
DWORD
multisample_type
;
66
DWORD
multisample_qual
;
67
char
adapter_desc
[128];
68
char
device_desc
[128];
69
};
70
71
// +--------------------------------------------------------------------+
72
73
class
VideoSettings
74
{
75
public
:
76
enum
VertexProcessing
{
77
VTX_SOFTWARE
,
78
VTX_MIXED
,
79
VTX_HARDWARE
,
80
VTX_PURE
81
};
82
83
VideoSettings
();
84
~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
110
bool
is_windowed
;
111
bool
use_effects
;
112
VideoMode
fullscreen_mode
;
113
VideoMode
windowed_mode
;
114
int
window_width
;
115
int
window_height
;
116
VideoDeviceInfo
fullscreen_device
;
117
VideoDeviceInfo
windowed_device
;
118
119
// feature set
120
121
bool
shadows
;
122
bool
bumpmaps
;
123
bool
specmaps
;
124
int
max_detail
;
125
DWORD
enable_vs
;
126
DWORD
enable_ps
;
127
float
depth_bias
;
128
};
129
130
#endif VideoSettings_h
131
nGenEx
VideoSettings.h
Generated on Tue Jun 5 2012 20:46:42 for Starshatter_Open by
1.8.1