annotate engine/core/video/devicecaps.h @ 643:edf6dcfe8cd4

* Modified the way we detect valid resolutions because SDL_VideoModeOK() was unreliable on a Mac when passed values returned from SDL_ListModes(). It now uses a pre-canned list of common resolutions to check.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 09 Oct 2010 17:00:33 +0000
parents 6e2151325017
children 07b1cf8e92b5
rev   line source
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
1 /***************************************************************************
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
2 * Copyright (C) 2005-2010 by the FIFE team *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
3 * http://www.fifengine.net *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
4 * This file is part of FIFE. *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
5 * *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
6 * FIFE is free software; you can redistribute it and/or *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
8 * License as published by the Free Software Foundation; either *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version. *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
10 * *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
11 * This library is distributed in the hope that it will be useful, *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
14 * Lesser General Public License for more details. *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
15 * *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
17 * License along with this library; if not, write to the *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
18 * Free Software Foundation, Inc., *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
20 ***************************************************************************/
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
21
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
22 #ifndef FIFE_DEVICECAPS_H
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
23 #define FIFE_DEVICECAPS_H
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
24
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
25 // Standard C++ library includes
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
26 #include <string>
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
27 #include <vector>
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
28
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
29 // Platform specific includes
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
30
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
31 // 3rd party library includes
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
32
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
33 // FIFE includes
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
34 // These includes are split up in two parts, separated by one empty line
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
35 // First block: files included from the FIFE root src directory
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
36 // Second block: files included from the same folder
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
37
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
38 namespace FIFE {
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
39
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
40 class ScreenMode {
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
41 public:
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
42 /** Default Constructor
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
43 * @note You shouldn't construct these objects yourself. This default
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
44 * constructor was provided because swig complained that was none.
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
45 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
46 ScreenMode();
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
47 ScreenMode(uint16_t width, uint16_t height, uint16_t bpp, uint32_t SDLFlags);
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
48 ScreenMode(const ScreenMode& rhs);
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
49
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
50 /** Destructor.
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
51 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
52 ~ScreenMode() {};
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
53
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
54 /** Returns the width of the screen mode.
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
55 * @note If both width and height are 0 it means that ALL modes are available
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
56 * for use with the specified flags. Most likely this is a windowed mode.
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
57 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
58 uint16_t getWidth() const { return m_width; };
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
59
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
60 /** Returns the height of the screen mode.
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
61 * @note If both width and height are 0 it means that ALL modes are available
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
62 * for use with the specified flags. Most likely this is a windowed mode.
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
63 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
64 uint16_t getHeight() const { return m_height; };
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
65
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
66 /** Returns the number of bits per pixel this mode uses.
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
67 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
68 uint16_t getBPP() const { return m_bpp; };
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
69
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
70 /** Returns the SDL flags used when testing this mode.
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
71 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
72 uint32_t getSDLFlags() const { return m_SDLFlags; };
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
73
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
74 /** True if this is a fullscreen mode. False if it is a windowed mode.
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
75 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
76 bool isFullScreen() const { return (m_SDLFlags & SDL_FULLSCREEN) ? true : false;};
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
77
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
78 /** True if this mode uses the OpenGL renderer. False otherwise.
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
79 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
80 bool isOpenGL() const { return (m_SDLFlags & SDL_OPENGL) ? true : false; };
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
81
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
82
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
83 //OpenGL, windowed, hw accel
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
84 static const uint32_t HW_WINDOWED_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL;
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
85 //OpenGL, fullscreen, hw accel
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
86 static const uint32_t HW_FULLSCREEN_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN;
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
87 //SDL, windowed
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
88 static const uint32_t WINDOWED_SDL = 0;
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
89 //SDL, fullscreen
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
90 static const uint32_t FULLSCREEN_SDL = SDL_FULLSCREEN;
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
91
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
92 private:
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
93 uint16_t m_width;
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
94 uint16_t m_height;
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
95 uint16_t m_bpp;
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
96 uint32_t m_SDLFlags;
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
97
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
98 }; //ScreenMode
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
99
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
100 class DeviceCaps {
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
101 public:
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
102 /** Constructor.
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
103 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
104 DeviceCaps();
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
105
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
106 /** Destructor.
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
107 */
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
108 ~DeviceCaps();
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
109
639
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
110 /** Should be called AFTER SDL_Init() has been called
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
111 */
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
112 void fillDeviceCaps();
639
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
113
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
114 /** Clears all information gathered for the device
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
115 */
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
116 void reset();
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
117
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
118 /** Gets the available graphics drivers for your operating system
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
119 */
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
120 std::vector<std::string> getAvailableDrivers() const { return m_availableDrivers; };
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
121
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
122 /** Returns a vector containing screen modes.
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
123 */
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
124 std::vector<ScreenMode> getSupportedScreenModes() const { return m_screenModes; };
637
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
125
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
126 /** Gets the nearest valid screen mode based on the arguments passed
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
127 */
643
edf6dcfe8cd4 * Modified the way we detect valid resolutions because SDL_VideoModeOK() was unreliable on a Mac when passed values returned from SDL_ListModes(). It now uses a pre-canned list of common resolutions to check.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 642
diff changeset
128 ScreenMode getNearestScreenMode(uint16_t width, uint16_t height, uint16_t bpp, const std::string& renderer, bool fs) const;
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
129
637
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
130 /** Returns the name of the current video driver.
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
131 */
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
132 std::string getDriverName() const { return m_driverName; };
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
133
637
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
134 /** Is it possible to create hardware surfaces ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
135 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
136 bool isHwSurfaceAvail() const { return m_hwAvailable; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
137
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
138 /** Is there a window manager available ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
139 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
140 bool isWindowManagerAvail() const { return m_wmAvailable;} ;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
141
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
142 /** Are hardware to hardware blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
143 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
144 bool isHwBlitAccel() const { return m_hwBlitAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
145
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
146 /** Are hardware to hardware colorkey blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
147 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
148 bool isHwColorkeyBlitAccel() const { return m_hwCCBlitAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
149
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
150 /** Are hardware to hardware alpha blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
151 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
152 bool isHwAlphaBlitAccel() const { return m_hwToHwAlphaBlitAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
153
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
154 /** Are software to hardware blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
155 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
156 bool isSwToHwBlitAccel() const { return m_swToHwBlitAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
157
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
158 /** Are software to hardware colorkey blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
159 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
160 bool isSwToHwColorkeyBlitAccel() const { return m_swToHwCCBlistAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
161
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
162 /** Are software to hardware alpha blits accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
163 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
164 bool isSwToHwAlphaBlitAccel() const { return m_swToHwAlphaBlitAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
165
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
166 /** Are color fills accelerated ?
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
167 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
168 bool isBlitFillAccel() const { return m_BlitFillAccel; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
169
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
170 /** Total amount of video memory in Kilobytes, only valid if hardware sufaces are available.
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
171 */
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
172 uint32_t getVideoMemory() const { return m_videoMem; };
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
173
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
174 private:
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
175 std::vector<ScreenMode> m_screenModes;
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
176 std::string m_driverName;
639
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
177 std::vector<std::string> m_availableDrivers;
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
178
637
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
179 bool m_hwAvailable;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
180 bool m_wmAvailable;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
181 bool m_hwBlitAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
182 bool m_hwCCBlitAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
183 bool m_hwToHwAlphaBlitAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
184 bool m_swToHwBlitAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
185 bool m_swToHwCCBlistAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
186 bool m_swToHwAlphaBlitAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
187 bool m_BlitFillAccel;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
188
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
189 uint32_t m_videoMem;
3822b30fd98c * Added the ability to query some more details from the video device including the total video memory available.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 636
diff changeset
190
639
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
191 /** Called in the constructor. No need for anyone to call this
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
192 */
685d250f2c2d * Improvements for DeviceCaps. It now stores a list of valid SDL drivers. Currently in windows we are limited to the windows GDI (which is slow). This could mean that SDL users could benifit from hardware acceleration with directx (a valid SDL driver).
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 637
diff changeset
193 void fillAvailableDrivers();
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
194 }; //DeviceCaps
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
195 } //FIFE
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
196
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
197
635
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
198
3094988564d5 * Added a simple method to query the default video card capabilities. This is still a work in progress. You can now get a list of ScreenModes the device supports. ScreenMode includes information on the screen resolution, if the mode is fullscreen/windowed and if it would use the OpenGL or SDL renderer.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents:
diff changeset
199 #endif //FIFE_DEVICECAPS_H