37 m_compressimages(false),
38 m_useframebuffer(false),
40 m_isalphaoptimized(false),
41 m_iscolorkeyenabled(false),
43 m_isframelimit(false),
58 SDL_QuitSubSystem(SDL_INIT_VIDEO);
72 if (frame_time < frame_limit) {
73 SDL_Delay(static_cast<Uint32>(frame_limit) - frame_time);
virtual void setClipArea(const Rect &cliparea, bool clear)=0
Sets given clip area into image.
RenderBackend(const SDL_Color &colorkey)
Constructor.
void setColorKey(const SDL_Color &colorkey)
Sets the global colorkey to use for images.
SDL_PixelFormat m_rgba_format
void setBackgroundColor(uint8_t r, uint8_t g, uint8_t b)
Set the background color.
uint32_t getHeight() const
bool isFrameLimitEnabled() const
Gets whether the frame limiter is in use.
void setColorKeyEnabled(bool colorkeyenable)
Sets whether to use the colorkey feature.
uint16_t getFrameLimit() const
Gets the frame limit.
void resetBackgroundColor()
Reset the background color to black.
bool isColorKeyEnabled() const
Gets whether the colorkey feature is in use.
void pushClipArea(const Rect &cliparea, bool clear=true)
Pushes clip area to clip stack Clip areas define which area is drawn on screen.
const SDL_Color & getColorKey() const
Gets the global colorkey setting.
virtual void startFrame()
Called when a new frame starts.
void setFrameLimit(uint16_t framelimit)
Sets the frame limit.
virtual ~RenderBackend()
Destructor.
void popClipArea()
Pops clip area from clip stack.
SDL_Color m_backgroundcolor
uint32_t getWidth() const
virtual void endFrame()
Called when a frame is finished and ready to be displayed.
void clearClipArea()
Clears any possible clip areas.
void setFrameLimitEnabled(bool limited)
Sets whether to use the frame limiter.
SDL_Surface * getRenderTargetSurface()
Returns currently attached render surface.
const SDL_PixelFormat & getPixelFormat() const
Gets the current screen rgba format.
const Rect & getClipArea() const
Gets the current clip area.
void deinit()
Performs cleanup actions.
std::stack< ClipInfo > m_clipstack
const ScreenMode & getCurrentScreenMode() const
Get current screen mode.
const Rect & getArea() const