An abstract Renderer for the openGL renderers. More...
Public Member Functions | |
GLRenderer () | |
Constructor of GLRenderer. | |
virtual | ~GLRenderer () |
Destructor of GLRenderer. | |
virtual void | enableBlending (bool blendingEnabled) |
Enables or disables the blending of this GLRenderer. | |
void | setBlendingFunctions (GLuint src, GLuint dest) |
Sets the blending functions of this GLRenderer. | |
virtual void | setBlending (BlendingMode blendMode) |
Sets the blending mode of this renderer. | |
void | setTextureBlending (GLuint textureBlending) |
Sets the texture blending function of this GLRenderer. | |
bool | isBlendingEnabled () const |
Tells whether blending is enabled for this GLRenderer. | |
GLuint | getSrcBlendingFunction () const |
Gets the source blending function of this GLRenderer. | |
GLuint | getDestBlendingFunction () const |
Gets the destination blending function of this GLRenderer. | |
GLuint | getTextureBlending () const |
Gets the texture blending function of this GLRenderer. | |
Static Public Member Functions | |
static void | saveGLStates () |
Saves the current openGL states. | |
static void | restoreGLStates () |
Restores the openGL states. | |
Protected Member Functions | |
void | initBlending () const |
Inits the blending of this GLRenderer. | |
void | initRenderingHints () const |
Inits the rendering hints of this GLRenderer. |
An abstract Renderer for the openGL renderers.
Definition at line 37 of file SPK_GLRenderer.h.
GLRenderer | ( | ) |
Constructor of GLRenderer.
virtual ~GLRenderer | ( | ) | [virtual] |
Destructor of GLRenderer.
void enableBlending | ( | bool | blendingEnabled | ) | [virtual] |
Enables or disables the blending of this GLRenderer.
blendingEnabled | true to enable the blending, false to disable it |
Reimplemented in GLLineTrailRenderer.
Definition at line 156 of file SPK_GLRenderer.h.
GLuint getDestBlendingFunction | ( | ) | const |
Gets the destination blending function of this GLRenderer.
Definition at line 182 of file SPK_GLRenderer.h.
GLuint getSrcBlendingFunction | ( | ) | const |
Gets the source blending function of this GLRenderer.
Definition at line 177 of file SPK_GLRenderer.h.
GLuint getTextureBlending | ( | ) | const |
Gets the texture blending function of this GLRenderer.
Definition at line 187 of file SPK_GLRenderer.h.
void initBlending | ( | ) | const [protected] |
Inits the blending of this GLRenderer.
Definition at line 192 of file SPK_GLRenderer.h.
void initRenderingHints | ( | ) | const [protected] |
Inits the rendering hints of this GLRenderer.
Definition at line 203 of file SPK_GLRenderer.h.
bool isBlendingEnabled | ( | ) | const |
Tells whether blending is enabled for this GLRenderer.
Definition at line 172 of file SPK_GLRenderer.h.
static void restoreGLStates | ( | ) | [static] |
Restores the openGL states.
This method restores the openGL states at the values they were at the last call of saveGLStates().
static void saveGLStates | ( | ) | [static] |
Saves the current openGL states.
This method saves all the states that are likely to be modified by a GLRenderer.
Use restoreGLStates() to restore the states.
Note that for one saveGLStates call, a call to restoreGLStates must occur. In case of several saveGLStates with no restoreGLStates, the restoreGLStates is called priorly in an implicit way.
virtual void setBlending | ( | BlendingMode | blendMode | ) | [virtual] |
Sets the blending mode of this renderer.
This is a generic method that allows to set most common blending modes in a generic way. However renderers can implement method to give more control over the blending mode used.
blendMode | : the blending mode to use |
Implements Renderer.
void setBlendingFunctions | ( | GLuint | src, | |
GLuint | dest | |||
) |
Sets the blending functions of this GLRenderer.
the blending functions are one of the openGL blending functions.
src | : the source blending function of this GLRenderer | |
dest | : the destination blending function of this GLRenderer |
Definition at line 161 of file SPK_GLRenderer.h.
void setTextureBlending | ( | GLuint | textureBlending | ) |
Sets the texture blending function of this GLRenderer.
the texture blending function is one of the openGL texture blending functions.
textureBlending | : the texture blending function of this GLRenderer |
Definition at line 167 of file SPK_GLRenderer.h.