IRRRenderer Class Reference

The base renderer for all Irrlicht renderers. More...

Inheritance diagram for IRRRenderer:
Renderer Registerable BufferHandler IRRLineRenderer IRRPointRenderer IRRQuadRenderer

List of all members.

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

Detailed Description

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

Since:
1.04.00

Definition at line 47 of file SPK_IRRRenderer.h.


Constructor & Destructor Documentation

IRRRenderer ( irr::IrrlichtDevice *  d  ) 

Constructor of IRRRenderer.

Parameters:
d : the Irrlicht device
virtual ~IRRRenderer (  )  [virtual]

Destructor of IRRRenderer.

Definition at line 66 of file SPK_IRRRenderer.h.


Member Function Documentation

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.

Parameters:
group : the group in which to check the buffers
Returns:
true if buffers are ready, false otherwise

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

Parameters:
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

Parameters:
renderingHint : the renderingHint to enable or disable
enable : true to enable it, false to disable it
Since:
1.04.00

Reimplemented from Renderer.

unsigned int getAlphaSource (  )  const

Gets the alpha source of this renderer.

Returns:
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.

Returns:
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.

Returns:
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.

Returns:
the 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

Returns:
the material of this renderer

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.

Parameters:
renderingHint : the rendering hint
Since:
1.04.00

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

Parameters:
alphaThreshold : the alpha threshold to use for the alpha test
Since:
1.04.00

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.

Parameters:
blendMode : the blending mode to use
Since:
1.04.00

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)

Parameters:
srcFunc : the blending source function
destFunc : the blending destination function
alphaSrc : the alpha source

Generated on Wed Apr 27 21:09:27 2011 for SPARK Particle Engine by  doxygen 1.6.1