Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_extract.h
| Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
| } eMRIterType; | } eMRIterType; | ||||
| ENUM_OPERATORS(eMRIterType, MR_ITER_LVERT) | ENUM_OPERATORS(eMRIterType, MR_ITER_LVERT) | ||||
| typedef enum eMRDataType { | typedef enum eMRDataType { | ||||
| MR_DATA_NONE = 0, | MR_DATA_NONE = 0, | ||||
| MR_DATA_POLY_NOR = 1 << 1, | MR_DATA_POLY_NOR = 1 << 1, | ||||
| MR_DATA_LOOP_NOR = 1 << 2, | MR_DATA_LOOP_NOR = 1 << 2, | ||||
| MR_DATA_LOOPTRI = 1 << 3, | MR_DATA_LOOPTRI = 1 << 3, | ||||
| MR_DATA_LOOSE_GEOM = 1 << 4, | |||||
| /** Force loop normals calculation. */ | /** Force loop normals calculation. */ | ||||
| MR_DATA_TAN_LOOP_NOR = 1 << 4, | MR_DATA_TAN_LOOP_NOR = 1 << 5, | ||||
| MR_DATA_MAT_OFFSETS = 1 << 5, | MR_DATA_POLYS_SORTED = 1 << 6, | ||||
| } eMRDataType; | } eMRDataType; | ||||
| ENUM_OPERATORS(eMRDataType, MR_DATA_MAT_OFFSETS) | ENUM_OPERATORS(eMRDataType, MR_DATA_POLYS_SORTED) | ||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| extern "C" { | extern "C" { | ||||
| #endif | #endif | ||||
| BLI_INLINE int mesh_render_mat_len_get(const Mesh *me) | BLI_INLINE int mesh_render_mat_len_get(const Mesh *me) | ||||
| { | { | ||||
| /* In edit mode, the displayed mesh is stored in the edit-mesh. */ | /* In edit mode, the displayed mesh is stored in the edit-mesh. */ | ||||
| ▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | typedef struct MeshBufferExtractionCache { | ||||
| struct { | struct { | ||||
| int edge_len; | int edge_len; | ||||
| int vert_len; | int vert_len; | ||||
| int *verts; | int *verts; | ||||
| int *edges; | int *edges; | ||||
| } loose_geom; | } loose_geom; | ||||
| struct { | struct { | ||||
| int *tri; | int *tri_first_index; | ||||
| int *mat_tri_len; | |||||
| int visible_tri_len; | int visible_tri_len; | ||||
| } mat_offsets; | } poly_sorted; | ||||
| } MeshBufferExtractionCache; | } MeshBufferExtractionCache; | ||||
| #define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) \ | #define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) \ | ||||
| for (MeshBufferCache *mbc = &batch_cache->final; \ | for (MeshBufferCache *mbc = &batch_cache->final; \ | ||||
| mbc == &batch_cache->final || mbc == &batch_cache->cage || mbc == &batch_cache->uv_cage; \ | mbc == &batch_cache->final || mbc == &batch_cache->cage || mbc == &batch_cache->uv_cage; \ | ||||
| mbc = (mbc == &batch_cache->final) ? \ | mbc = (mbc == &batch_cache->final) ? \ | ||||
| &batch_cache->cage : \ | &batch_cache->cage : \ | ||||
| ((mbc == &batch_cache->cage) ? &batch_cache->uv_cage : NULL)) | ((mbc == &batch_cache->cage) ? &batch_cache->uv_cage : NULL)) | ||||
| ▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines | |||||