![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
A group of vertices for multiple renderables batched together. More...
#include <VertexBatch.hpp>
Collaboration diagram for galaxy::VertexBatch:Public Member Functions | |
| VertexBatch (const int max, const int vertex_count, const std::vector< unsigned int > &indices) noexcept | |
| Constructor. | |
| VertexBatch (VertexBatch &&) noexcept | |
| Move constructor. | |
| VertexBatch & | operator= (VertexBatch &&) noexcept |
| Move assignment operator. | |
| ~VertexBatch () noexcept | |
| Destructor. | |
| void | prepare () noexcept |
| Sets up counters to begin pushing vertices. | |
| void | push (const std::vector< Vertex > &vertices) noexcept |
| Add vertex and index data to batch. | |
| void | flush () noexcept |
| Copy all data to GPU. | |
| void | bind () const noexcept |
| Bind this batchs vertex array object. | |
| int | count () const noexcept |
| Get the index count. | |
| void * | offset () noexcept |
| Gets index offset. | |
| VertexArray & | vao () noexcept |
| Gets internal VAO. | |
Private Member Functions | |
| VertexBatch ()=delete | |
| Constructor. | |
| VertexBatch (const VertexBatch &)=delete | |
| Copy constructor. | |
| VertexBatch & | operator= (const VertexBatch &)=delete |
| Copy assignment operator. | |
Private Attributes | |
| int | m_vertex_count |
| Amount of vertices to flush. | |
| int | m_index_count |
| Amount of indices per renderable. | |
| int | m_count |
| Amount of renderables to draw. | |
| int | m_vertex_length |
| Total number of vertices. | |
| int | m_index_length |
| Total number of indices. | |
| std::vector< Vertex > | m_vertices |
| CPU side reserved vertices. | |
| VertexArray | m_vao |
| VAO object for GPU data. | |
A group of vertices for multiple renderables batched together.
Call: prepare() -> push() -> flush() -> bind(), and repeat.
Definition at line 20 of file VertexBatch.hpp.
|
noexcept |
Constructor.
| max | Max renderable objects. |
| vertex_count | Number of vertices in a single object. |
| indices | Default indices to use for each renderable. |
Definition at line 12 of file VertexBatch.cpp.
|
noexcept |
Move constructor.
Definition at line 43 of file VertexBatch.cpp.
|
noexcept |
Destructor.
Definition at line 70 of file VertexBatch.cpp.
|
privatedelete |
Constructor.
|
privatedelete |
Copy constructor.
Deleted.
|
noexcept |
Move assignment operator.
Definition at line 54 of file VertexBatch.cpp.
|
noexcept |
Sets up counters to begin pushing vertices.
Definition at line 74 of file VertexBatch.cpp.
Here is the caller graph for this function:
|
noexcept |
Add vertex and index data to batch.
| vertices | List of vertices. |
Definition at line 80 of file VertexBatch.cpp.
Here is the caller graph for this function:
|
noexcept |
Copy all data to GPU.
Definition at line 93 of file VertexBatch.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
noexcept |
Bind this batchs vertex array object.
Definition at line 98 of file VertexBatch.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get the index count.
Definition at line 103 of file VertexBatch.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Gets index offset.
Definition at line 108 of file VertexBatch.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
nodiscardnoexcept |
Gets internal VAO.
Definition at line 113 of file VertexBatch.cpp.
Here is the caller graph for this function:
|
privatedelete |
Copy assignment operator.
Deleted.
|
private |
Amount of vertices to flush.
Definition at line 117 of file VertexBatch.hpp.
|
private |
Amount of indices per renderable.
Definition at line 122 of file VertexBatch.hpp.
|
private |
Amount of renderables to draw.
Definition at line 127 of file VertexBatch.hpp.
|
private |
Total number of vertices.
Definition at line 132 of file VertexBatch.hpp.
|
private |
Total number of indices.
Definition at line 137 of file VertexBatch.hpp.
|
private |
CPU side reserved vertices.
Definition at line 142 of file VertexBatch.hpp.
|
private |
VAO object for GPU data.
Definition at line 147 of file VertexBatch.hpp.