#include <renderbackendopengl.h>


Public Member Functions | |
| virtual const std::string & | getName () const |
| virtual void | startFrame () |
| virtual void | endFrame () |
| virtual void | init (const std::string &driver) |
| virtual void | clearBackBuffer () |
| virtual void | setLightingModel (uint32_t lighting) |
| virtual uint32_t | getLightingModel () const |
| virtual void | setLighting (float red, float green, float blue) |
| virtual void | resetLighting () |
| virtual void | resetStencilBuffer (uint8_t buffer) |
| virtual void | changeBlending (int32_t scr, int32_t dst) |
| virtual void | createMainScreen (const ScreenMode &mode, const std::string &title, const std::string &icon) |
| virtual void | setScreenMode (const ScreenMode &mode) |
| virtual Image * | createImage (const uint8_t *data, uint32_t width, uint32_t height) |
| virtual Image * | createImage (SDL_Surface *surface) |
| virtual void | renderVertexArrays () |
| virtual void | addImageToArray (uint32_t id, const Rect &rec, float const *st, uint8_t alpha, uint8_t const *rgb) |
| virtual void | changeRenderInfos (uint16_t elements, int32_t src, int32_t dst, bool light, bool stentest, uint8_t stenref, GLConstants stenop, GLConstants stenfunc) |
| virtual void | captureScreen (const std::string &filename) |
| virtual void | captureScreen (const std::string &filename, uint32_t width, uint32_t height) |
| virtual bool | putPixel (int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| virtual void | drawLine (const Point &p1, const Point &p2, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| virtual void | drawTriangle (const Point &p1, const Point &p2, const Point &p3, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| 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) |
| 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) |
| virtual void | drawQuad (const Point &p1, const Point &p2, const Point &p3, const Point &p4, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| virtual void | drawVertex (const Point &p, const uint8_t size, uint8_t r, uint8_t g, uint8_t b, uint8_t a=255) |
| virtual void | drawLightPrimitive (const Point &p, uint8_t intensity, float radius, int32_t subdivisions, float xstretch, float ystretch, uint8_t red, uint8_t green, uint8_t blue) |
| virtual void | attachRenderTarget (ImagePtr &img, bool discard) |
| virtual void | detachRenderTarget () |
Protected Member Functions | |
| virtual void | setClipArea (const Rect &cliparea, bool clear) |
The main class of the OpenGL-based renderer.
Definition at line 43 of file renderbackendopengl.h.
| void FIFE::RenderBackendOpenGL::addImageToArray | ( | uint32_t | id, | |
| const Rect & | rec, | |||
| float const * | st, | |||
| uint8_t | alpha, | |||
| uint8_t const * | rgb | |||
| ) | [virtual] |
Add the Image data to the array
Implements FIFE::RenderBackend.
Definition at line 971 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::attachRenderTarget | ( | ImagePtr & | img, | |
| bool | discard | |||
| ) | [virtual] |
Attaches given image as a new render surface
Implements FIFE::RenderBackend.
Definition at line 1254 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::captureScreen | ( | const std::string & | filename | ) | [virtual] |
Creates a Screenshot and saves it to a file.
Implements FIFE::RenderBackend.
Definition at line 1095 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::captureScreen | ( | const std::string & | filename, | |
| uint32_t | width, | |||
| uint32_t | height | |||
| ) | [virtual] |
Creates a Screenshot with the given size(w,h) and saves it to a file.
Implements FIFE::RenderBackend.
Definition at line 1129 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::changeBlending | ( | int32_t | scr, | |
| int32_t | dst | |||
| ) | [virtual] |
Change the Blendingmodel.
Implements FIFE::RenderBackend.
Definition at line 530 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::changeRenderInfos | ( | uint16_t | elements, | |
| int32_t | src, | |||
| int32_t | dst, | |||
| bool | light, | |||
| bool | stentest, | |||
| uint8_t | stenref, | |||
| GLConstants | stenop, | |||
| GLConstants | stenfunc | |||
| ) | [virtual] |
Dirty helper function to change the render infos
Implements FIFE::RenderBackend.
Definition at line 567 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::clearBackBuffer | ( | ) | [virtual] |
Forces a clear of the backbuffer
Implements FIFE::RenderBackend.
Definition at line 124 of file renderbackendopengl.cpp.
| Image * FIFE::RenderBackendOpenGL::createImage | ( | const uint8_t * | data, | |
| uint32_t | width, | |||
| uint32_t | height | |||
| ) | [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 307 of file renderbackendopengl.cpp.
| Image * FIFE::RenderBackendOpenGL::createImage | ( | SDL_Surface * | surface | ) | [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 237 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::createMainScreen | ( | const ScreenMode & | mode, | |
| const std::string & | title, | |||
| const std::string & | icon | |||
| ) | [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 130 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::detachRenderTarget | ( | ) | [virtual] |
Detaches current render surface
Implements FIFE::RenderBackend.
Definition at line 1304 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawLightPrimitive | ( | const Point & | p, | |
| uint8_t | intensity, | |||
| float | radius, | |||
| int32_t | subdivisions, | |||
| float | xstretch, | |||
| float | ystretch, | |||
| uint8_t | red, | |||
| uint8_t | green, | |||
| uint8_t | blue | |||
| ) | [virtual] |
Draws a light primitive that based on a triangle fan
Implements FIFE::RenderBackend.
Definition at line 942 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawLine | ( | const Point & | p1, | |
| const Point & | p2, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws line between given points with given RGBA
Implements FIFE::RenderBackend.
Definition at line 808 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawQuad | ( | const Point & | p1, | |
| const Point & | p2, | |||
| const Point & | p3, | |||
| const Point & | p4, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws quad between given points with given RGBA
Implements FIFE::RenderBackend.
Definition at line 893 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawRectangle | ( | const Point & | p, | |
| uint16_t | w, | |||
| uint16_t | h, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws an axis parallel rectangle.
Implements FIFE::RenderBackend.
Definition at line 848 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawTriangle | ( | const Point & | p1, | |
| const Point & | p2, | |||
| const Point & | p3, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws triangle between given points with given RGBA
Implements FIFE::RenderBackend.
Definition at line 826 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::drawVertex | ( | const Point & | p, | |
| const uint8_t | size, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws a quad that represents a vertex with given RGBA
Implements FIFE::RenderBackend.
Definition at line 919 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::endFrame | ( | ) | [virtual] |
Called when a frame is finished and ready to be displayed.
Reimplemented from FIFE::RenderBackend.
Definition at line 224 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::fillRectangle | ( | const Point & | p, | |
| uint16_t | w, | |||
| uint16_t | h, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Draws a filled axis parallel rectangle.
Implements FIFE::RenderBackend.
Definition at line 870 of file renderbackendopengl.cpp.
| uint32_t FIFE::RenderBackendOpenGL::getLightingModel | ( | ) | const [virtual] |
Gets the current light model.
Implements FIFE::RenderBackend.
Definition at line 330 of file renderbackendopengl.cpp.
| const std::string & FIFE::RenderBackendOpenGL::getName | ( | ) | const [virtual] |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 108 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::init | ( | const std::string & | driver | ) | [virtual] |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 113 of file renderbackendopengl.cpp.
| bool FIFE::RenderBackendOpenGL::putPixel | ( | int32_t | x, | |
| int32_t | y, | |||
| uint8_t | r, | |||
| uint8_t | g, | |||
| uint8_t | b, | |||
| uint8_t | a = 255 | |||
| ) | [virtual] |
Writes pixel to given position. Returns true, if pixel was written (not out of bounds)
Implements FIFE::RenderBackend.
Definition at line 788 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::renderVertexArrays | ( | ) | [virtual] |
Render the Vertex Arrays, only for primitives (points, lines,...)
Implements FIFE::RenderBackend.
Definition at line 588 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::resetLighting | ( | ) | [virtual] |
Reset lighting with default values.
Implements FIFE::RenderBackend.
Definition at line 406 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::resetStencilBuffer | ( | uint8_t | buffer | ) | [virtual] |
Reset stencil buffer with given value.
Implements FIFE::RenderBackend.
Definition at line 440 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::setClipArea | ( | const Rect & | cliparea, | |
| bool | clear | |||
| ) | [protected, virtual] |
Sets given clip area into image
Implements FIFE::RenderBackend.
Definition at line 1240 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::setLighting | ( | float | red, | |
| float | green, | |||
| float | blue | |||
| ) | [virtual] |
Set colors for lighting
Implements FIFE::RenderBackend.
Definition at line 399 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::setLightingModel | ( | uint32_t | lighting | ) | [virtual] |
Initializes the light.
Implements FIFE::RenderBackend.
Definition at line 315 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::setScreenMode | ( | const ScreenMode & | mode | ) | [virtual] |
Sets the mainscreen display mode.
| mode | The ScreenMode to change the display to. |
Implements FIFE::RenderBackend.
Definition at line 143 of file renderbackendopengl.cpp.
| void FIFE::RenderBackendOpenGL::startFrame | ( | ) | [virtual] |
Called when a new frame starts.
Reimplemented from FIFE::RenderBackend.
Definition at line 220 of file renderbackendopengl.cpp.
1.7.1