#include <VertexArray.hpp>
An array of smk::Vertex moved to the GPU memory. This represent a set of triangles to be drawn by the GPU. More...
An array of smk::Vertex moved to the GPU memory. This represent a set of triangles to be drawn by the GPU.
This class is movable and copyable. It is refcounted. The GPU data is automatically released when the last smk::VertextArray is deleted.
Definition at line 20 of file VertexArray.hpp.
Public Member Functions | |
VertexArray (const std::vector< Vertex2D > &array) | |
VertexArray (const std::vector< Vertex3D > &array) | |
void | Bind () const |
void | UnBind () const |
VertexArray (VertexArray &&) noexcept | |
VertexArray (const VertexArray &) | |
VertexArray & | operator= (VertexArray &&) noexcept |
VertexArray & | operator= (const VertexArray &) |
bool | operator== (const smk::VertexArray &) const |
bool | operator!= (const smk::VertexArray &) const |
size_t | size () const |
The size of the GPU array. More... | |
smk::VertexArray::VertexArray | ( | const std::vector< Vertex2D > & | array | ) |
Constructor for a vector of 2D vertices.
array | A set of 2D triangles. |
Definition at line 76 of file VertexArray.cpp.
smk::VertexArray::VertexArray | ( | const std::vector< Vertex3D > & | array | ) |
Constructor for a vector of 3D vertices.
array | A set of 3D triangles. |
Definition at line 84 of file VertexArray.cpp.
smk::VertexArray::~VertexArray | ( | ) |
Definition at line 23 of file VertexArray.cpp.
|
noexcept |
Definition at line 40 of file VertexArray.cpp.
smk::VertexArray::VertexArray | ( | const VertexArray & | other | ) |
Definition at line 36 of file VertexArray.cpp.
void smk::VertexArray::Bind | ( | ) | const |
Definition at line 27 of file VertexArray.cpp.
bool smk::VertexArray::operator!= | ( | const smk::VertexArray & | other | ) | const |
Definition at line 100 of file VertexArray.cpp.
VertexArray & smk::VertexArray::operator= | ( | const VertexArray & | other | ) |
Definition at line 44 of file VertexArray.cpp.
|
noexcept |
Definition at line 66 of file VertexArray.cpp.
bool smk::VertexArray::operator== | ( | const smk::VertexArray & | other | ) | const |
Definition at line 96 of file VertexArray.cpp.
size_t smk::VertexArray::size | ( | ) | const |
The size of the GPU array.
Definition at line 92 of file VertexArray.cpp.
void smk::VertexArray::UnBind | ( | ) | const |
Definition at line 32 of file VertexArray.cpp.