42 if (tri_first_index == -1) {
50 int tri_len =
f->
len - 2;
51 for (
int offs = 0; offs < tri_len; offs++) {
52 BMLoop **elt = looptris[tri_first_index_real + offs];
53 int tri_index = tri_first_index + offs;
68 if (tri_first_index == -1) {
76 for (
int offs = 0; offs < tri_len; offs++) {
78 int tri_index = tri_first_index + offs;
96 for (
int i = 0; i < mr->
mat_len; i++) {
104 const int start = mat_start * 3;
105 const int len = mat_tri_len * 3;
107 mat_start += mat_tri_len;
123 for (
int i = 0; i < cache->
mat_len; i++) {
129 const int start = subdiv_cache->
mat_start[i] * 6;
213 for (
int i = 0; i < mr->
mat_len; i++) {
MINLINE int poly_to_tri_count(int poly_count, int corner_count)
struct GPUIndexBufBuilder GPUIndexBufBuilder
struct GPUIndexBuf GPUIndexBuf
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
void GPU_indexbuf_init_build_on_device(GPUIndexBuf *elem, uint index_len)
void GPU_indexbuf_join(GPUIndexBufBuilder *builder, const GPUIndexBufBuilder *builder_from)
void GPU_indexbuf_set_tri_verts(GPUIndexBufBuilder *builder, uint elem, uint v1, uint v2, uint v3)
void GPU_indexbuf_set_tri_restart(GPUIndexBufBuilder *builder, uint elem)
GPUIndexBuf * GPU_indexbuf_calloc(void)
void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem, GPUIndexBuf *elem_src, uint start, uint length)
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *)
Read Guarded memory(de)allocation.
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
void draw_subdiv_build_tris_buffer(const DRWSubdivCache *cache, GPUIndexBuf *subdiv_tris, const int material_count)
ccl_global float * buffer
static void extract_tris_single_mat_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *UNUSED(ibo), void *tls_data)
static void extract_tris_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), MeshBatchCache *cache, void *buffer, void *UNUSED(data))
static void extract_tris_single_mat_iter_looptri_mesh(const MeshRenderData *mr, const MLoopTri *mlt, const int mlt_index, void *_data)
constexpr MeshExtract create_extractor_tris()
static void extract_tris_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int mp_index, void *_data)
static void extract_tris_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int f_index, void *_data)
static void extract_tris_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *UNUSED(ibo), void *tls_data)
static void extract_tris_single_mat_finish(const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *_data)
static void extract_tris_single_mat_iter_looptri_bm(const MeshRenderData *UNUSED(mr), BMLoop **elt, const int elt_index, void *_data)
static void extract_tris_finish(const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *_data)
constexpr MeshExtract create_extractor_tris_single_mat()
static void extract_tris_mat_task_reduce(void *_userdata_to, void *_userdata_from)
struct BMLoop *(* looptris)[3]
uint num_subdiv_triangles
GPUIndexBuf ** tris_per_mat
struct MeshRenderData::@319 poly_sorted