Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_index_buffer.h
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
| /* Create a subrange of an existing indexbuffer. */ | /* Create a subrange of an existing indexbuffer. */ | ||||
| GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length); | GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length); | ||||
| void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, | void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, | ||||
| GPUIndexBuf *elem_src, | GPUIndexBuf *elem_src, | ||||
| uint start, | uint start, | ||||
| uint length); | uint length); | ||||
| void GPU_indexbuf_discard(GPUIndexBuf *); | void GPU_indexbuf_discard(GPUIndexBuf *elem); | ||||
| bool GPU_indexbuf_is_init(GPUIndexBuf *ibo); | bool GPU_indexbuf_is_init(GPUIndexBuf *elem); | ||||
| int GPU_indexbuf_primitive_len(GPUPrimType prim_type); | int GPU_indexbuf_primitive_len(GPUPrimType prim_type); | ||||
| /* Macros */ | /* Macros */ | ||||
| #define GPU_INDEXBUF_DISCARD_SAFE(elem) \ | #define GPU_INDEXBUF_DISCARD_SAFE(elem) \ | ||||
| do { \ | do { \ | ||||
| if (elem != NULL) { \ | if (elem != NULL) { \ | ||||
| GPU_indexbuf_discard(elem); \ | GPU_indexbuf_discard(elem); \ | ||||
| elem = NULL; \ | elem = NULL; \ | ||||
| } \ | } \ | ||||
| } while (0) | } while (0) | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||