|
Nebula
|
#include <shaperendererbase.h>
Base class of ShapeRenderer, can render a number of shapes, mainly for debug visualization.
TODO: Add support for appending debug shapes from multiple threads simultaneously
Inherits Core::RefCounted.
Inherited by Vulkan::VkShapeRenderer.
Public Types | |
| enum | ShaderTypes { Mesh , MeshNoDepth , MeshWireframe , Primitives , PrimitivesNoDepth , PrimitivesWireframeTriangles , PrimitivesWireframeLines , NumShaders } |
Public Member Functions | |
| ShapeRendererBase () | |
| constructor | |
| virtual | ~ShapeRendererBase () |
| destructor | |
| void | Open () |
| open the shape renderer | |
| void | Close () |
| close the shape renderer | |
| bool | IsOpen () const |
| return true if open | |
| void | ClearShapes () |
| delete shapes of given thread id | |
| void | AddShape (const CoreGraphics::RenderShape &shape) |
| add a shape for deferred rendering (can be called from outside render loop) | |
| void | AddShapes (const Util::Array< CoreGraphics::RenderShape > &shapeArray) |
| add multiple shapes | |
| void | AddWireFrameBox (const Math::bbox &boundingBox, const Math::vec4 &color) |
| add wireframe box | |
| void | DrawShapes () |
| draw deferred shapes and clear deferred stack, must be called inside render loop | |
Public Member Functions inherited from Core::RefCounted | |
| RefCounted () | |
| constructor | |
| int | GetRefCount () const |
| get the current refcount | |
| void | AddRef () |
| increment refcount by one | |
| void | Release () |
| decrement refcount and destroy object if refcount is zero | |
| bool | IsInstanceOf (const Rtti &rtti) const |
| return true if this object is instance of given class | |
| bool | IsInstanceOf (const Util::String &className) const |
| return true if this object is instance of given class by string | |
| bool | IsInstanceOf (const Util::FourCC &classFourCC) const |
| return true if this object is instance of given class by fourcc | |
| bool | IsA (const Rtti &rtti) const |
| return true if this object is instance of given class, or a derived class | |
| bool | IsA (const Util::String &rttiName) const |
| return true if this object is instance of given class, or a derived class, by string | |
| bool | IsA (const Util::FourCC &rttiFourCC) const |
| return true if this object is instance of given class, or a derived class, by fourcc | |
| const Util::String & | GetClassName () const |
| get the class name | |
| Util::FourCC | GetClassFourCC () const |
| get the class FourCC code | |
Protected Attributes | |
| bool | isOpen |
| Util::Array< CoreGraphics::RenderShape > | shapes [ShaderTypes::NumShaders] |
| Util::Array< CoreGraphics::RenderShape > | primitives [ShaderTypes::NumShaders] |
| CoreGraphics::ShaderProgramId | programs [ShaderTypes::NumShaders] |
| SizeT | numIndicesThisFrame |
| SizeT | numVerticesThisFrame |
Private Member Functions | |
| __DeclareClass (ShapeRendererBase) | |
| __DeclareSingleton (ShapeRendererBase) | |
Additional Inherited Members | |
Static Public Member Functions inherited from Core::RefCounted | |
| static void | DumpRefCountingLeaks () |
| dump refcounting leaks, call at end of application (NEBULA_DEBUG builds only!) | |
Protected Member Functions inherited from Core::RefCounted | |
| virtual | ~RefCounted () |
| destructor (called when refcount reaches zero) | |
| Base::ShapeRendererBase::ShapeRendererBase | ( | ) |
constructor
|
virtual |
destructor
|
private |
|
private |
| void Base::ShapeRendererBase::AddShape | ( | const CoreGraphics::RenderShape & | shape | ) |
add a shape for deferred rendering (can be called from outside render loop)
| void Base::ShapeRendererBase::AddShapes | ( | const Util::Array< CoreGraphics::RenderShape > & | shapeArray | ) |
add multiple shapes
| void Base::ShapeRendererBase::AddWireFrameBox | ( | const Math::bbox & | boundingBox, |
| const Math::vec4 & | color ) |
add wireframe box
| void Base::ShapeRendererBase::ClearShapes | ( | ) |
delete shapes of given thread id
| void Base::ShapeRendererBase::Close | ( | ) |
close the shape renderer
| void Base::ShapeRendererBase::DrawShapes | ( | ) |
draw deferred shapes and clear deferred stack, must be called inside render loop
|
inline |
return true if open
| void Base::ShapeRendererBase::Open | ( | ) |
open the shape renderer
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |