#include <Video.h>
Public Member Functions | |
void | setWindow (unsigned x, unsigned y, bool redrawThread=false, bool openGL=false) |
sets the size of video window. | |
unsigned | getWindowWidth () const |
unsigned | getWindowHeight () const |
void | addRedraw (Redrawer *r) |
Adds the user redraw function called from redraw() - the surface is cleared and and flipped automatically. | |
void | removeRedraw (Redrawer *r) |
remove previously added Redrawer | |
void | redraw () |
redraws if possible. Should only be called from the video (GL) thread ! | |
void | waitForKey () |
bool | gl () |
void | flip () |
Static Public Member Functions | |
Video & | getInstance () |
inits Video on first call | |
void | deinit () |
deinits video. Should be called before exit. | |
Protected Types | |
typedef std::list< Redrawer * > | Painters |
Protected Member Functions | |
Video () | |
~Video () | |
Protected Attributes | |
Painters | painters |
SDL_Surface * | screen |
You must create this class before using Image. There Problem: if you want to visualise, you can only have one window. So if you need more, the only way is to fork() and have two videos..
|
|
|
|
|
|
|
Adds the user redraw function called from redraw() - the surface is cleared and and flipped automatically. warning: Video only stores reference -> you must call removeRedraw() before the object becomes invalid! |
|
deinits video. Should be called before exit.
|
|
|
|
inits Video on first call
|
|
|
|
|
|
|
|
redraws if possible. Should only be called from the video (GL) thread !
|
|
remove previously added Redrawer
|
|
sets the size of video window. On the first call, the window will be created.
|
|
|
|
|
|
|