FIFE
|
#include <devicecaps.h>
Public Member Functions | |
DeviceCaps () | |
Constructor. More... | |
~DeviceCaps () | |
Destructor. More... | |
void | fillDeviceCaps () |
Should be called AFTER SDL_Init() has been called. More... | |
void | reset () |
Clears all information gathered for the device. More... | |
std::vector< std::string > | getAvailableDrivers () const |
Gets the available graphics drivers for your operating system. More... | |
std::vector< ScreenMode > | getSupportedScreenModes () const |
Returns a vector containing screen modes. More... | |
ScreenMode | getNearestScreenMode (uint16_t width, uint16_t height, uint16_t bpp, const std::string &renderer, bool fs) const |
Gets the nearest valid screen mode based on the arguments passed. More... | |
std::string | getDriverName () const |
Returns the name of the current video driver. More... | |
bool | isHwSurfaceAvail () const |
Is it possible to create hardware surfaces ? More... | |
bool | isWindowManagerAvail () const |
Is there a window manager available ? More... | |
bool | isHwBlitAccel () const |
Are hardware to hardware blits accelerated ? More... | |
bool | isHwColorkeyBlitAccel () const |
Are hardware to hardware colorkey blits accelerated ? More... | |
bool | isHwAlphaBlitAccel () const |
Are hardware to hardware alpha blits accelerated ? More... | |
bool | isSwToHwBlitAccel () const |
Are software to hardware blits accelerated ? More... | |
bool | isSwToHwColorkeyBlitAccel () const |
Are software to hardware colorkey blits accelerated ? More... | |
bool | isSwToHwAlphaBlitAccel () const |
Are software to hardware alpha blits accelerated ? More... | |
bool | isBlitFillAccel () const |
Are color fills accelerated ? More... | |
uint32_t | getVideoMemory () const |
Total amount of video memory in Kilobytes, only valid if hardware sufaces are available. More... | |
int32_t | getDesktopWidth () const |
Returns the width of the desktop resolution. More... | |
int32_t | getDesktopHeight () const |
Returns the height of the desktop resolution. More... | |
Private Member Functions | |
void | fillAvailableDrivers () |
Called in the constructor. More... | |
Private Attributes | |
std::vector< ScreenMode > | m_screenModes |
std::string | m_driverName |
std::vector< std::string > | m_availableDrivers |
bool | m_hwAvailable |
bool | m_wmAvailable |
bool | m_hwBlitAccel |
bool | m_hwCCBlitAccel |
bool | m_hwToHwAlphaBlitAccel |
bool | m_swToHwBlitAccel |
bool | m_swToHwCCBlistAccel |
bool | m_swToHwAlphaBlitAccel |
bool | m_BlitFillAccel |
uint32_t | m_videoMem |
int32_t | m_desktopWidth |
int32_t | m_desktopHeight |
Definition at line 114 of file devicecaps.h.
FIFE::DeviceCaps::DeviceCaps | ( | ) |
FIFE::DeviceCaps::~DeviceCaps | ( | ) |
Destructor.
Definition at line 109 of file devicecaps.cpp.
|
private |
Called in the constructor.
No need for anyone to call this
Definition at line 130 of file devicecaps.cpp.
References m_availableDrivers.
Referenced by DeviceCaps().
void FIFE::DeviceCaps::fillDeviceCaps | ( | ) |
Should be called AFTER SDL_Init() has been called.
Definition at line 154 of file devicecaps.cpp.
References FIFE::ScreenMode::FULLSCREEN_SDL, FIFE::ScreenMode::FULLSCREEN_SDL_DB_HW, FIFE::ScreenMode::HW_FULLSCREEN_OPENGL, FIFE::ScreenMode::HW_WINDOWED_OPENGL, m_BlitFillAccel, m_desktopHeight, m_desktopWidth, m_driverName, m_hwAvailable, m_hwBlitAccel, m_hwCCBlitAccel, m_hwToHwAlphaBlitAccel, m_screenModes, m_swToHwAlphaBlitAccel, m_swToHwBlitAccel, m_swToHwCCBlistAccel, m_videoMem, m_wmAvailable, reset(), FIFE::ScreenMode::WINDOWED_SDL, and FIFE::ScreenMode::WINDOWED_SDL_DB_HW.
Referenced by FIFE::Engine::init().
|
inline |
Gets the available graphics drivers for your operating system.
Definition at line 134 of file devicecaps.h.
References m_availableDrivers.
Referenced by FIFE::Engine::init().
int32_t FIFE::DeviceCaps::getDesktopHeight | ( | ) | const |
Returns the height of the desktop resolution.
Definition at line 353 of file devicecaps.cpp.
References m_desktopHeight.
int32_t FIFE::DeviceCaps::getDesktopWidth | ( | ) | const |
Returns the width of the desktop resolution.
Definition at line 349 of file devicecaps.cpp.
References m_desktopWidth.
|
inline |
Returns the name of the current video driver.
Definition at line 146 of file devicecaps.h.
References m_driverName.
ScreenMode FIFE::DeviceCaps::getNearestScreenMode | ( | uint16_t | width, |
uint16_t | height, | ||
uint16_t | bpp, | ||
const std::string & | renderer, | ||
bool | fs | ||
) | const |
Gets the nearest valid screen mode based on the arguments passed.
Definition at line 277 of file devicecaps.cpp.
References m_screenModes.
Referenced by FIFE::Engine::init().
|
inline |
Returns a vector containing screen modes.
Definition at line 138 of file devicecaps.h.
References m_screenModes.
|
inline |
Total amount of video memory in Kilobytes, only valid if hardware sufaces are available.
Definition at line 186 of file devicecaps.h.
References m_videoMem.
|
inline |
Are color fills accelerated ?
Definition at line 182 of file devicecaps.h.
References m_BlitFillAccel.
|
inline |
Are hardware to hardware alpha blits accelerated ?
Definition at line 166 of file devicecaps.h.
References m_hwToHwAlphaBlitAccel.
|
inline |
Are hardware to hardware blits accelerated ?
Definition at line 158 of file devicecaps.h.
References m_hwBlitAccel.
|
inline |
Are hardware to hardware colorkey blits accelerated ?
Definition at line 162 of file devicecaps.h.
References m_hwCCBlitAccel.
|
inline |
Is it possible to create hardware surfaces ?
Definition at line 150 of file devicecaps.h.
References m_hwAvailable.
|
inline |
Are software to hardware alpha blits accelerated ?
Definition at line 178 of file devicecaps.h.
References m_swToHwAlphaBlitAccel.
|
inline |
Are software to hardware blits accelerated ?
Definition at line 170 of file devicecaps.h.
References m_swToHwBlitAccel.
|
inline |
Are software to hardware colorkey blits accelerated ?
Definition at line 174 of file devicecaps.h.
References m_swToHwCCBlistAccel.
|
inline |
Is there a window manager available ?
Definition at line 154 of file devicecaps.h.
References m_wmAvailable.
void FIFE::DeviceCaps::reset | ( | ) |
Clears all information gathered for the device.
Definition at line 112 of file devicecaps.cpp.
References m_BlitFillAccel, m_desktopHeight, m_desktopWidth, m_driverName, m_hwAvailable, m_hwBlitAccel, m_hwCCBlitAccel, m_hwToHwAlphaBlitAccel, m_screenModes, m_swToHwAlphaBlitAccel, m_swToHwBlitAccel, m_swToHwCCBlistAccel, m_videoMem, and m_wmAvailable.
Referenced by fillDeviceCaps().
|
private |
Definition at line 199 of file devicecaps.h.
Referenced by fillAvailableDrivers(), and getAvailableDrivers().
|
private |
Definition at line 209 of file devicecaps.h.
Referenced by fillDeviceCaps(), isBlitFillAccel(), and reset().
|
private |
Definition at line 213 of file devicecaps.h.
Referenced by fillDeviceCaps(), getDesktopHeight(), and reset().
|
private |
Definition at line 212 of file devicecaps.h.
Referenced by fillDeviceCaps(), getDesktopWidth(), and reset().
|
private |
Definition at line 198 of file devicecaps.h.
Referenced by fillDeviceCaps(), getDriverName(), and reset().
|
private |
Definition at line 201 of file devicecaps.h.
Referenced by fillDeviceCaps(), isHwSurfaceAvail(), and reset().
|
private |
Definition at line 203 of file devicecaps.h.
Referenced by fillDeviceCaps(), isHwBlitAccel(), and reset().
|
private |
Definition at line 204 of file devicecaps.h.
Referenced by fillDeviceCaps(), isHwColorkeyBlitAccel(), and reset().
|
private |
Definition at line 205 of file devicecaps.h.
Referenced by fillDeviceCaps(), isHwAlphaBlitAccel(), and reset().
|
private |
Definition at line 197 of file devicecaps.h.
Referenced by fillDeviceCaps(), getNearestScreenMode(), getSupportedScreenModes(), and reset().
|
private |
Definition at line 208 of file devicecaps.h.
Referenced by fillDeviceCaps(), isSwToHwAlphaBlitAccel(), and reset().
|
private |
Definition at line 206 of file devicecaps.h.
Referenced by fillDeviceCaps(), isSwToHwBlitAccel(), and reset().
|
private |
Definition at line 207 of file devicecaps.h.
Referenced by fillDeviceCaps(), isSwToHwColorkeyBlitAccel(), and reset().
|
private |
Definition at line 211 of file devicecaps.h.
Referenced by fillDeviceCaps(), getVideoMemory(), and reset().
|
private |
Definition at line 202 of file devicecaps.h.
Referenced by fillDeviceCaps(), isWindowManagerAvail(), and reset().