Add tessellation data to DerivedMesh (LoopTri)

This stores loop indices into the loop array giving easier acess
to data such as vertex-colors and UV's,
removing the need to store an MFace duplicate of custom-data.

This doesn't yet move all internal code from MFace to LoopTri just yet.

Only applies to:
- opengl drawing
- sculpting (pbvh)
- vertex/weight paint

Thanks to @psy-fi for review, fixes and improvements to drawing!
This commit is contained in:
2015-07-17 03:36:03 +10:00
parent c8f6313487
commit 595a491e63
22 changed files with 1106 additions and 1015 deletions

View File

@@ -212,9 +212,12 @@ void GPU_interleaved_attrib_unbind(void);
typedef struct GPU_PBVH_Buffers GPU_PBVH_Buffers;
/* build */
GPU_PBVH_Buffers *GPU_build_mesh_pbvh_buffers(const int (*face_vert_indices)[4],
const struct MFace *mface, const struct MVert *mvert,
const int *face_indices, int totface);
GPU_PBVH_Buffers *GPU_build_mesh_pbvh_buffers(
const int (*face_vert_indices)[4],
const struct MPoly *mpoly, const struct MLoop *mloop, const struct MLoopTri *looptri,
const struct MVert *verts,
const int *face_indices,
const int face_indices_len);
GPU_PBVH_Buffers *GPU_build_grid_pbvh_buffers(int *grid_indices, int totgrid,
unsigned int **grid_hidden, int gridsize, const struct CCGKey *key);