8#ifndef GALAXY_GRAPHICS_GL_VERTEXARRAY_HPP_
9#define GALAXY_GRAPHICS_GL_VERTEXARRAY_HPP_
47 void buffer(std::span<Vertex>
vertices, std::span<unsigned int> indicies);
55 void buffer(
const int vertex_count, std::span<unsigned int> indicies);
81 int count()
const noexcept;
105 unsigned int id()
const noexcept;
thread_local const float vertices[]
Video.cpp galaxy.
Abstraction for OpenGL vertex array objects.
VertexArray()
Constructor.
void sub_buffer(const unsigned int index, std::span< Vertex > vertices)
Sub-buffer vertex array.
void bind() const
Bind this vertex array.
~VertexArray()
Destructor.
VertexBuffer m_vbo
Vertex buffer.
VertexArray(const VertexArray &)=delete
Copy constructor.
VertexBuffer & vbo() noexcept
Get vertex buffer.
int count() const noexcept
Get the index count.
void buffer(std::span< Vertex > vertices, std::span< unsigned int > indicies)
Create vertex array object.
VertexArray & operator=(VertexArray &&) noexcept
Move assignment operator.
void unbind() const
Unbind this vertex array.
unsigned int m_id
VAO object.
unsigned int id() const noexcept
Get vertex array handle.
void * offset() noexcept
Gets index offset.
VertexArray & operator=(const VertexArray &)=delete
Copy assignment operator.
Abstraction for OpenGL vertex buffer objects.