FIFE
2008.0
|
#include <renderbackendopengl.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 OpenGL-based renderer.
Definition at line 42 of file renderbackendopengl.h.
|
virtual |
Change the Blendingmodel.
Implements FIFE::RenderBackend.
Definition at line 345 of file renderbackendopengl.cpp.
|
virtual |
Forces a clear of the backbuffer
Implements FIFE::RenderBackend.
Definition at line 85 of file renderbackendopengl.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 201 of file renderbackendopengl.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 170 of file renderbackendopengl.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 90 of file renderbackendopengl.cpp.
References setScreenMode().
|
virtual |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 333 of file renderbackendopengl.cpp.
|
virtual |
Disable the lighting.
Implements FIFE::RenderBackend.
Definition at line 231 of file renderbackendopengl.cpp.
Referenced by setLightingModel().
|
virtual |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 270 of file renderbackendopengl.cpp.
Referenced by resetLighting().
|
virtual |
Enable the alpha test.
Implements FIFE::RenderBackend.
Definition at line 326 of file renderbackendopengl.cpp.
Referenced by setAlphaTest().
|
virtual |
Enable the lighting.
Implements FIFE::RenderBackend.
Definition at line 224 of file renderbackendopengl.cpp.
Referenced by setLightingModel().
|
virtual |
Enable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 263 of file renderbackendopengl.cpp.
|
virtual |
Called when a frame is finished and ready to be displayed.
Implements FIFE::RenderBackend.
Definition at line 166 of file renderbackendopengl.cpp.
|
virtual |
Gets the current light model.
Implements FIFE::RenderBackend.
Definition at line 220 of file renderbackendopengl.cpp.
|
virtual |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 62 of file renderbackendopengl.cpp.
|
virtual |
Return the reference value for the stencil test.
Implements FIFE::RenderBackend.
Definition at line 322 of file renderbackendopengl.cpp.
|
virtual |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 71 of file renderbackendopengl.cpp.
|
virtual |
Reset lighting with default values.
Implements FIFE::RenderBackend.
Definition at line 250 of file renderbackendopengl.cpp.
References disableStencilTest(), and setLighting().
|
virtual |
Set reference for the alpha test.
Implements FIFE::RenderBackend.
Definition at line 340 of file renderbackendopengl.cpp.
References enableAlphaTest().
|
virtual |
Set colors for lighting
Implements FIFE::RenderBackend.
Definition at line 238 of file renderbackendopengl.cpp.
Referenced by resetLighting().
|
virtual |
Initializes the light.
Implements FIFE::RenderBackend.
Definition at line 205 of file renderbackendopengl.cpp.
References disableLighting(), and enableLighting().
|
virtual |
Sets the mainscreen display mode.
mode | The ScreenMode to change the display to. |
Implements FIFE::RenderBackend.
Definition at line 105 of file renderbackendopengl.cpp.
Referenced by createMainScreen().
|
virtual |
Called when a new frame starts.
Implements FIFE::RenderBackend.
Definition at line 163 of file renderbackendopengl.cpp.