22 #ifndef FIFE_VIDEO_RENDERBACKEND_H
23 #define FIFE_VIDEO_RENDERBACKEND_H
30 #include "util/base/fife_stdint.h"
34 #include <SDL_video.h>
40 #include "util/base/singleton.h"
41 #include "util/structures/point.h"
42 #include "util/structures/rect.h"
43 #include "video/devicecaps.h"
66 virtual const std::string&
getName()
const = 0;
78 virtual void init(
const std::string& driver) = 0;
102 virtual void setLighting(
float red,
float green,
float blue,
float alpha) = 0;
118 virtual void setStencilTest(Uint8 stencil_ref,
unsigned int stencil_op,
unsigned int stencil_func) = 0;
154 virtual Image*
createMainScreen(
const ScreenMode& mode,
const std::string& title,
const std::string& icon) = 0;
168 virtual Image*
createImage(
const uint8_t* data,
unsigned int width,
unsigned int height) = 0;
186 SDL_Surface* getSurface();
193 unsigned int getWidth()
const;
194 unsigned int getHeight()
const;
195 unsigned int getScreenWidth()
const {
return getWidth(); }
196 unsigned int getScreenHeight()
const {
return getHeight(); }
197 const Rect& getArea();
198 void getPixelRGBA(
int x,
int y, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a);
199 void pushClipArea(
const Rect& cliparea,
bool clear=
true);
201 const Rect& getClipArea()
const;
202 void setAlphaOptimizerEnabled(
bool enabled);
203 bool isAlphaOptimizerEnabled();
204 void saveImage(
const std::string& filename);
224 bool m_isalphaoptimized;
225 unsigned int m_chunkingsize;
226 bool m_iscolorkeyenabled;
227 SDL_Color m_colorkey;
228 ScreenMode m_screenMode;