Base class of ShapeRenderer, can render a number of shapes, mainly for debug visualization.
Definition shaperendererbase.h:30
void DrawShapes()
draw deferred shapes and clear deferred stack, must be called inside render loop
Definition shaperendererbase.cc:190
Code
index types enum
Definition indextype.h:22
Code
enumeration
Definition primitivetopology.h:23
@ NumTopologies
Definition primitivetopology.h:38
Type
shape types
Definition rendershape.h:36
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
Definition vkshaperenderer.h:18
byte * indexBufferPtr
Definition vkshaperenderer.h:72
Util::FixedArray< Resources::ResourceId > shapeMeshResources
Definition vkshaperenderer.h:64
IndexT lineWidth
Definition vkshaperenderer.h:81
SizeT indexBufferCapacity
Definition vkshaperenderer.h:76
SizeT vertexBufferCapacity
Definition vkshaperenderer.h:75
void DrawSimpleShape(const CoreGraphics::CmdBufferId cmdBuf, const Math::mat4 &modelTransform, CoreGraphics::RenderShape::Type shapeType, const Math::vec4 &color, const float lineThickness)
draw a shape
Definition vkshaperenderer.cc:258
static const int MaxNumIndices
maximum amount of indices to be rendered by drawprimitives and drawindexedprimitives
Definition vkshaperenderer.h:37
void Close()
close the shape renderer
Definition vkshaperenderer.cc:131
byte * vertexBufferPtr
Definition vkshaperenderer.h:71
void GrowIndexBuffer()
grow index buffer
Definition vkshaperenderer.cc:465
void DrawPrimitives(const Math::mat4 &modelTransform, CoreGraphics::PrimitiveTopology::Code topology, SizeT numVertices, const void *vertices, const float lineThickness)
draw primitives
Definition vkshaperenderer.cc:318
struct Vulkan::VkShapeRenderer::UnindexedDraws unindexed[CoreGraphics::PrimitiveTopology::NumTopologies]
static const SizeT MaxVertexIndexBuffers
Definition vkshaperenderer.h:68
IndexT diffuseColor
Definition vkshaperenderer.h:80
virtual ~VkShapeRenderer()
destructor
Definition vkshaperenderer.cc:49
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
Definition vkshaperenderer.cc:350
void DrawBufferedIndexedPrimitives(const CoreGraphics::CmdBufferId cmdBuf)
draw buffered indexed primtives
Definition vkshaperenderer.cc:427
void Open()
open the shape renderer
Definition vkshaperenderer.cc:58
static const int MaxVertexWidth
maximum size for primitive size (4 floats for position, 4 floats for color)
Definition vkshaperenderer.h:40
SizeT vertexBufferOffset
Definition vkshaperenderer.h:83
IndexT model
Definition vkshaperenderer.h:79
__DeclareClass(VkShapeRenderer)
struct Vulkan::VkShapeRenderer::IndexedDraws indexed[CoreGraphics::PrimitiveTopology::NumTopologies]
SizeT indexBufferOffset
Definition vkshaperenderer.h:84
Util::FixedArray< CoreGraphics::MeshId > meshes
Definition vkshaperenderer.h:65
void GrowVertexBuffer()
grow vertex buffer
Definition vkshaperenderer.cc:497
CoreGraphics::BufferId ibos[MaxVertexIndexBuffers]
Definition vkshaperenderer.h:69
CoreGraphics::VertexLayoutId vertexLayout
Definition vkshaperenderer.h:78
Util::Array< CoreGraphics::VertexComponent > comps
Definition vkshaperenderer.h:67
static const int MaxNumVertices
maximum amount of vertices to be rendered by drawprimitives and drawindexedprimitives
Definition vkshaperenderer.h:35
IndexT indexBufferActiveIndex
Definition vkshaperenderer.h:73
void DrawBufferedPrimitives(const CoreGraphics::CmdBufferId cmdBuf)
draw buffered primitives
Definition vkshaperenderer.cc:393
CoreGraphics::BufferId vbos[MaxVertexIndexBuffers]
Definition vkshaperenderer.h:70
VkShapeRenderer()
constructor
Definition vkshaperenderer.cc:30
IndexT vertexBufferActiveIndex
Definition vkshaperenderer.h:74
void DrawMesh(const CoreGraphics::CmdBufferId cmdBuf, const Math::mat4 &modelTransform, const CoreGraphics::MeshId mesh, const Math::vec4 &color, const float lineThickness)
draw debug mesh
Definition vkshaperenderer.cc:289
static const int MaxIndexWidth
maximum size for an index
Definition vkshaperenderer.h:42
Vulkan implementation of GPU acceleration structure.
Definition vkaccelerationstructure.cc:15
Definition commandbuffer.h:155
Definition vertexlayout.h:16
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 4D vector.
Definition vec4.h:24
Definition vkshaperenderer.h:87
Util::Array< float > lineThicknesses
Definition vkshaperenderer.h:93
Util::Array< Math::mat4 > transforms
Definition vkshaperenderer.h:89
Util::Array< CoreGraphics::PrimitiveGroup > primitives
Definition vkshaperenderer.h:88
Util::Array< uint64 > firstIndexOffset
Definition vkshaperenderer.h:91
Util::Array< CoreGraphics::IndexType::Code > indexType
Definition vkshaperenderer.h:92
Util::Array< uint64 > firstVertexOffset
Definition vkshaperenderer.h:90
Definition vkshaperenderer.h:97
Util::Array< uint64 > firstVertexOffset
Definition vkshaperenderer.h:100
Util::Array< CoreGraphics::PrimitiveGroup > primitives
Definition vkshaperenderer.h:98
Util::Array< Math::mat4 > transforms
Definition vkshaperenderer.h:99
Util::Array< float > lineThicknesses
Definition vkshaperenderer.h:101
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48