1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #if !defined(AFX_DISPLAY_DLG_H__1287701D_07D1_48F0_8F13_3FCE937DA3A2__INCLUDED_)
18 #define AFX_DISPLAY_DLG_H__1287701D_07D1_48F0_8F13_3FCE937DA3A2__INCLUDED_
22 #endif // _MSC_VER > 1000
23 // display_dlg.h : header file
26 #include "base_dialog.h"
29 // ***************************************************************************
31 // ***************************************************************************
33 class CDisplayDlg
: public CBaseDialog
37 CDisplayDlg(CWnd
* pParent
= NULL
); // standard constructor
38 enum TDriverChoiceMode
{ DrvChooseAuto
= 0, DrvChooseOpenGL
, DrvChooseDirect3D
, DrvChooseUnknwown
= -1 };
39 enum TDriver
{ OpenGL
= 0, Direct3D
};
41 //{{AFX_DATA(CDisplayDlg)
42 enum { IDD
= IDD_DISPLAY
};
53 int DriverChoiceMode
; // one of the TDriverChoiceMode values
65 /** Get the selected driver (if Driver is in mode Auto, choose the best driver depending on the hardware)
66 * \return 0 for D3D & 1 for OpenGL
68 TDriver
getActualDriver() const;
71 // ClassWizard generated virtual function overrides
72 //{{AFX_VIRTUAL(CDisplayDlg)
74 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
80 // Generated message map functions
81 //{{AFX_MSG(CDisplayDlg)
82 afx_msg
void OnFullscreen();
83 afx_msg
void OnWindow();
84 virtual BOOL
OnInitDialog();
85 afx_msg
void OnDirect3d();
86 afx_msg
void OnDrv3DAuto();
87 afx_msg
void OnChangeHeight();
88 afx_msg
void OnOpengl();
89 afx_msg
void OnChangePositionX();
90 afx_msg
void OnChangeWidth();
91 afx_msg
void OnChangePositionY();
92 afx_msg
void OnColorDepth32();
93 afx_msg
void OnSelchangeMode();
98 // ***************************************************************************
105 uint ColorDepth
; // 32 only
109 bool operator== (const CVideoMode
&other
) const
111 return (Width
== other
.Width
) && (Height
== other
.Height
) && (ColorDepth
== other
.ColorDepth
) && (Frequency
== other
.Frequency
);
113 bool operator< (const CVideoMode
&other
) const
115 if (Width
< other
.Width
) return true;
116 else if (Width
> other
.Width
) return false;
117 else if (Height
< other
.Height
) return true;
118 else if (Height
> other
.Height
) return false;
119 else if (ColorDepth
< other
.ColorDepth
) return true;
120 else if (ColorDepth
> other
.ColorDepth
) return false;
121 else if (Frequency
< other
.Frequency
) return true;
126 // ***************************************************************************
134 // ***************************************************************************
136 extern std::vector
<CVideoMode
> VideoModes
[2];
137 extern std::vector
<std::string
> GLExtensions
;
138 extern std::string GLRenderer
;
139 extern std::string GLVendor
;
140 extern std::string GLVersion
;
141 extern std::string D3DDescription
;
142 extern std::string D3DDeviceName
;
143 extern std::string D3DDriver
;
144 extern std::string D3DDriverVersion
;
145 extern std::string D3DVendor
;
146 extern uint VideoMemory
;
147 extern uint HardwareSoundBuffer
;
148 extern uint64 SystemMemory
;
149 extern uint CPUFrequency
;
151 // ***************************************************************************
153 // Register video modes
154 void RegisterVideoModes (uint mode
, NL3D::IDriver
*driver
);
156 // Get opengl information
157 bool GetSystemInformation (NL3D::IDriver
*d3dDriver
);
159 // ***************************************************************************
161 //{{AFX_INSERT_LOCATION}}
162 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
164 #endif // !defined(AFX_DISPLAY_DLG_H__1287701D_07D1_48F0_8F13_3FCE937DA3A2__INCLUDED_)