Renderer Class Reference

#include <renderable.h>

Inheritance diagram for Renderer:
Inheritance graph
[legend]

Public Types

enum  EHighlightMode { eFace = 1 << 0, ePrimitive = 1 << 1 }
enum  EStyle { eWireframeOnly, eFullMaterials }

Public Member Functions

virtual ~Renderer ()
virtual void PushState ()=0
virtual void PopState ()=0
virtual void SetState (Shader *state, EStyle mode)=0
virtual const EStyle getStyle () const =0
virtual void Highlight (EHighlightMode mode, bool bEnable=true)=0
virtual void setLights (const LightList &lights)
virtual void addRenderable (const OpenGLRenderable &renderable, const Matrix4 &world)=0

Detailed Description

This is a proxy class used in the first (sorting) stage of rendering, which accepts OpenGLRenderables and adds them to a suitable data structure for rendering in the second stage. Despite its name, this class does not actually render anything.

Each Renderable in the scenegraph is passed a reference to a RenderableSortProxy, on which the Renderable sets that necessary state variables and then submits its OpenGLRenderable for later rendering. A single Renderable may submit more than one OpenGLRenderable, with a different state each time -- for instance a Renderable model class may submit each of its material surfaces separately with the respective shaders set beforehand.

Todo:
This class probably doesn't need to be a state machine, convert it to a single submit method with necessary parameters.

Definition at line 48 of file renderable.h.


Member Enumeration Documentation

Enumerator:
eFace 
ePrimitive 

Full highlighting.

Definition at line 51 of file renderable.h.

Enumerator:
eWireframeOnly 
eFullMaterials 

Definition at line 58 of file renderable.h.


Constructor & Destructor Documentation

virtual Renderer::~Renderer (  )  [inline, virtual]

Definition at line 63 of file renderable.h.


Member Function Documentation

virtual void Renderer::addRenderable ( const OpenGLRenderable &  renderable,
const Matrix4 &  world 
) [pure virtual]
virtual const EStyle Renderer::getStyle (  )  const [pure virtual]

Implemented in CamRenderer.

virtual void Renderer::Highlight ( EHighlightMode  mode,
bool  bEnable = true 
) [pure virtual]
virtual void Renderer::PopState (  )  [pure virtual]

Implemented in CamRenderer.

Referenced by FaceInstance::render(), and RenderablePivot::render().

virtual void Renderer::PushState (  )  [pure virtual]

Implemented in CamRenderer.

Referenced by FaceInstance::render(), and RenderablePivot::render().

virtual void Renderer::setLights ( const LightList &  lights  )  [inline, virtual]

Reimplemented in CamRenderer.

Definition at line 72 of file renderable.h.

Referenced by BrushInstance::renderSolid().

virtual void Renderer::SetState ( Shader *  state,
EStyle  mode 
) [pure virtual]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2