#include <renderbackendopengl.h>
Public Member Functions | |
const std::string & | getName () const |
void | startFrame () |
void | endFrame () |
void | init () |
Image * | createMainScreen (unsigned int width, unsigned int height, unsigned char bitsPerPixel, bool fullscreen, const std::string &title, const std::string &icon) |
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 40 of file renderbackendopengl.h.
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 173 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 142 of file renderbackendopengl.cpp.
Image * FIFE::RenderBackendOpenGL::createMainScreen | ( | unsigned int | width, | |
unsigned int | height, | |||
unsigned char | bitsPerPixel, | |||
bool | fullscreen, | |||
const std::string & | title, | |||
const std::string & | icon | |||
) | [virtual] |
Creates the mainscreen (the display window).
width | Width of the window. | |
height | Height of the window. | |
bitsPerPixel | Bits per pixel, 0 means autodetect. | |
fullscreen | Use fullscreen mode? |
autodetect best mode
Implements FIFE::RenderBackend.
Definition at line 64 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 138 of file renderbackendopengl.cpp.
const std::string & FIFE::RenderBackendOpenGL::getName | ( | ) | const [virtual] |
The name of the renderbackend.
Implements FIFE::RenderBackend.
Definition at line 46 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::init | ( | ) | [virtual] |
Initializes the backend.
Implements FIFE::RenderBackend.
Definition at line 55 of file renderbackendopengl.cpp.
void FIFE::RenderBackendOpenGL::startFrame | ( | ) | [virtual] |
Called when a new frame starts.
Implements FIFE::RenderBackend.
Definition at line 132 of file renderbackendopengl.cpp.