![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Abstraction for OpenGL vertex array objects. More...
#include <VertexArray.hpp>
Collaboration diagram for galaxy::VertexArray:Public Member Functions | |
| VertexArray () | |
| Constructor. | |
| VertexArray (VertexArray &&) noexcept | |
| Move constructor. | |
| VertexArray & | operator= (VertexArray &&) noexcept |
| Move assignment operator. | |
| ~VertexArray () | |
| Destructor. | |
| void | buffer (std::span< Vertex > vertices, std::span< unsigned int > indices) |
| Create vertex buffer. | |
| void | reserve (const int vertex_count, const int index_count) |
| Create vertex buffer without uploading. | |
| void | sub_buffer (const unsigned int vi, const int vertex_size, const std::span< Vertex > vertices, const unsigned int ei, const int index_size, std::span< unsigned int > indices) |
| Sub-buffer vertex buffer. | |
| void | sub_buffer_vertices (const unsigned int vi, const int vertex_size, const std::span< Vertex > vertices) const |
| Sub-buffer vertex buffer. | |
| void | sub_buffer_indices (const unsigned int ei, const int index_size, std::span< unsigned int > indices) const |
| Sub-buffer element/index buffer. | |
| void | erase (const unsigned int vi, const int vertex_count, const unsigned int ei, const int index_count) |
| Erase a specfic segment of data. | |
| void | clear () |
| Clear buffer data. | |
| void | bind () const |
| Bind this vertex array. | |
| void | unbind () const |
| Unbind this vertex array. | |
| int | count () const noexcept |
| Get the index count. | |
| void * | offset () noexcept |
| Gets index offset. | |
| VertexBuffer & | vbo () noexcept |
| Get vertex buffer. | |
| unsigned int | id () const noexcept |
| Get vertex array handle. | |
Private Member Functions | |
| VertexArray (const VertexArray &)=delete | |
| Copy constructor. | |
| VertexArray & | operator= (const VertexArray &)=delete |
| Copy assignment operator. | |
Private Attributes | |
| unsigned int | m_id |
| VAO object. | |
| VertexBuffer | m_vbo |
| Vertex buffer. | |
Abstraction for OpenGL vertex array objects.
Definition at line 18 of file VertexArray.hpp.
| galaxy::VertexArray::VertexArray | ( | ) |
Constructor.
Definition at line 17 of file VertexArray.cpp.
Here is the call graph for this function:
|
noexcept |
Move constructor.
Definition at line 44 of file VertexArray.cpp.
| galaxy::VertexArray::~VertexArray | ( | ) |
Destructor.
Definition at line 75 of file VertexArray.cpp.
|
privatedelete |
Copy constructor.
|
noexcept |
Move assignment operator.
Definition at line 57 of file VertexArray.cpp.
| void galaxy::VertexArray::buffer | ( | std::span< Vertex > | vertices, |
| std::span< unsigned int > | indices ) |
Create vertex buffer.
| vertices | Vertices to assign. |
| indices | Indices for vertex buffer. |
Definition at line 83 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::reserve | ( | const int | vertex_count, |
| const int | index_count ) |
Create vertex buffer without uploading.
| vertex_count | Number of vertices. |
| index_count | Number of indices. |
Definition at line 88 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::sub_buffer | ( | const unsigned int | vi, |
| const int | vertex_size, | ||
| const std::span< Vertex > | vertices, | ||
| const unsigned int | ei, | ||
| const int | index_size, | ||
| std::span< unsigned int > | indices ) |
Sub-buffer vertex buffer.
| vi | Offset to start at from initial vertices. 0 = first. |
| vertex_size | Amount of vertex data to sub buffer. |
| vertices | Vertices to assign. |
| ei | Offset to start at from initial indices. 0 = first. |
| index_size | Amount of index data to sub buffer. |
| indices | Indices to assign. |
Definition at line 93 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::sub_buffer_vertices | ( | const unsigned int | vi, |
| const int | vertex_size, | ||
| const std::span< Vertex > | vertices ) const |
Sub-buffer vertex buffer.
| vi | Offset to start at from initial vertices. 0 = first. |
| vertex_size | Amount of vertex data to sub buffer. |
| vertices | Vertices to assign. |
Definition at line 105 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::sub_buffer_indices | ( | const unsigned int | ei, |
| const int | index_size, | ||
| std::span< unsigned int > | indices ) const |
Sub-buffer element/index buffer.
| ei | Offset to start at from initial indices. 0 = first. |
| index_size | Amount of index data to sub buffer. |
| indices | Indices to assign. |
Definition at line 110 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::erase | ( | const unsigned int | vi, |
| const int | vertex_count, | ||
| const unsigned int | ei, | ||
| const int | index_count ) |
Erase a specfic segment of data.
| vi | Offset to start at from initial vertices. 0 = first. |
| vertex_count | Number of vertices. |
| ei | Offset to start at from initial indices. 0 = first. |
| index_count | Number of indices. |
Definition at line 115 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::clear | ( | ) |
Clear buffer data.
Definition at line 120 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::bind | ( | ) | const |
Bind this vertex array.
Definition at line 125 of file VertexArray.cpp.
Here is the caller graph for this function:| void galaxy::VertexArray::unbind | ( | ) | const |
Unbind this vertex array.
Definition at line 130 of file VertexArray.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get the index count.
Definition at line 135 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
nodiscardnoexcept |
Gets index offset.
Definition at line 140 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get vertex buffer.
Definition at line 145 of file VertexArray.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get vertex array handle.
Definition at line 150 of file VertexArray.cpp.
Here is the caller graph for this function:
|
privatedelete |
Copy assignment operator.
|
private |
VAO object.
Definition at line 160 of file VertexArray.hpp.
|
private |
Vertex buffer.
Definition at line 165 of file VertexArray.hpp.