8#ifndef GALAXY_GRAPHICS_GL_VERTEXARRAY_HPP_
9#define GALAXY_GRAPHICS_GL_VERTEXARRAY_HPP_
50 void buffer(std::span<Vertex>
vertices, std::span<unsigned int> indicies);
58 void buffer(
const int vertex_count, std::span<unsigned int> indicies);
123 unsigned int id()
const;
thread_local const float vertices[]
Video.cpp galaxy.
Abstraction for OpenGL vertex buffer objects.
Abstraction for OpenGL vertex array objects.
VertexArray & operator=(VertexArray &&)
Move assignment operator.
VertexBuffer m_vbo
Vertex buffer.
~VertexArray()
Destructor.
int m_instances
Number of instances.
void buffer(std::span< Vertex > vertices, std::span< unsigned int > indicies)
Create vertex array object.
VertexArray & operator=(const VertexArray &)=delete
Copy assignment operator.
VertexArray(const VertexArray &)=delete
Copy constructor.
unsigned int m_id
VAO object.
int count() const
Get the index count.
void * offset()
Gets index offset.
int instances() const
Number of instances to render.
void unbind()
Unbind this vertex array.
void set_instanced(const InstanceBuffer &ib)
Set this vertex array to use a specific instance buffer.
void bind()
Bind this vertex array.
void sub_buffer(const unsigned int index, std::span< Vertex > vertices)
Sub-buffer vertex array.
VertexBuffer & vbo()
Get vertex buffer.
VertexArray()
Constructor.
unsigned int id() const
Get vertex array handle.
Abstraction for OpenGL vertex buffer objects.