Public Member Functions

FIFE::RenderBackendOpenGL Class Reference

#include <renderbackendopengl.h>

Inheritance diagram for FIFE::RenderBackendOpenGL:
Inheritance graph
[legend]
Collaboration diagram for FIFE::RenderBackendOpenGL:
Collaboration graph
[legend]

List of all members.

Public Member Functions

const std::string & getName () const
void startFrame ()
void endFrame ()
void init ()
ImagecreateMainScreen (unsigned int width, unsigned int height, unsigned char bitsPerPixel, bool fullscreen, const std::string &title, const std::string &icon)
ImagecreateImage (const uint8_t *data, unsigned int width, unsigned int height)
ImagecreateImage (SDL_Surface *surface)

Detailed Description

The main class of the OpenGL-based renderer.

See also:
RenderBackend

Definition at line 40 of file renderbackendopengl.h.


Member Function Documentation

Image * FIFE::RenderBackendOpenGL::createImage ( const uint8_t *  data,
unsigned int  width,
unsigned int  height 
) [virtual]

Creates an Image suitable for this renderbackend.

Parameters:
data Pointer to the imagedata (needs to be in RGBA, 8 bits per channel).
width Width of the image.
height Height of the image.
Returns:
The new 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.

Parameters:
surface The surface to convert.
Returns:
The new Image.

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).

Parameters:
width Width of the window.
height Height of the window.
bitsPerPixel Bits per pixel, 0 means autodetect.
fullscreen Use fullscreen mode?
Returns:
The new Screen Image

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.

Returns:
The name of this 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.


The documentation for this class was generated from the following files: