HIRO_DRAW
Computer Graphics Structures library
hiro::draw::Renderer Class Referenceabstract

Abstract base class for an arbitrary renderer object. More...

Inheritance diagram for hiro::draw::Renderer:
[legend]

Public Member Functions

virtual bool IsCompatibileWithStyle (const hiro::draw::Style *style)=0
 Test whether specified style is compatible with object.
 

Protected Member Functions

virtual void LoadRequiredShaderPrograms (glw::ProgramList *programs)
 Override this method to load specialized shader programs for your object.
 
virtual void Render (const std::string &program)
 Override this method to specify custom rendering behavior in 3D rendering pass.
 
virtual void OnRenderSimple ()
 Provides the possibility to render shapes using a simple color shader. More...
 
virtual void Render2D (const std::string &program)
 Override this method to specify custom rendering behavior in 2D rendering pass.
 
virtual void OnRenderSimple2D ()
 Provides the possibility to render shapes using a simple color shader. More...
 
virtual void FillTextRenderer (hiro::draw::TextRenderer *t_renderer)
 Override this method to define texts to be rendered.
 
template<typename StyleType >
const StyleType * GetStyle () const
 Obtain currently set object style of specific type. Can be used only in Update-Render stage!
 
const Scene * GetScene () const
 

Friends

class RenderSystem
 

Detailed Description

Abstract base class for an arbitrary renderer object.

Member Function Documentation

◆ OnRenderSimple()

virtual void hiro::draw::Renderer::OnRenderSimple ( )
protectedvirtual

Provides the possibility to render shapes using a simple color shader.

Vertex attributes:
vec3 in_position; at location 0 vec3 in_color; at location 1

Uniforms:
bool use_uniform_color = false; at location ULOC_CUSTOM_0 vec3 uniform_color = vec3(0,0,0); at location ULOC_CUSTOM_1

Reimplemented in hiro::draw::GeometryRenderer, hiro::draw::LineFieldRenderer, hiro::draw::SkeletonRenderer, and hiro::draw::FrustumRenderer.

◆ OnRenderSimple2D()

virtual void hiro::draw::Renderer::OnRenderSimple2D ( )
protectedvirtual

Provides the possibility to render shapes using a simple color shader.

Vertex attributes:
vec3 in_position; at location 0 vec3 in_color; at location 1

Uniforms:
bool use_uniform_color = false; at location ULOC_CUSTOM_0 vec3 uniform_color = vec3(0,0,0); at location ULOC_CUSTOM_1

Reimplemented in hiro::draw::LineFieldRenderer.