22 #ifndef FIFE_DEVICECAPS_H
23 #define FIFE_DEVICECAPS_H
47 ScreenMode(uint16_t width, uint16_t height, uint16_t bpp, uint32_t SDLFlags);
48 ScreenMode(
const ScreenMode& rhs);
60 uint16_t getWidth()
const {
return m_width; };
66 uint16_t getHeight()
const {
return m_height; };
70 uint16_t getBPP()
const {
return m_bpp; };
74 uint32_t getSDLFlags()
const {
return m_SDLFlags; };
78 bool isFullScreen()
const {
return (m_SDLFlags & SDL_FULLSCREEN) ?
true :
false;};
82 bool isOpenGL()
const {
return (m_SDLFlags & SDL_OPENGL) ?
true :
false; };
86 bool isSDL()
const {
return (!(m_SDLFlags & SDL_OPENGL)) ?
true :
false; };
90 bool isSDLHardwareSurface()
const {
return (m_SDLFlags & SDL_HWSURFACE) ?
true :
false; };
94 static const uint32_t HW_WINDOWED_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL;
96 static const uint32_t HW_FULLSCREEN_OPENGL = SDL_OPENGL | SDL_HWPALETTE | SDL_HWACCEL | SDL_FULLSCREEN;
98 static const uint32_t WINDOWED_SDL = 0;
100 static const uint32_t WINDOWED_SDL_DB_HW = SDL_HWSURFACE | SDL_DOUBLEBUF;
102 static const uint32_t FULLSCREEN_SDL = SDL_FULLSCREEN;
104 static const uint32_t FULLSCREEN_SDL_DB_HW = SDL_FULLSCREEN | SDL_HWSURFACE | SDL_DOUBLEBUF;
126 void fillDeviceCaps();
134 std::vector<std::string> getAvailableDrivers()
const {
return m_availableDrivers; };
138 std::vector<ScreenMode> getSupportedScreenModes()
const {
return m_screenModes; };
142 ScreenMode getNearestScreenMode(uint16_t width, uint16_t height, uint16_t bpp,
const std::string& renderer,
bool fs)
const;
146 std::string getDriverName()
const {
return m_driverName; };
150 bool isHwSurfaceAvail()
const {
return m_hwAvailable; };
154 bool isWindowManagerAvail()
const {
return m_wmAvailable;} ;
158 bool isHwBlitAccel()
const {
return m_hwBlitAccel; };
162 bool isHwColorkeyBlitAccel()
const {
return m_hwCCBlitAccel; };
166 bool isHwAlphaBlitAccel()
const {
return m_hwToHwAlphaBlitAccel; };
170 bool isSwToHwBlitAccel()
const {
return m_swToHwBlitAccel; };
174 bool isSwToHwColorkeyBlitAccel()
const {
return m_swToHwCCBlistAccel; };
178 bool isSwToHwAlphaBlitAccel()
const {
return m_swToHwAlphaBlitAccel; };
182 bool isBlitFillAccel()
const {
return m_BlitFillAccel; };
186 uint32_t getVideoMemory()
const {
return m_videoMem; };
189 std::vector<ScreenMode> m_screenModes;
190 std::string m_driverName;
191 std::vector<std::string> m_availableDrivers;
196 bool m_hwCCBlitAccel;
197 bool m_hwToHwAlphaBlitAccel;
198 bool m_swToHwBlitAccel;
199 bool m_swToHwCCBlistAccel;
200 bool m_swToHwAlphaBlitAccel;
201 bool m_BlitFillAccel;
207 void fillAvailableDrivers();
213 #endif //FIFE_DEVICECAPS_H
bool operator<(SharedPtr< T > const &lhs, SharedPtr< U > const &rhs)