Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_cache_extract.hh
| Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | struct { | ||||
| GPUVertBuf *fdots_edituv_data; | GPUVertBuf *fdots_edituv_data; | ||||
| GPUVertBuf *skin_roots; | GPUVertBuf *skin_roots; | ||||
| /* Selection */ | /* Selection */ | ||||
| GPUVertBuf *vert_idx; /* extend */ | GPUVertBuf *vert_idx; /* extend */ | ||||
| GPUVertBuf *edge_idx; /* extend */ | GPUVertBuf *edge_idx; /* extend */ | ||||
| GPUVertBuf *poly_idx; | GPUVertBuf *poly_idx; | ||||
| GPUVertBuf *fdot_idx; | GPUVertBuf *fdot_idx; | ||||
| GPUVertBuf *attr[GPU_MAX_ATTR]; | GPUVertBuf *attr[GPU_MAX_ATTR]; | ||||
| GPUVertBuf *attr_viewer; | |||||
| } vbo; | } vbo; | ||||
| /* Index Buffers: | /* Index Buffers: | ||||
| * Only need to be updated when topology changes. */ | * Only need to be updated when topology changes. */ | ||||
| struct { | struct { | ||||
| /* Indices to vloops. Ordered per material. */ | /* Indices to vloops. Ordered per material. */ | ||||
| GPUIndexBuf *tris; | GPUIndexBuf *tris; | ||||
| /* Loose edges last. */ | /* Loose edges last. */ | ||||
| GPUIndexBuf *lines; | GPUIndexBuf *lines; | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | struct MeshBatchList { | ||||
| GPUBatch *edge_detection; | GPUBatch *edge_detection; | ||||
| /* Individual edges with face normals. */ | /* Individual edges with face normals. */ | ||||
| GPUBatch *wire_edges; | GPUBatch *wire_edges; | ||||
| /* Loops around faces. no edges between selected faces */ | /* Loops around faces. no edges between selected faces */ | ||||
| GPUBatch *wire_loops; | GPUBatch *wire_loops; | ||||
| /* Same as wire_loops but only has uvs. */ | /* Same as wire_loops but only has uvs. */ | ||||
| GPUBatch *wire_loops_uvs; | GPUBatch *wire_loops_uvs; | ||||
| GPUBatch *sculpt_overlays; | GPUBatch *sculpt_overlays; | ||||
| GPUBatch *surface_viewer_attribute; | |||||
| }; | }; | ||||
| #define MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *)) | #define MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *)) | ||||
| #define MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *)) | #define MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *)) | ||||
| #define MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *)) | #define MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *)) | ||||
| #define MBC_BATCH_INDEX(batch) (offsetof(MeshBatchList, batch) / sizeof(void *)) | #define MBC_BATCH_INDEX(batch) (offsetof(MeshBatchList, batch) / sizeof(void *)) | ||||
| Show All 21 Lines | enum DRWBatchFlag { | ||||
| MBC_ALL_VERTS = (1u << MBC_BATCH_INDEX(all_verts)), | MBC_ALL_VERTS = (1u << MBC_BATCH_INDEX(all_verts)), | ||||
| MBC_ALL_EDGES = (1u << MBC_BATCH_INDEX(all_edges)), | MBC_ALL_EDGES = (1u << MBC_BATCH_INDEX(all_edges)), | ||||
| MBC_LOOSE_EDGES = (1u << MBC_BATCH_INDEX(loose_edges)), | MBC_LOOSE_EDGES = (1u << MBC_BATCH_INDEX(loose_edges)), | ||||
| MBC_EDGE_DETECTION = (1u << MBC_BATCH_INDEX(edge_detection)), | MBC_EDGE_DETECTION = (1u << MBC_BATCH_INDEX(edge_detection)), | ||||
| MBC_WIRE_EDGES = (1u << MBC_BATCH_INDEX(wire_edges)), | MBC_WIRE_EDGES = (1u << MBC_BATCH_INDEX(wire_edges)), | ||||
| MBC_WIRE_LOOPS = (1u << MBC_BATCH_INDEX(wire_loops)), | MBC_WIRE_LOOPS = (1u << MBC_BATCH_INDEX(wire_loops)), | ||||
| MBC_WIRE_LOOPS_UVS = (1u << MBC_BATCH_INDEX(wire_loops_uvs)), | MBC_WIRE_LOOPS_UVS = (1u << MBC_BATCH_INDEX(wire_loops_uvs)), | ||||
| MBC_SCULPT_OVERLAYS = (1u << MBC_BATCH_INDEX(sculpt_overlays)), | MBC_SCULPT_OVERLAYS = (1u << MBC_BATCH_INDEX(sculpt_overlays)), | ||||
| MBC_VIEWER_ATTRIBUTE_OVERLAY = (1u << MBC_BATCH_INDEX(surface_viewer_attribute)), | |||||
| MBC_SURFACE_PER_MAT = (1u << MBC_BATCH_LEN), | MBC_SURFACE_PER_MAT = (1u << MBC_BATCH_LEN), | ||||
| }; | }; | ||||
| ENUM_OPERATORS(DRWBatchFlag, MBC_SURFACE_PER_MAT); | ENUM_OPERATORS(DRWBatchFlag, MBC_SURFACE_PER_MAT); | ||||
| BLI_STATIC_ASSERT(MBC_BATCH_LEN < 32, "Number of batches exceeded the limit of bit fields"); | BLI_STATIC_ASSERT(MBC_BATCH_LEN < 32, "Number of batches exceeded the limit of bit fields"); | ||||
| struct MeshExtractLooseGeom { | struct MeshExtractLooseGeom { | ||||
| int edge_len; | int edge_len; | ||||
| ▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines | |||||