|
gdk-graphics
1b6d84e044c2c953fd7c9501e628a67e80f4da0d
|
#include <batch_model.h>
Public Member Functions | |
| size_t | write_to_buffer (size_t vertexDataIndex, const graphics_vector3_type &aPos, const graphics_vector3_type &aRot={}, const graphics_vector3_type &aScale={1}) |
| void | rewrite_buffer_at (size_t BufferIndex, size_t vertexDataIndex, const graphics_vector3_type &pos, const graphics_vector3_type &rot, const graphics_vector3_type &sca={1}) |
| throws if the new data goes out of bounds of the buffer | |
| vertex_data::interleaved_data_view | view_to_interleaved_data () |
| gets a view to the buffer | |
| void | clear_buffer () |
| erase all vertex data in the buffer | |
| void | update_model () |
| clear the model's vertex data then upload the buffered data to the model | |
| batch_model (std::shared_ptr< gdk::graphics::context > pContext, std::vector< vertex_data > data) | |
| rewrite a subset of model's vertex data with the buffer range specified More... | |
| std::shared_ptr< gdk::model > | model () |
| gets the model | |
the transformed vertex data of many separate objects. these objects could be separate instances of the same model or instances of many different models, the only restrictions are: the vertex formats must match they must all use the same material TODO: add a max_buffer_vertex_count, optional try_write_to_buffer, optional points to the head of the data just added to the buffer, so you can replace a section, returns nullptr if the vertex count would exceed the max
| gdk::batch_model::batch_model | ( | std::shared_ptr< gdk::graphics::context > | pContext, |
| std::vector< vertex_data > | data | ||
| ) |
rewrite a subset of model's vertex data with the buffer range specified
throw is no a_Position throw is a_Postion does not have 3 components
| size_t gdk::batch_model::write_to_buffer | ( | size_t | vertexDataIndex, |
| const graphics_vector3_type & | aPos, | ||
| const graphics_vector3_type & | aRot = {}, |
||
| const graphics_vector3_type & | aScale = {1} |
||
| ) |
update buffer at location returns index into the buffer where the written data starts
1.8.13