|
Blender V5.3
|
#include <gpu_vertex_buffer_wrapper.hh>
Public Member Functions | |
| GPUVertexBuffer (gpu::VertBuf &gpu_vertex_buffer, int element_count, bool use_update_sub) | |
| ~GPUVertexBuffer () | |
| Destructor. | |
| void | UpdateData (const float *src, int start_vertex, int num_vertices, void *device_context=NULL) |
| int | GetNumVertices () const |
| Returns how many vertices allocated in this vertex buffer. | |
| gpu::VertBuf * | get_vertex_buffer () |
Static Public Member Functions | |
| static GPUVertexBuffer * | Create (int element_count, int vertex_len, void *device_context=nullptr) |
GLVertexBuffer compatible API wrapped around a blender::gpu::VertBuf
The blender::gpu::VertBuf is owned by the wrapper. Vertex buffer is used as its API is able to wrap around SSBOs as well.
Definition at line 18 of file gpu_vertex_buffer_wrapper.hh.
|
inline |
Definition at line 28 of file gpu_vertex_buffer_wrapper.hh.
Referenced by Create().
|
inline |
Destructor.
Definition at line 80 of file gpu_vertex_buffer_wrapper.hh.
References blender::GPU_vertbuf_discard().
|
inlinestatic |
Create a new gpu::VertBuf wrapped in a GPUVertexBuffer.
| element_count | Number of elements per vertex |
| vertex_len | Number of vertices |
| device_context | Unused. |
Definition at line 43 of file gpu_vertex_buffer_wrapper.hh.
References blender::gpu::shader::metadata::assert, blender::GPU_backend_get_type(), blender::GPU_BACKEND_VULKAN, blender::GPU_USAGE_DYNAMIC, blender::GPU_vertbuf_calloc(), blender::GPU_vertbuf_create_with_format_ex(), blender::GPU_vertbuf_data_alloc(), blender::GPU_vertbuf_init_build_on_device(), blender::GPU_vertformat_attr_add(), blender::GPU_vertformat_clear(), and GPUVertexBuffer().
|
inline |
Definition at line 113 of file gpu_vertex_buffer_wrapper.hh.
Referenced by blender::opensubdiv::GpuEvalOutput::get_face_varying_source_buf(), blender::opensubdiv::GpuEvalOutput::get_source_buf(), and blender::opensubdiv::GpuEvalOutput::get_source_data_buf().
|
inline |
Returns how many vertices allocated in this vertex buffer.
Definition at line 108 of file gpu_vertex_buffer_wrapper.hh.
References blender::GPU_vertbuf_get_vertex_len().
|
inline |
This method is meant to be used in client code in order to provide coarse vertices data to Osd.
Definition at line 87 of file gpu_vertex_buffer_wrapper.hh.
References blender::MutableSpan< T >::data(), blender::MutableSpan< T >::drop_front(), float, blender::GPU_vertbuf_tag_dirty(), blender::GPU_vertbuf_update_sub(), and blender::GPU_vertbuf_use().