#include <renderable.h>
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 |
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.
Definition at line 48 of file renderable.h.
Definition at line 51 of file renderable.h.
enum Renderer::EStyle |
Definition at line 58 of file renderable.h.
virtual Renderer::~Renderer | ( | ) | [inline, virtual] |
Definition at line 63 of file renderable.h.
virtual void Renderer::addRenderable | ( | const OpenGLRenderable & | renderable, | |
const Matrix4 & | world | |||
) | [pure virtual] |
Implemented in CamRenderer.
Referenced by BrushClipPlane::render(), Face::render(), RenderablePivot::render(), RenderableTargetingEntities::render(), RenderableTargetingEntity::render(), BrushInstance::renderComponents(), Brush::renderComponents(), CurveEdit::renderComponents(), BrushInstance::renderComponentsSelected(), CurveEdit::renderComponentsSelected(), and BrushInstance::renderWireframe().
virtual const EStyle Renderer::getStyle | ( | ) | const [pure virtual] |
Implemented in CamRenderer.
virtual void Renderer::Highlight | ( | EHighlightMode | mode, | |
bool | bEnable = true | |||
) | [pure virtual] |
Implemented in CamRenderer.
Referenced by FaceInstance::render(), RenderablePivot::render(), BrushInstance::renderCommon(), BrushInstance::renderComponentsSelected(), and CurveEdit::renderComponentsSelected().
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] |