|
Blender V4.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 | 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 () |
| VertBuf * | duplicate () |
| 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 | duplicate_data (VertBuf *dst) override |
| void | bind_as_ssbo (uint binding) override |
| void | bind_as_texture (uint binding) override |
Friends | |
| class | GLTexture |
| class | GLShader |
| class | GLStorageBuf |
Additional Inherited Members | |
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 20 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_, GPU_USAGE_DEVICE_ONLY, MEM_mallocN, MEM_SAFE_FREE, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
| void blender::gpu::GLVertBuf::bind | ( | ) |
Definition at line 84 of file gl_vertex_buffer.cc.
References BLI_assert, ceil_to_multiple_ul(), blender::gpu::VertBuf::data_, blender::gpu::VertBuf::flag, blender::gpu::GLContext::get(), GPU_USAGE_DEVICE_ONLY, GPU_USAGE_STATIC, GPU_VERTBUF_DATA_DIRTY, GPU_VERTBUF_DATA_UPLOADED, MEM_SAFE_FREE, 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(), blender::gpu::GLShader::transform_feedback_enable(), blender::gpu::GLVertArray::update_bindings(), and upload_data().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 114 of file gl_vertex_buffer.cc.
References bind(), BLI_assert, blender::gpu::GLContext::bound_ssbo_slots, and blender::gpu::GLContext::get().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 126 of file gl_vertex_buffer.cc.
References bind(), BLI_assert, GPU_texture_bind(), and GPU_texture_create_from_vertbuf().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 53 of file gl_vertex_buffer.cc.
References BLI_assert, blender::gpu::VertBuf::data_, blender::gpu::GLContext::get(), MEM_dupallocN, blender::gpu::VertBuf::memory_usage, blender::gpu::VertBuf::size_used_get(), blender::gpu::to_gl(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 136 of file gl_vertex_buffer.cc.
References BLI_assert, and blender::gpu::VertBuf::size_used_get().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 37 of file gl_vertex_buffer.cc.
References blender::gpu::GLContext::buf_free(), blender::gpu::VertBuf::data_, GPU_TEXTURE_FREE_SAFE, MEM_SAFE_FREE, and blender::gpu::VertBuf::memory_usage.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 28 of file gl_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, GPU_USAGE_DEVICE_ONLY, MEM_reallocN, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 164 of file gl_vertex_buffer.cc.
References len.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 79 of file gl_vertex_buffer.cc.
References bind().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 144 of file gl_vertex_buffer.cc.
References BLI_assert, blender::gpu::VertBuf::flag, and GPU_VERTBUF_DATA_UPLOADED.
|
friend |
Definition at line 22 of file gl_vertex_buffer.hh.
|
friend |
Definition at line 23 of file gl_vertex_buffer.hh.
|
friend |
Definition at line 21 of file gl_vertex_buffer.hh.