#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) |
The main class of the OpenGL-based renderer.
Definition at line 42 of file renderbackendopengl.h.
void FIFE::RenderBackendOpenGL::changeBlending | ( | int | scr, | |
int | dst | |||
) | [virtual] |
Change the Blendingmodel.
Implements FIFE::RenderBackend.
Definition at line 342 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::clearBackBuffer | ( | ) | [virtual] |
Forces a clear of the backbuffer
Implements FIFE::RenderBackend.
Definition at line 82 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 167 of file renderbackendopengl.cpp.
Image * FIFE::RenderBackendOpenGL::createImage | ( | const uint8_t * | data, | |
unsigned int | width, | |||
unsigned int | 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 198 of file renderbackendopengl.cpp.
Image * 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 87 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::disableAlphaTest | ( | ) | [virtual] |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 330 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::disableLighting | ( | ) | [virtual] |
Disable the lighting.
Implements FIFE::RenderBackend.
Definition at line 228 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::disableStencilTest | ( | ) | [virtual] |
Disable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 267 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::enableAlphaTest | ( | ) | [virtual] |
Enable the alpha test.
Implements FIFE::RenderBackend.
Definition at line 323 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::enableLighting | ( | ) | [virtual] |
Enable the lighting.
Implements FIFE::RenderBackend.
Definition at line 221 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::enableStencilTest | ( | ) | [virtual] |
Enable the stencil test.
Implements FIFE::RenderBackend.
Definition at line 260 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::endFrame | ( | ) | [virtual] |
Called when a frame is finished and ready to be displayed.
Implements FIFE::RenderBackend.
Definition at line 163 of file renderbackendopengl.cpp.
unsigned int FIFE::RenderBackendOpenGL::getLightingModel | ( | ) | const [virtual] |
Gets the current light model.
Implements FIFE::RenderBackend.
Definition at line 217 of file renderbackendopengl.cpp.
const std::string & FIFE::RenderBackendOpenGL::getName | ( | ) | const [virtual] |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 59 of file renderbackendopengl.cpp.
uint8_t FIFE::RenderBackendOpenGL::getStencilRef | ( | ) | const [virtual] |
Return the reference value for the stencil test.
Implements FIFE::RenderBackend.
Definition at line 319 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::init | ( | const std::string & | driver | ) | [virtual] |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 68 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::resetLighting | ( | ) | [virtual] |
Reset lighting with default values.
Implements FIFE::RenderBackend.
Definition at line 247 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::setAlphaTest | ( | float | ref_alpha | ) | [virtual] |
Set reference for the alpha test.
Implements FIFE::RenderBackend.
Definition at line 337 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::setLighting | ( | float | red, | |
float | green, | |||
float | blue, | |||
float | alpha | |||
) | [virtual] |
Set colors for lighting
Implements FIFE::RenderBackend.
Definition at line 235 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::setLightingModel | ( | unsigned int | lighting | ) | [virtual] |
Initializes the light.
Implements FIFE::RenderBackend.
Definition at line 202 of file renderbackendopengl.cpp.
Image * 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 102 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::startFrame | ( | ) | [virtual] |
Called when a new frame starts.
Implements FIFE::RenderBackend.
Definition at line 160 of file renderbackendopengl.cpp.