|
Blender
V2.93
|
#include <gpu_index_buffer_private.hh>
Inherited by blender::gpu::GLIndexBuf.
Public Member Functions | |
| IndexBuf () | |
| virtual | ~IndexBuf () |
| void | init (uint indices_len, uint32_t *indices) |
| void | init_subrange (IndexBuf *elem_src, uint start, uint length) |
| uint32_t | index_len_get (void) const |
| size_t | size_get (void) |
| bool | is_init (void) const |
Protected Attributes | |
| GPUIndexBufType | index_type_ = GPU_INDEX_U32 |
| uint32_t | index_start_ = 0 |
| uint32_t | index_len_ = 0 |
| uint32_t | index_base_ = 0 |
| bool | is_init_ = false |
| bool | is_subrange_ = false |
| union { | |
| void * data_ = nullptr | |
| IndexBuf * src_ | |
| }; | |
Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 50 of file gpu_index_buffer_private.hh.
|
inline |
Definition at line 73 of file gpu_index_buffer_private.hh.
|
virtual |
Definition at line 215 of file gpu_index_buffer.cc.
References data_, is_subrange_, and MEM_SAFE_FREE.
|
inline |
Definition at line 79 of file gpu_index_buffer_private.hh.
References index_len_.
Definition at line 222 of file gpu_index_buffer.cc.
References data_, blender::gpu::GPU_INDEX_U16, index_len_, index_start_, index_type_, indices, and is_init_.
Definition at line 244 of file gpu_index_buffer.cc.
References BLI_assert, index_base_, index_len_, index_start_, index_type_, is_init_, is_subrange_, length(), and src_.
|
inline |
Definition at line 89 of file gpu_index_buffer_private.hh.
References is_init_.
|
inline |
Definition at line 84 of file gpu_index_buffer_private.hh.
References index_len_, index_type_, and blender::gpu::to_bytesize().
Referenced by blender::gpu::GLIndexBuf::bind().
| union { ... } |
| void* blender::gpu::IndexBuf::data_ = nullptr |
Mapped buffer data. non-NULL indicates not yet sent to VRAM.
Definition at line 67 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLIndexBuf::bind(), init(), and ~IndexBuf().
|
protected |
Base index: Added to all indices after fetching. Allows index compression.
Definition at line 59 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLDrawList::append(), blender::gpu::GLBatch::draw(), and init_subrange().
|
protected |
Number of indices to render.
Definition at line 57 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLDrawList::append(), index_len_get(), init(), init_subrange(), and size_get().
|
protected |
Offset in this buffer to the first index to render. Is 0 if not a subrange.
Definition at line 55 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLDrawList::append(), init(), init_subrange(), and blender::gpu::GLIndexBuf::offset_ptr().
|
protected |
Type of indices used inside this buffer.
Definition at line 53 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLBatch::draw(), init(), init_subrange(), blender::gpu::GLIndexBuf::offset_ptr(), blender::gpu::GLIndexBuf::restart_index(), size_get(), and blender::gpu::GLDrawList::submit().
|
protected |
Bookkeeping.
Definition at line 61 of file gpu_index_buffer_private.hh.
Referenced by init(), init_subrange(), and is_init().
|
protected |
Is this object only a reference to a subrange of another IndexBuf.
Definition at line 63 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLIndexBuf::bind(), init_subrange(), and ~IndexBuf().
| IndexBuf* blender::gpu::IndexBuf::src_ |
If is_subrange is true, this is the source index buffer.
Definition at line 69 of file gpu_index_buffer_private.hh.
Referenced by blender::gpu::GLIndexBuf::bind(), and init_subrange().