FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::DeviceCaps Class Reference

#include <devicecaps.h>

+ Collaboration diagram for FIFE::DeviceCaps:

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< ScreenModegetSupportedScreenModes () 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< ScreenModem_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
 

Detailed Description

Definition at line 114 of file devicecaps.h.

Constructor & Destructor Documentation

FIFE::DeviceCaps::DeviceCaps ( )

Constructor.

Definition at line 90 of file devicecaps.cpp.

References fillAvailableDrivers().

FIFE::DeviceCaps::~DeviceCaps ( )

Destructor.

Definition at line 109 of file devicecaps.cpp.

Member Function Documentation

void FIFE::DeviceCaps::fillAvailableDrivers ( )
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().

+ Here is the caller graph for this function:

std::vector<std::string> FIFE::DeviceCaps::getAvailableDrivers ( ) const
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().

+ Here is the caller graph for this function:

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.

std::string FIFE::DeviceCaps::getDriverName ( ) const
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().

+ Here is the caller graph for this function:

std::vector<ScreenMode> FIFE::DeviceCaps::getSupportedScreenModes ( ) const
inline

Returns a vector containing screen modes.

Definition at line 138 of file devicecaps.h.

References m_screenModes.

uint32_t FIFE::DeviceCaps::getVideoMemory ( ) const
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.

bool FIFE::DeviceCaps::isBlitFillAccel ( ) const
inline

Are color fills accelerated ?

Definition at line 182 of file devicecaps.h.

References m_BlitFillAccel.

bool FIFE::DeviceCaps::isHwAlphaBlitAccel ( ) const
inline

Are hardware to hardware alpha blits accelerated ?

Definition at line 166 of file devicecaps.h.

References m_hwToHwAlphaBlitAccel.

bool FIFE::DeviceCaps::isHwBlitAccel ( ) const
inline

Are hardware to hardware blits accelerated ?

Definition at line 158 of file devicecaps.h.

References m_hwBlitAccel.

bool FIFE::DeviceCaps::isHwColorkeyBlitAccel ( ) const
inline

Are hardware to hardware colorkey blits accelerated ?

Definition at line 162 of file devicecaps.h.

References m_hwCCBlitAccel.

bool FIFE::DeviceCaps::isHwSurfaceAvail ( ) const
inline

Is it possible to create hardware surfaces ?

Definition at line 150 of file devicecaps.h.

References m_hwAvailable.

bool FIFE::DeviceCaps::isSwToHwAlphaBlitAccel ( ) const
inline

Are software to hardware alpha blits accelerated ?

Definition at line 178 of file devicecaps.h.

References m_swToHwAlphaBlitAccel.

bool FIFE::DeviceCaps::isSwToHwBlitAccel ( ) const
inline

Are software to hardware blits accelerated ?

Definition at line 170 of file devicecaps.h.

References m_swToHwBlitAccel.

bool FIFE::DeviceCaps::isSwToHwColorkeyBlitAccel ( ) const
inline

Are software to hardware colorkey blits accelerated ?

Definition at line 174 of file devicecaps.h.

References m_swToHwCCBlistAccel.

bool FIFE::DeviceCaps::isWindowManagerAvail ( ) const
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().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<std::string> FIFE::DeviceCaps::m_availableDrivers
private

Definition at line 199 of file devicecaps.h.

Referenced by fillAvailableDrivers(), and getAvailableDrivers().

bool FIFE::DeviceCaps::m_BlitFillAccel
private

Definition at line 209 of file devicecaps.h.

Referenced by fillDeviceCaps(), isBlitFillAccel(), and reset().

int32_t FIFE::DeviceCaps::m_desktopHeight
private

Definition at line 213 of file devicecaps.h.

Referenced by fillDeviceCaps(), getDesktopHeight(), and reset().

int32_t FIFE::DeviceCaps::m_desktopWidth
private

Definition at line 212 of file devicecaps.h.

Referenced by fillDeviceCaps(), getDesktopWidth(), and reset().

std::string FIFE::DeviceCaps::m_driverName
private

Definition at line 198 of file devicecaps.h.

Referenced by fillDeviceCaps(), getDriverName(), and reset().

bool FIFE::DeviceCaps::m_hwAvailable
private

Definition at line 201 of file devicecaps.h.

Referenced by fillDeviceCaps(), isHwSurfaceAvail(), and reset().

bool FIFE::DeviceCaps::m_hwBlitAccel
private

Definition at line 203 of file devicecaps.h.

Referenced by fillDeviceCaps(), isHwBlitAccel(), and reset().

bool FIFE::DeviceCaps::m_hwCCBlitAccel
private

Definition at line 204 of file devicecaps.h.

Referenced by fillDeviceCaps(), isHwColorkeyBlitAccel(), and reset().

bool FIFE::DeviceCaps::m_hwToHwAlphaBlitAccel
private

Definition at line 205 of file devicecaps.h.

Referenced by fillDeviceCaps(), isHwAlphaBlitAccel(), and reset().

std::vector<ScreenMode> FIFE::DeviceCaps::m_screenModes
private

Definition at line 197 of file devicecaps.h.

Referenced by fillDeviceCaps(), getNearestScreenMode(), getSupportedScreenModes(), and reset().

bool FIFE::DeviceCaps::m_swToHwAlphaBlitAccel
private

Definition at line 208 of file devicecaps.h.

Referenced by fillDeviceCaps(), isSwToHwAlphaBlitAccel(), and reset().

bool FIFE::DeviceCaps::m_swToHwBlitAccel
private

Definition at line 206 of file devicecaps.h.

Referenced by fillDeviceCaps(), isSwToHwBlitAccel(), and reset().

bool FIFE::DeviceCaps::m_swToHwCCBlistAccel
private

Definition at line 207 of file devicecaps.h.

Referenced by fillDeviceCaps(), isSwToHwColorkeyBlitAccel(), and reset().

uint32_t FIFE::DeviceCaps::m_videoMem
private

Definition at line 211 of file devicecaps.h.

Referenced by fillDeviceCaps(), getVideoMemory(), and reset().

bool FIFE::DeviceCaps::m_wmAvailable
private

Definition at line 202 of file devicecaps.h.

Referenced by fillDeviceCaps(), isWindowManagerAvail(), and reset().


The documentation for this class was generated from the following files: