Renderer Class Reference

An abstract class that renders particles. More...

Inheritance diagram for Renderer:
Registerable BufferHandler GLRenderer IRRRenderer SFMLRenderer GLLineRenderer GLLineTrailRenderer GLPointRenderer GLQuadRenderer IRRLineRenderer IRRPointRenderer IRRQuadRenderer SFMLDrawableRenderer SFMLLineRenderer SFMLPointRenderer SFMLQuadRenderer

List of all members.

Public Member Functions

 Renderer ()
 Constructor of Renderer.
virtual ~Renderer ()
 Destructor of Renderer.
void setActive (bool active)
 Sets this Renderer active or not.
virtual void setBlending (BlendingMode blendMode)=0
 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.
bool isActive () const
 Tells whether this Renderer is active or not.
virtual bool isRenderingHintEnabled (RenderingHint renderingHint) const
 Tells whether a rendering hint is enabled or not.
float getAlphaTestThreshold () const
 Gets the alpha threhold used by the alpha test.
virtual void render (const Group &group)=0
 Renders a Group of particles.

Detailed Description

An abstract class that renders particles.

A renderer is used to represent particle systems.
the representation of a particle system is totally independant to its computation.

Some renderers (or renderers modes) may need some buffers be attached to the Group of particles they render.
rendering buffers are attached to groups but used by renderers. Their creation can also be given to renderer when needed.
By enabling the buffer creation with the static method enableBuffersCreation(bool), the renderer will create the buffers he needs, if not already created in the group, before rendering. If buffer creation is disabled, a group that dont have the correct buffers for the renderer, cannot be renderered, the render method of the renderer will simply exit.

Note that buffers are linked to a class of renderer, not to a given renderer object.
Moreover buffers have an inner flag that can vary function of the states of the renderer used.

Definition at line 76 of file SPK_Renderer.h.


Constructor & Destructor Documentation

Renderer (  ) 

Constructor of Renderer.

virtual ~Renderer (  )  [virtual]

Destructor of Renderer.


Member Function Documentation

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 in IRRRenderer.

Definition at line 191 of file SPK_Renderer.h.

float getAlphaTestThreshold (  )  const

Gets the alpha threhold used by the alpha test.

Returns:
the alpha threhold used by the alpha test
Since:
1.04.00

Definition at line 214 of file SPK_Renderer.h.

bool isActive (  )  const

Tells whether this Renderer is active or not.

Returns:
true if this Renderer is active, false if is is inactive
Since:
1.03.00

Definition at line 204 of file SPK_Renderer.h.

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 in IRRRenderer.

Definition at line 209 of file SPK_Renderer.h.

virtual void render ( const Group group  )  [pure virtual]

Renders a Group of particles.

Parameters:
group : the Group to render

Implemented in IRRLineRenderer, IRRPointRenderer, IRRQuadRenderer, GLLineRenderer, GLLineTrailRenderer, GLPointRenderer, GLQuadRenderer, and SFMLRenderer.

void setActive ( bool  active  ) 

Sets this Renderer active or not.

An inactive Renderer will render its parent Group when a call to Group::render() is made.
However it can still be used manually by the user with render(Group&).

Parameters:
active : true to activate this Renderer, false to deactivate it
Since:
1.03.00

Definition at line 186 of file SPK_Renderer.h.

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 in IRRRenderer.

Definition at line 199 of file SPK_Renderer.h.

virtual void setBlending ( BlendingMode  blendMode  )  [pure 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

Implemented in IRRRenderer, GLRenderer, and SFMLRenderer.


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