FIFE
2008.0
|
#include <renderbackendsdl.h>
Public Member Functions | |
const std::string & | getName () const |
void | startFrame () |
void | endFrame () |
void | init (const std::string &driver) |
void | clearBackBuffer () |
void | setLightingModel (unsigned int lighting) |
unsigned int | getLightingModel () const |
void | enableLighting () |
void | disableLighting () |
void | setLighting (float red, float green, float blue, float alpha) |
void | resetLighting () |
void | enableStencilTest () |
void | disableStencilTest () |
uint8_t | getStencilRef () const |
void | enableAlphaTest () |
void | disableAlphaTest () |
void | setAlphaTest (float ref_alpha) |
void | changeBlending (int scr, int dst) |
Image * | createMainScreen (const ScreenMode &mode, const std::string &title, const std::string &icon) |
Image * | setScreenMode (const ScreenMode &mode) |
Image * | createImage (const uint8_t *data, unsigned int width, unsigned int height) |
Image * | createImage (SDL_Surface *surface) |
![]() | |
RenderBackend (const SDL_Color &colorkey) | |
virtual | ~RenderBackend () |
virtual void | setStencilTest (Uint8 stencil_ref, unsigned int stencil_op, unsigned int stencil_func)=0 |
virtual void | resetStencilBuffer (Uint8 buffer)=0 |
virtual void | deinit () |
Image * | getScreenImage () const |
void | captureScreen (const std::string &filename) |
const ScreenMode & | getCurrentScreenMode () const |
void | setColorKeyEnabled (bool colorkeyenable) |
bool | isColorKeyEnabled () const |
void | setColorKey (const SDL_Color &colorkey) |
const SDL_Color & | getColorKey () const |
![]() | |
virtual SDL_Surface * | getSurface ()=0 |
virtual unsigned int | getWidth () const =0 |
virtual unsigned int | getHeight () const =0 |
virtual const Rect & | getArea ()=0 |
virtual bool | putPixel (int x, int y, int r, int g, int b, int a=255)=0 |
virtual void | drawLine (const Point &p1, const Point &p2, int r, int g, int b, int a=255)=0 |
virtual void | drawTriangle (const Point &p1, const Point &p2, const Point &p3, int r, int g, int b, int a=255)=0 |
virtual void | drawRectangle (const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
virtual void | fillRectangle (const Point &p, uint16_t w, uint16_t h, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255)=0 |
virtual void | drawQuad (const Point &p1, const Point &p2, const Point &p3, const Point &p4, int r, int g, int b, int a=255)=0 |
virtual void | drawVertex (const Point &p, const uint8_t size, int r, int g, int b, int a=255)=0 |
virtual void | drawLightPrimitive (const Point &p, uint8_t intensity, float radius, int subdivisions, float xstretch, float ystretch, uint8_t red, uint8_t green, uint8_t blue)=0 |
virtual void | getPixelRGBA (int x, int y, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)=0 |
virtual void | pushClipArea (const Rect &cliparea, bool clear=true)=0 |
virtual void | popClipArea ()=0 |
virtual const Rect & | getClipArea () const =0 |
virtual void | saveImage (const std::string &filename)=0 |
virtual void | setAlphaOptimizerEnabled (bool enabled)=0 |
virtual bool | isAlphaOptimizerEnabled ()=0 |
The main class of the SDL-based renderer.
Definition at line 43 of file renderbackendsdl.h.
|
virtual |
Change the Blendingmodel.
Implements FIFE::RenderBackend.
Definition at line 196 of file renderbackendsdl.cpp.
|
virtual |
Forces a clear of the backbuffer
Implements FIFE::RenderBackend.
Definition at line 71 of file renderbackendsdl.cpp.
|
virtual |
Creates an Image suitable for this renderbackend.
data | Pointer to the imagedata (needs to be in RGBA, 8 bits per channel). |
width | Width of the image. |
height | Height of the image. |
Implements FIFE::RenderBackend.
Definition at line 147 of file renderbackendsdl.cpp.
|
virtual |
Helper function to create images from SDL_Surfaces. Takes ownership over the surface.
surface | The surface to convert. |
Implements FIFE::RenderBackend.
Definition at line 143 of file renderbackendsdl.cpp.
|
virtual |
Creates the mainscreen (the display window).
mode | The ScreenMode to use. |
tite | The window title to use. |
icon | The window icon to use. |
Implements FIFE::RenderBackend.
Definition at line 81 of file renderbackendsdl.cpp.
References setScreenMode().
|
virtual |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 190 of file renderbackendsdl.cpp.
|
virtual |
Disable the lighting.
Implements FIFE::RenderBackend.
Definition at line 162 of file renderbackendsdl.cpp.
|
virtual |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 174 of file renderbackendsdl.cpp.
|
virtual |
Enable the alpha test.
Implements FIFE::RenderBackend.
Definition at line 187 of file renderbackendsdl.cpp.
|
virtual |
Enable the lighting.
Implements FIFE::RenderBackend.
Definition at line 159 of file renderbackendsdl.cpp.
|
virtual |
Enable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 171 of file renderbackendsdl.cpp.
|
virtual |
Called when a frame is finished and ready to be displayed.
Implements FIFE::RenderBackend.
Definition at line 139 of file renderbackendsdl.cpp.
|
virtual |
Gets the current light model.
Implements FIFE::RenderBackend.
Definition at line 155 of file renderbackendsdl.cpp.
|
virtual |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 52 of file renderbackendsdl.cpp.
|
virtual |
Return the reference value for the stencil test.
Implements FIFE::RenderBackend.
Definition at line 183 of file renderbackendsdl.cpp.
|
virtual |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 57 of file renderbackendsdl.cpp.
|
virtual |
Reset lighting with default values.
Implements FIFE::RenderBackend.
Definition at line 168 of file renderbackendsdl.cpp.
|
virtual |
Set reference for the alpha test.
Implements FIFE::RenderBackend.
Definition at line 193 of file renderbackendsdl.cpp.
|
virtual |
Set colors for lighting
Implements FIFE::RenderBackend.
Definition at line 165 of file renderbackendsdl.cpp.
|
virtual |
Initializes the light.
Implements FIFE::RenderBackend.
Definition at line 151 of file renderbackendsdl.cpp.
|
virtual |
Sets the mainscreen display mode.
mode | The ScreenMode to change the display to. |
Implements FIFE::RenderBackend.
Definition at line 96 of file renderbackendsdl.cpp.
Referenced by createMainScreen().
|
virtual |
Called when a new frame starts.
Implements FIFE::RenderBackend.
Definition at line 136 of file renderbackendsdl.cpp.