Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_extract.h
| Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | typedef enum DRWBatchFlag { | ||||
| MBC_SURFACE_WEIGHTS = (1 << 1), | MBC_SURFACE_WEIGHTS = (1 << 1), | ||||
| MBC_EDIT_TRIANGLES = (1 << 2), | MBC_EDIT_TRIANGLES = (1 << 2), | ||||
| MBC_EDIT_VERTICES = (1 << 3), | MBC_EDIT_VERTICES = (1 << 3), | ||||
| MBC_EDIT_EDGES = (1 << 4), | MBC_EDIT_EDGES = (1 << 4), | ||||
| MBC_EDIT_VNOR = (1 << 5), | MBC_EDIT_VNOR = (1 << 5), | ||||
| MBC_EDIT_LNOR = (1 << 6), | MBC_EDIT_LNOR = (1 << 6), | ||||
| MBC_EDIT_FACEDOTS = (1 << 7), | MBC_EDIT_FACEDOTS = (1 << 7), | ||||
| MBC_EDIT_MESH_ANALYSIS = (1 << 8), | MBC_EDIT_MESH_ANALYSIS = (1 << 8), | ||||
| MBC_EDITUV_FACES_STRECH_AREA = (1 << 9), | MBC_EDITUV_FACES_STRETCH_AREA = (1 << 9), | ||||
| MBC_EDITUV_FACES_STRECH_ANGLE = (1 << 10), | MBC_EDITUV_FACES_STRETCH_ANGLE = (1 << 10), | ||||
| MBC_EDITUV_FACES = (1 << 11), | MBC_EDITUV_FACES = (1 << 11), | ||||
| MBC_EDITUV_EDGES = (1 << 12), | MBC_EDITUV_EDGES = (1 << 12), | ||||
| MBC_EDITUV_VERTS = (1 << 13), | MBC_EDITUV_VERTS = (1 << 13), | ||||
| MBC_EDITUV_FACEDOTS = (1 << 14), | MBC_EDITUV_FACEDOTS = (1 << 14), | ||||
| MBC_EDIT_SELECTION_VERTS = (1 << 15), | MBC_EDIT_SELECTION_VERTS = (1 << 15), | ||||
| MBC_EDIT_SELECTION_EDGES = (1 << 16), | MBC_EDIT_SELECTION_EDGES = (1 << 16), | ||||
| MBC_EDIT_SELECTION_FACES = (1 << 17), | MBC_EDIT_SELECTION_FACES = (1 << 17), | ||||
| MBC_EDIT_SELECTION_FACEDOTS = (1 << 18), | MBC_EDIT_SELECTION_FACEDOTS = (1 << 18), | ||||
| MBC_ALL_VERTS = (1 << 19), | MBC_ALL_VERTS = (1 << 19), | ||||
| MBC_ALL_EDGES = (1 << 20), | MBC_ALL_EDGES = (1 << 20), | ||||
| MBC_LOOSE_EDGES = (1 << 21), | MBC_LOOSE_EDGES = (1 << 21), | ||||
| MBC_EDGE_DETECTION = (1 << 22), | MBC_EDGE_DETECTION = (1 << 22), | ||||
| MBC_WIRE_EDGES = (1 << 23), | MBC_WIRE_EDGES = (1 << 23), | ||||
| MBC_WIRE_LOOPS = (1 << 24), | MBC_WIRE_LOOPS = (1 << 24), | ||||
| MBC_WIRE_LOOPS_UVS = (1 << 25), | MBC_WIRE_LOOPS_UVS = (1 << 25), | ||||
| MBC_SURF_PER_MAT = (1 << 26), | MBC_SURF_PER_MAT = (1 << 26), | ||||
| } DRWBatchFlag; | } DRWBatchFlag; | ||||
| #define MBC_EDITUV \ | #define MBC_EDITUV \ | ||||
| (MBC_EDITUV_FACES_STRECH_AREA | MBC_EDITUV_FACES_STRECH_ANGLE | MBC_EDITUV_FACES | \ | (MBC_EDITUV_FACES_STRETCH_AREA | MBC_EDITUV_FACES_STRETCH_ANGLE | MBC_EDITUV_FACES | \ | ||||
| MBC_EDITUV_EDGES | MBC_EDITUV_VERTS | MBC_EDITUV_FACEDOTS | MBC_WIRE_LOOPS_UVS) | MBC_EDITUV_EDGES | MBC_EDITUV_VERTS | MBC_EDITUV_FACEDOTS | MBC_WIRE_LOOPS_UVS) | ||||
| #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 All 9 Lines | struct { | ||||
| GPUBatch *edit_triangles; | GPUBatch *edit_triangles; | ||||
| GPUBatch *edit_vertices; | GPUBatch *edit_vertices; | ||||
| GPUBatch *edit_edges; | GPUBatch *edit_edges; | ||||
| GPUBatch *edit_vnor; | GPUBatch *edit_vnor; | ||||
| GPUBatch *edit_lnor; | GPUBatch *edit_lnor; | ||||
| GPUBatch *edit_fdots; | GPUBatch *edit_fdots; | ||||
| GPUBatch *edit_mesh_analysis; | GPUBatch *edit_mesh_analysis; | ||||
| /* Edit UVs */ | /* Edit UVs */ | ||||
| GPUBatch *edituv_faces_strech_area; | GPUBatch *edituv_faces_stretch_area; | ||||
| GPUBatch *edituv_faces_strech_angle; | GPUBatch *edituv_faces_stretch_angle; | ||||
| GPUBatch *edituv_faces; | GPUBatch *edituv_faces; | ||||
| GPUBatch *edituv_edges; | GPUBatch *edituv_edges; | ||||
| GPUBatch *edituv_verts; | GPUBatch *edituv_verts; | ||||
| GPUBatch *edituv_fdots; | GPUBatch *edituv_fdots; | ||||
| /* Edit selection */ | /* Edit selection */ | ||||
| GPUBatch *edit_selection_verts; | GPUBatch *edit_selection_verts; | ||||
| GPUBatch *edit_selection_edges; | GPUBatch *edit_selection_edges; | ||||
| GPUBatch *edit_selection_faces; | GPUBatch *edit_selection_faces; | ||||
| Show All 33 Lines | typedef struct MeshBatchCache { | ||||
| DRW_MeshCDMask cd_used, cd_needed, cd_used_over_time; | DRW_MeshCDMask cd_used, cd_needed, cd_used_over_time; | ||||
| int lastmatch; | int lastmatch; | ||||
| /* Valid only if edge_detection is up to date. */ | /* Valid only if edge_detection is up to date. */ | ||||
| bool is_manifold; | bool is_manifold; | ||||
| /* total areas for drawing UV Stretching. it contains the summed area in mesh | |||||
| * space (`tot_area`) and the summed area in uv space (`tot_uvarea`). */ | |||||
fclem: Add a note about when it is valid.
`Only valid after DRW_mesh_batch_cache_create_requested has… | |||||
| float tot_area, tot_uv_area; | |||||
| bool no_loose_wire; | bool no_loose_wire; | ||||
| } MeshBatchCache; | } MeshBatchCache; | ||||
| void mesh_buffer_cache_create_requested(MeshBatchCache *cache, | void mesh_buffer_cache_create_requested(MeshBatchCache *cache, | ||||
| MeshBufferCache mbc, | MeshBufferCache mbc, | ||||
| Mesh *me, | Mesh *me, | ||||
| const bool do_final, | const bool do_final, | ||||
| const bool do_uvedit, | const bool do_uvedit, | ||||
| const bool use_subsurf_fdots, | const bool use_subsurf_fdots, | ||||
| const DRW_MeshCDMask *cd_layer_used, | const DRW_MeshCDMask *cd_layer_used, | ||||
| const ToolSettings *ts, | const ToolSettings *ts, | ||||
| const bool use_hide); | const bool use_hide); | ||||
| #endif /* __DRAW_CACHE_EXTRACT_MESH_H__ */ | #endif /* __DRAW_CACHE_EXTRACT_MESH_H__ */ | ||||
Add a note about when it is valid.
Only valid after DRW_mesh_batch_cache_create_requested has been called.