gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
batch_modeler.h
1// © Joseph Cameron - All Rights Reserved
2
3#ifndef GDK_BATCH_MODELER_H
4#define GDK_BATCH_MODELER_H
5
6#include <gdk/graphics_context.h>
7#include <gdk/graphics_types.h>
8#include <gdk/model_data.h>
9
10namespace gdk {
13 class batch_modeler final {
14 public:
16 const_model_ptr_type model() const;
17
19 const_material_ptr_type material() const;
20
22 size_t vertex_count() const;
23
25 void push_back(const model_data &data);
26
28 void upload();
29
30 batch_modeler(context_ptr_type aGraphics, material_ptr_type aMaterial);
31
32 private:
33 material_ptr_type m_pMaterial;
34 model_data m_BatchData = {};
35 model_ptr_type m_pModel;
36 };
37}
38
39#endif
40
void upload()
upload the batch data to the model and clear the batch
const_model_ptr_type model() const
get the model, contains the uploaded model data for the batch
size_t vertex_count() const
get the number of vertices in the current buffer
void push_back(const model_data &data)
add model data to the batch
const_material_ptr_type material() const
get the material, used to render the model
vertex data stored in system memory.
Definition model_data.h:22