![]() |
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 > indicies) |
| Create vertex array object. | |
| void | buffer (const int vertex_count, std::span< unsigned int > indicies) |
| Create vertex array without uploading data. | |
| void | sub_buffer (const unsigned int index, std::span< Vertex > vertices) |
| Sub-buffer vertex array. | |
| 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.
|
noexcept |
Move constructor.
Definition at line 23 of file VertexArray.cpp.
| galaxy::VertexArray::~VertexArray | ( | ) |
Destructor.
Definition at line 54 of file VertexArray.cpp.
|
privatedelete |
Copy constructor.
|
noexcept |
Move assignment operator.
Definition at line 36 of file VertexArray.cpp.
| void galaxy::VertexArray::buffer | ( | std::span< Vertex > | vertices, |
| std::span< unsigned int > | indicies ) |
Create vertex array object.
| vertices | Vertices to assign. |
| indicies | Indices for vertex buffer. |
Definition at line 63 of file VertexArray.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::VertexArray::buffer | ( | const int | vertex_count, |
| std::span< unsigned int > | indicies ) |
Create vertex array without uploading data.
| vertex_count | Size of vertices. |
| indicies | Indices for vertex buffer. |
Definition at line 83 of file VertexArray.cpp.
Here is the call graph for this function:| void galaxy::VertexArray::sub_buffer | ( | const unsigned int | index, |
| std::span< Vertex > | vertices ) |
Sub-buffer vertex array.
| index | Offset to start at from initial vertices. 0 = first element. |
| vertices | Vertices to assign. |
Definition at line 103 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 108 of file VertexArray.cpp.
Here is the caller graph for this function:| void galaxy::VertexArray::unbind | ( | ) | const |
Unbind this vertex array.
Definition at line 113 of file VertexArray.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get the index count.
Definition at line 118 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 123 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 128 of file VertexArray.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get vertex array handle.
Definition at line 133 of file VertexArray.cpp.
Here is the caller graph for this function:
|
privatedelete |
Copy assignment operator.
|
private |
VAO object.
Definition at line 122 of file VertexArray.hpp.
|
private |
Vertex buffer.
Definition at line 127 of file VertexArray.hpp.