|
Blender V5.3
|
#include <gl_vertex_buffer.hh>
Inherits blender::gpu::VertBuf.
Public Member Functions | |
| void | bind () |
| void | update_sub (uint start, uint len, const void *data) override |
| void | copy_sub (VertBuf &source_buf, uint source_first_vertex, uint dest_first_vertex, uint vertex_len) override |
| Copy from part of source vertex buffer into the vertex buffer. | |
| void | read (void *data) const override |
| void | wrap_handle (uint64_t handle) override |
| Public Member Functions inherited from blender::gpu::VertBuf | |
| VertBuf () | |
| virtual | ~VertBuf () |
| void | init (const GPUVertFormat &format, GPUUsageType usage) |
| void | clear () |
| void | allocate (uint vert_len) |
| void | resize (uint vert_len) |
| void | upload () |
| size_t | size_alloc_get () const |
| size_t | size_used_get () const |
| void | reference_add () |
| void | reference_remove () |
| GPUUsageType | get_usage_type () const |
| template<typename T> | |
| MutableSpan< T > | data () |
Protected Member Functions | |
| void | acquire_data () override |
| void | resize_data () override |
| void | release_data () override |
| void | upload_data () override |
| void | bind_as_ssbo (uint binding) override |
| void | bind_as_texture (uint binding) override |
Friends | |
| class | GLTexture |
| class | GLStorageBuf |
Additional Inherited Members | |
| Static Public Member Functions inherited from blender::gpu::VertBuf | |
| template<typename FormatT> | |
| static VertBufPtr | from_size_with_format (const int size, GPUUsageType usage=GPU_USAGE_STATIC) |
| template<typename T> | |
| static VertBufPtr | from_size (const int size, GPUUsageType usage=GPU_USAGE_STATIC) |
| template<typename T> | |
| static VertBufPtr | from_span (const Span< T > data) |
| template<typename T> | |
| static VertBufPtr | from_varray (const VArray< T > &array) |
| template<typename T> | |
| static VertBufPtr | device_only (uint size) |
| Public Attributes inherited from blender::gpu::VertBuf | |
| GPUVertFormat | format = {} |
| uint | vertex_len = 0 |
| uint | vertex_alloc = 0 |
| GPUVertBufStatus | flag = GPU_VERTBUF_INVALID |
| GPUUsageType | extended_usage_ = GPU_USAGE_STATIC |
| Static Public Attributes inherited from blender::gpu::VertBuf | |
| static size_t | memory_usage = 0 |
| Protected Attributes inherited from blender::gpu::VertBuf | |
| uchar * | data_ = nullptr |
| GPUUsageType | usage_ = GPU_USAGE_STATIC |
Definition at line 19 of file gl_vertex_buffer.hh.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 17 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, blender::GPU_USAGE_DEVICE_ONLY, blender::MEM_new_array_uninitialized(), blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
Referenced by GLStorageBuf.
| void blender::gpu::GLVertBuf::bind | ( | ) |
Definition at line 59 of file gl_vertex_buffer.cc.
References blender::BLI_assert(), blender::ceil_to_multiple_ul(), blender::gpu::VertBuf::data_, blender::gpu::VertBuf::flag, blender::gpu::GLContext::get(), blender::GPU_USAGE_DEVICE_ONLY, blender::GPU_USAGE_STATIC, blender::GPU_VERTBUF_DATA_DIRTY, blender::GPU_VERTBUF_DATA_UPLOADED, blender::gpu::VertBuf::memory_usage, blender::gpu::VertBuf::size_used_get(), blender::gpu::to_gl(), and blender::gpu::VertBuf::usage_.
Referenced by bind_as_ssbo(), bind_as_texture(), blender::gpu::GLStorageBuf::copy_sub(), GLStorageBuf, blender::gpu::GLVertArray::update_bindings(), and upload_data().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 90 of file gl_vertex_buffer.cc.
References bind(), blender::BLI_assert(), blender::gpu::GLContext::bound_ssbo_slots, and blender::gpu::GLContext::get().
Referenced by GLStorageBuf.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 102 of file gl_vertex_buffer.cc.
References bind(), blender::BLI_assert(), blender::GPU_texture_bind(), and blender::GPU_texture_create_from_vertbuf().
Referenced by GLStorageBuf.
|
overridevirtual |
Copy from part of source vertex buffer into the vertex buffer.
| source_buf | source vertex buffer to copy data from. |
| source_first_vertex | starting vertex index to start copying the data from. |
| dest_first_vertex | starting vertex index to copy the data to. |
| vertex_len | the number of vertices to copy. |
Implements blender::gpu::VertBuf.
Definition at line 145 of file gl_vertex_buffer.cc.
References blender::BLI_assert(), BLI_assert_msg, blender::gpu::GLContext::direct_state_access_support, blender::gpu::VertBuf::format, blender::GPUVertFormat::stride, blender::gpu::VertBuf::VertBuf(), and blender::gpu::VertBuf::vertex_len.
Referenced by GLStorageBuf.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 112 of file gl_vertex_buffer.cc.
References blender::BLI_assert(), blender::gpu::VertBuf::data(), blender::result, and blender::gpu::VertBuf::size_used_get().
Referenced by GLStorageBuf.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 38 of file gl_vertex_buffer.cc.
References blender::gpu::GLContext::buffer_free(), blender::gpu::VertBuf::data_, GPU_TEXTURE_FREE_SAFE, and blender::gpu::VertBuf::memory_usage.
Referenced by GLStorageBuf.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 28 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, blender::GPU_USAGE_DEVICE_ONLY, MEM_realloc_uninitialized, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
Referenced by GLStorageBuf.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 140 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data(), and len().
Referenced by GLStorageBuf.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 54 of file gl_vertex_buffer.cc.
References bind().
Referenced by GLStorageBuf.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 120 of file gl_vertex_buffer.cc.
References blender::BLI_assert(), blender::gpu::VertBuf::flag, and blender::GPU_VERTBUF_DATA_UPLOADED.
Referenced by GLStorageBuf.
|
friend |
Definition at line 21 of file gl_vertex_buffer.hh.
References acquire_data(), bind(), bind_as_ssbo(), bind_as_texture(), copy_sub(), blender::gpu::VertBuf::data(), GLStorageBuf, len(), read(), release_data(), resize_data(), update_sub(), upload_data(), blender::gpu::VertBuf::VertBuf(), blender::gpu::VertBuf::vertex_len, and wrap_handle().
Referenced by GLStorageBuf.
|
friend |