1 #ifndef LXGUI_GUI_GL_VERTEX_CACHE_HPP
2 #define LXGUI_GUI_GL_VERTEX_CACHE_HPP
4 #include "lxgui/gui_vertex_cache.hpp"
5 #include "lxgui/utils.hpp"
54 void update_indices(
const std::uint32_t* vertex_indices, std::size_t num_indices);
74 void update(
const vertex* vertex_data, std::size_t num_vertex)
override;
84 std::size_t current_size_vertex_ = 0u;
85 std::size_t current_size_index_ = 0u;
86 std::size_t current_capacity_vertex_ = 0u;
87 std::size_t current_capacity_index_ = 0u;
88 std::uint32_t vertex_array_ = std::numeric_limits<std::uint32_t>::max();
89 std::uint32_t vertex_buffer_ = std::numeric_limits<std::uint32_t>::max();
90 std::uint32_t index_buffer_ = std::numeric_limits<std::uint32_t>::max();
An object representing cached vertex data on the GPU.
void render() const
Renders the cache.
void update_data(const vertex *vertex_data, std::size_t num_vertex)
Update the data stored in the cache, reusing existing indices.
void update(const vertex *vertex_data, std::size_t num_vertex) override
Update the data stored in the cache to form new triangles.
vertex_cache(type t)
Constructor.
void update_indices(const std::uint32_t *vertex_indices, std::size_t num_indices)
Update the indices stored in the cache, reusing existing data.
void update_indices_if_grow(const std::uint32_t *vertex_indices, std::size_t num_indices)
Update the indices stored in the cache, but only if the current index cache is smaller.
~vertex_cache() override
Destructor.
An object representing cached vertex data on the GPU.
type
The type of vertex data contained in a vertex_cache.
Holds position, texture coordinate, and color information for drawing.