annotate engine/core/video/devicecaps.h @ 697:ecaa4d98f05f tip

Abstracted the GUI code and refactored the GUIChan-specific code into its own module. * Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring. * GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass. * The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class. * The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged. * Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author M. George Hansen <technopolitica@gmail.com>
date Sat, 18 Jun 2011 00:28:40 -1000
parents 01acc9fc35ea
children
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
646
07b1cf8e92b5 * Major improvements to fife_math.h and added corresponding Python bindings. Users now have access to FIFE's internal math functions. These functions are recommended to be used by all clients if required. Note: this may cause some problems with certain compilers. I hope this wont have to be reverted. TODO: remove the static constant globals somehow.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 643
diff changeset
54 bool operator <(const ScreenMode& rhs) const;
07b1cf8e92b5 * Major improvements to fife_math.h and added corresponding Python bindings. Users now have access to FIFE's internal math functions. These functions are recommended to be used by all clients if required. Note: this may cause some problems with certain compilers. I hope this wont have to be reverted. TODO: remove the static constant globals somehow.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 643
diff changeset
55
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
56 /** 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
57 * @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
58 * 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
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 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
61
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
62 /** 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
63 * @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
64 * 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
65 */
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
66 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
67
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
68 /** 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
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 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
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 /** 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
73 */
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
74 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
75
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
76 /** 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
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 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
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 /** 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
81 */
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
82 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
83
653
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
84 /** Is this screen mode an SDL only screen mode
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
85 */
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
86 bool isSDL() const { return (!(m_SDLFlags & SDL_OPENGL)) ? true : false; };
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
87
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
88 /** Returns true if this is a SDL screen mode with the SDL hardware surface enabled
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
89 */
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
90 bool isSDLHardwareSurface() const { return (m_SDLFlags & SDL_HWSURFACE) ? true : false; };
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
91
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
92
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
93 //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
94 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
95 //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
96 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
97 //SDL, windowed
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
98 static const uint32_t WINDOWED_SDL = 0;
653
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
99 //SDL, windowed, HW surface and double buffer
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
100 static const uint32_t WINDOWED_SDL_DB_HW = SDL_HWSURFACE | SDL_DOUBLEBUF;
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
101 //SDL, fullscreen
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
102 static const uint32_t FULLSCREEN_SDL = SDL_FULLSCREEN;
653
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
103 //SDL, fullscreen, HW surface and double buffer
01acc9fc35ea * Moved getCurrentScreenMode() to the renderbackend as renderbackend is what initializes the screen.
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 646
diff changeset
104 static const uint32_t FULLSCREEN_SDL_DB_HW = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF;
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
105
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
106 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
107 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
108 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
109 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
110 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
111
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 }; //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
113
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
114 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
115 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
116 /** 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
117 */
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
118 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
119
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
120 /** 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
121 */
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
122 ~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
123
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
124 /** 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
125 */
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
126 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
127
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
128 /** 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
129 */
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
130 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
131
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
132 /** 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
133 */
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
134 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
135
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
136 /** 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
137 */
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
138 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
139
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
140 /** 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
141 */
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
142 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
143
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
144 /** 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
145 */
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
146 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
147
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
148 /** 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
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 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
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 /** 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
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 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
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 /** 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
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 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
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 /** 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
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 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
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 /** 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
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 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
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 /** 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
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 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
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 /** 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
173 */
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
174 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
175
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
176 /** 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
177 */
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
178 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
179
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 /** 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
181 */
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 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
183
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 /** 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
185 */
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 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
187
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
188 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
189 std::vector<ScreenMode> m_screenModes;
636
f7863bfa92cd * Changed the way screen resolutions are detected
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 635
diff changeset
190 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
191 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
192
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
193 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
194 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
195 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
196 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
197 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
198 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
199 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
200 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
201 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
202
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
203 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
204
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
205 /** 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
206 */
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
207 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
208 }; //DeviceCaps
642
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
209 } //FIFE
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
210
6e2151325017 * Added the ability to query the current running screen mode
prock@33b003aa-7bff-0310-803a-e67f0ece8222
parents: 639
diff changeset
211
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
212
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
213 #endif //FIFE_DEVICECAPS_H