37 m_compressimages(false),
38 m_useframebuffer(false),
40 m_isalphaoptimized(false),
41 m_iscolorkeyenabled(false),
43 m_isMipmapping(false),
47 m_isDepthBuffer(false),
49 m_isframelimit(false),
65 SDL_QuitSubSystem(SDL_INIT_VIDEO);
79 if (frame_time < frame_limit) {
80 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.
void setMonochromeEnabled(bool enabled)
Enables or disables monochrome rendering.
TextureFiltering getTextureFiltering() const
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.
int32_t getMaxAnisotropy() const
Gets max antisotropy for antisotropic filtering.
void setColorKeyEnabled(bool colorkeyenable)
Sets whether to use the colorkey feature.
uint16_t getFrameLimit() const
Gets the frame limit.
bool isMipmappingEnabled() const
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 setMipmappingEnabled(bool enabled)
Enables or disables the usage of mipmapping.
void setAlphaTestValue(float alpha)
Sets the value for alpha test.
void setFrameLimit(uint16_t framelimit)
Sets the frame limit.
virtual ~RenderBackend()
Destructor.
void setTextureFiltering(TextureFiltering filter)
Sets the texture filtering method.
void popClipArea()
Pops clip area from clip stack.
void setDepthBufferEnabled(bool enabled)
Enables or disables depth buffer rendering.
SDL_Color m_backgroundcolor
bool isMonochromeEnabled() const
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.
TextureFiltering m_textureFilter
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
float getAlphaTestValue() const
bool isDepthBufferEnabled() const
const ScreenMode & getCurrentScreenMode() const
Get current screen mode.
const Rect & getArea() const