The base renderer for all Irrlicht renderers. More...
Public Member Functions | |
IRRRenderer (irr::IrrlichtDevice *d) | |
Constructor of IRRRenderer. | |
virtual | ~IRRRenderer () |
Destructor of IRRRenderer. | |
void | setBlending (irr::video::E_BLEND_FACTOR srcFunc, irr::video::E_BLEND_FACTOR destFunc, unsigned int alphaSrc) |
Sets the blending mode in a very accurate way. | |
virtual void | setBlending (BlendingMode blendMode) |
Sets the blending mode of this renderer. | |
virtual void | enableRenderingHint (RenderingHint renderingHint, bool enable) |
Enables or disables a rendering hint. | |
virtual void | setAlphaTestThreshold (float alphaThreshold) |
Tells the alpha threshold to use when the ALPHA_TEST is enabled. | |
irr::IrrlichtDevice * | getDevice () const |
Gets the Irrlicht device of this renderer. | |
irr::video::E_BLEND_FACTOR | getBlendSrcFunc () const |
Gets the source blending funtion of this renderer. | |
irr::video::E_BLEND_FACTOR | getBlendDestFunc () const |
Gets the destination blending funtion of this renderer. | |
unsigned int | getAlphaSource () const |
Gets the alpha source of this renderer. | |
const irr::video::SMaterial & | getMaterial () const |
Gets the material of this renderer. | |
virtual bool | isRenderingHintEnabled (RenderingHint renderingHint) const |
Tells whether a rendering hint is enabled or not. | |
virtual void | destroyBuffers (const Group &group) |
Destroys the buffers for this buffer handler in the given group. | |
Protected Member Functions | |
virtual bool | checkBuffers (const Group &group) |
checks the buffers and prepare them |
The base renderer for all Irrlicht renderers.
This class presents a convenient interface to set some parameters common to all Irrlicht renderers (blending mode...).
Note that rendering hints work with Irrlicht renderers except the SPK::ALPHA_TEST which is always enabled with a threshold of 0. (meaning alpha values of 0 are never rendered).
Definition at line 47 of file SPK_IRRRenderer.h.
IRRRenderer | ( | irr::IrrlichtDevice * | d | ) |
Constructor of IRRRenderer.
d | : the Irrlicht device |
virtual ~IRRRenderer | ( | ) | [virtual] |
Destructor of IRRRenderer.
Definition at line 66 of file SPK_IRRRenderer.h.
bool checkBuffers | ( | const Group & | group | ) | [protected, virtual] |
checks the buffers and prepare them
This method has to be implemented in derived class that uses buffers.
true must be returned if the buffers are found and initialized, false otherwise.
group | : the group in which to check the buffers |
Reimplemented from BufferHandler.
Definition at line 198 of file SPK_IRRRenderer.h.
void destroyBuffers | ( | const Group & | group | ) | [virtual] |
Destroys the buffers for this buffer handler in the given group.
if the buffers dont exist, nothing happens.
This method has to be overridden in derived classes that use buffers
group | : the Group in which to destroy the buffers for this buffer handler |
Reimplemented from BufferHandler.
Definition at line 193 of file SPK_IRRRenderer.h.
virtual void enableRenderingHint | ( | RenderingHint | renderingHint, | |
bool | enable | |||
) | [virtual] |
Enables or disables a rendering hint.
Note that as stated, these are only hints that may not be taken into account in all rendering APIs
renderingHint | : the renderingHint to enable or disable | |
enable | : true to enable it, false to disable it |
Reimplemented from Renderer.
unsigned int getAlphaSource | ( | ) | const |
Gets the alpha source of this renderer.
Definition at line 183 of file SPK_IRRRenderer.h.
irr::video::E_BLEND_FACTOR getBlendDestFunc | ( | ) | const |
Gets the destination blending funtion of this renderer.
Definition at line 178 of file SPK_IRRRenderer.h.
irr::video::E_BLEND_FACTOR getBlendSrcFunc | ( | ) | const |
Gets the source blending funtion of this renderer.
Definition at line 173 of file SPK_IRRRenderer.h.
irr::IrrlichtDevice * getDevice | ( | ) | const |
Gets the Irrlicht device of this renderer.
Definition at line 168 of file SPK_IRRRenderer.h.
const irr::video::SMaterial & getMaterial | ( | ) | const |
Gets the material of this renderer.
Note that the renderer is constant and therefore cannot be modified directly
Definition at line 188 of file SPK_IRRRenderer.h.
virtual bool isRenderingHintEnabled | ( | RenderingHint | renderingHint | ) | const [virtual] |
Tells whether a rendering hint is enabled or not.
renderingHint | : the rendering hint |
Reimplemented from Renderer.
void setAlphaTestThreshold | ( | float | alphaThreshold | ) | [virtual] |
Tells the alpha threshold to use when the ALPHA_TEST is enabled.
The operation performs by the alpha test is greater or equal to threshold
alphaThreshold | : the alpha threshold to use for the alpha test |
Reimplemented from Renderer.
Definition at line 163 of file SPK_IRRRenderer.h.
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 setBlending | ( | irr::video::E_BLEND_FACTOR | srcFunc, | |
irr::video::E_BLEND_FACTOR | destFunc, | |||
unsigned int | alphaSrc | |||
) |
Sets the blending mode in a very accurate way.
This method allows to set any blending mode supported by Irrlicht.
Note that a simpler helper method exist to set the most common blending modes :
setBlending(BlendingMode)
srcFunc | : the blending source function | |
destFunc | : the blending destination function | |
alphaSrc | : the alpha source |