Pyrogenesis  trunk
gfx.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 Wildfire Games
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining
4  * a copy of this software and associated documentation files (the
5  * "Software"), to deal in the Software without restriction, including
6  * without limitation the rights to use, copy, modify, merge, publish,
7  * distribute, sublicense, and/or sell copies of the Software, and to
8  * permit persons to whom the Software is furnished to do so, subject to
9  * the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included
12  * in all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 /*
24  * graphics card detection.
25  */
26 
27 #ifndef INCLUDED_GFX
28 #define INCLUDED_GFX
29 
30 namespace gfx {
31 
32 /**
33  * @return description of graphics card,
34 * or L"" if unknown.
35  **/
36 LIB_API std::wstring CardName();
37 
38 /**
39  * @return string describing the graphics driver and its version,
40  * or L"" if unknown.
41  **/
42 LIB_API std::wstring DriverInfo();
43 
44 /**
45  * not implemented
46  **/
47 LIB_API size_t MemorySizeMiB();
48 
49 /**
50  * (useful for choosing a new video mode)
51  *
52  * @param xres, yres (optional out) resolution [pixels]
53  * @param bpp (optional out) bits per pixel
54  * @param freq (optional out) vertical refresh rate [Hz]
55  * @return Status (if negative, outputs were left unchanged)
56  **/
57 LIB_API Status GetVideoMode(int* xres, int* yres, int* bpp, int* freq);
58 
59 /**
60  * (useful for determining aspect ratio)
61  *
62  * @param width_mm (out) screen width [mm]
63  * @param height_mm (out) screen height [mm]
64  * @return Status (if if negative, outputs were left unchanged)
65  **/
66 LIB_API Status GetMonitorSize(int& width_mm, int& height_mm);
67 
68 } // namespace gfx
69 
70 #endif // #ifndef INCLUDED_GFX
size_t MemorySizeMiB()
not implemented
Definition: gfx.cpp:92
Definition: gfx.cpp:38
LIB_API Status GetVideoMode(int *xres, int *yres, int *bpp, int *freq)
(useful for choosing a new video mode)
Definition: android.cpp:47
std::wstring CardName()
Definition: gfx.cpp:40
std::wstring DriverInfo()
Definition: gfx.cpp:69
i64 Status
Error handling system.
Definition: status.h:171
LIB_API Status GetMonitorSize(int &width_mm, int &height_mm)
(useful for determining aspect ratio)
Definition: osx.cpp:144