le2d v0.4.3
2D game engine framework
 
Loading...
Searching...
No Matches
vertex_array.hpp
Go to the documentation of this file.
1#pragma once
2#include <le2d/vertex.hpp>
3#include <cstdint>
4#include <span>
5#include <vector>
6
7namespace le {
9struct VertexArray {
10 std::vector<Vertex> vertices{};
11 std::vector<std::uint32_t> indices{};
12
13 void reserve(std::size_t vertex_count, std::size_t index_count);
14 void clear();
15 auto append(std::span<Vertex const> vertices, std::span<std::uint32_t const> indices) -> VertexArray&;
16};
17} // namespace le
Definition animation.hpp:8
Drawable vertex array.
Definition vertex_array.hpp:9
void reserve(std::size_t vertex_count, std::size_t index_count)
std::vector< Vertex > vertices
Definition vertex_array.hpp:10
auto append(std::span< Vertex const > vertices, std::span< std::uint32_t const > indices) -> VertexArray &
std::vector< std::uint32_t > indices
Definition vertex_array.hpp:11