diff options
Diffstat (limited to 'source/blender/gpu/GPU_index_buffer.h')
-rw-r--r-- | source/blender/gpu/GPU_index_buffer.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_index_buffer.h b/source/blender/gpu/GPU_index_buffer.h index e4f1709173e..0f83e590597 100644 --- a/source/blender/gpu/GPU_index_buffer.h +++ b/source/blender/gpu/GPU_index_buffer.h @@ -53,6 +53,8 @@ void GPU_indexbuf_init_ex(GPUIndexBufBuilder *, GPUPrimType, uint index_len, uin void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len); GPUIndexBuf *GPU_indexbuf_build_on_device(uint index_len); +void GPU_indexbuf_init_build_on_device(GPUIndexBuf *elem, uint index_len); + /* * Thread safe. * @@ -82,6 +84,16 @@ void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *); void GPU_indexbuf_bind_as_ssbo(GPUIndexBuf *elem, int binding); +/* Upload data to the GPU (if not built on the device) and bind the buffer to its default target. + */ +void GPU_indexbuf_use(GPUIndexBuf *elem); + +/* Partially update the GPUIndexBuf which was already sent to the device, or built directly on the + * device. The data needs to be compatible with potential compression applied to the original + * indices when the index buffer was built, i.e., if the data was compressed to use shorts instead + * of ints, shorts should passed here. */ +void GPU_indexbuf_update_sub(GPUIndexBuf *elem, uint start, uint len, const void *data); + /* Create a sub-range of an existing index-buffer. */ GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length); void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, |