|
Nebula
|
#include <vkshaperenderer.h>
Inherits Base::ShapeRendererBase.
Classes | |
| struct | IndexedDraws |
| struct | UnindexedDraws |
Public Member Functions | |
| VkShapeRenderer () | |
| constructor | |
| virtual | ~VkShapeRenderer () |
| destructor | |
| void | Open () |
| open the shape renderer | |
| void | Close () |
| close the shape renderer | |
| void | DrawShapes (const CoreGraphics::CmdBufferId cmdBuf) |
| draw attached shapes and clear deferred stack, must be called inside render loop | |
| Public Member Functions inherited from Base::ShapeRendererBase | |
| 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 | |
Static Public Attributes | |
| static const int | MaxNumVertices = 262140 |
| maximum amount of vertices to be rendered by drawprimitives and drawindexedprimitives | |
| static const int | MaxNumIndices = 262140 |
| maximum amount of indices to be rendered by drawprimitives and drawindexedprimitives | |
| static const int | MaxVertexWidth = 8 * sizeof(float) |
| maximum size for primitive size (4 floats for position, 4 floats for color) | |
| static const int | MaxIndexWidth = sizeof(int) |
| maximum size for an index | |
Private Member Functions | |
| __DeclareClass (VkShapeRenderer) | |
| void | DrawBufferedPrimitives (const CoreGraphics::CmdBufferId cmdBuf) |
| draw buffered primitives | |
| void | DrawBufferedIndexedPrimitives (const CoreGraphics::CmdBufferId cmdBuf) |
| draw buffered indexed primtives | |
| void | GrowIndexBuffer () |
| grow index buffer | |
| void | GrowVertexBuffer () |
| grow vertex buffer | |
| void | DrawSimpleShape (const CoreGraphics::CmdBufferId cmdBuf, const Math::mat4 &modelTransform, CoreGraphics::RenderShape::Type shapeType, const Math::vec4 &color, const float lineThickness) |
| draw a shape | |
| void | DrawMesh (const CoreGraphics::CmdBufferId cmdBuf, const Math::mat4 &modelTransform, const CoreGraphics::MeshId mesh, const Math::vec4 &color, const float lineThickness) |
| draw debug mesh | |
| void | DrawPrimitives (const Math::mat4 &modelTransform, CoreGraphics::PrimitiveTopology::Code topology, SizeT numVertices, const void *vertices, const float lineThickness) |
| draw primitives | |
| void | DrawIndexedPrimitives (const Math::mat4 &modelTransform, CoreGraphics::PrimitiveTopology::Code topology, SizeT numVertices, const void *vertices, SizeT numIndices, const void *indices, CoreGraphics::IndexType::Code indexType, const float lineThickness) |
| draw indexed primitives | |
Static Private Attributes | |
| static const SizeT | MaxVertexIndexBuffers = 2 |
Additional Inherited Members | |
| Public Types inherited from Base::ShapeRendererBase | |
| enum | ShaderTypes { Mesh , MeshNoDepth , MeshWireframe , Primitives , PrimitivesNoDepth , PrimitivesWireframeTriangles , PrimitivesWireframeLines , NumShaders } |
| 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) | |
| Protected Attributes inherited from Base::ShapeRendererBase | |
| 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 |
| Vulkan::VkShapeRenderer::VkShapeRenderer | ( | ) |
constructor
|
virtual |
destructor
|
private |
| void Vulkan::VkShapeRenderer::Close | ( | ) |
close the shape renderer
|
private |
draw buffered indexed primtives
|
private |
draw buffered primitives
|
private |
draw indexed primitives
|
private |
draw debug mesh
|
private |
draw primitives
| void Vulkan::VkShapeRenderer::DrawShapes | ( | const CoreGraphics::CmdBufferId | cmdBuf | ) |
draw attached shapes and clear deferred stack, must be called inside render loop
|
private |
draw a shape
|
private |
grow index buffer
|
private |
grow vertex buffer
| void Vulkan::VkShapeRenderer::Open | ( | ) |
open the shape renderer
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
static |
maximum size for an index
|
static |
maximum amount of indices to be rendered by drawprimitives and drawindexedprimitives
|
static |
maximum amount of vertices to be rendered by drawprimitives and drawindexedprimitives
|
staticprivate |
|
static |
maximum size for primitive size (4 floats for position, 4 floats for color)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |