Blender
V3.3
|
#include <algorithm>
#include "BLI_utildefines.h"
#include "DNA_customdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_view3d_enums.h"
#include "BKE_attribute.h"
#include "BKE_object.h"
#include "GPU_batch.h"
#include "GPU_index_buffer.h"
#include "GPU_vertex_buffer.h"
#include "draw_attributes.h"
Go to the source code of this file.
Classes | |
struct | DRW_MeshWeightState |
struct | DRW_MeshCDMask |
struct | MeshBufferList |
struct | MeshBatchList |
struct | MeshExtractLooseGeom |
struct | MeshBufferCache |
struct | MeshBatchCache |
Namespaces | |
blender | |
blender::draw | |
Macros | |
#define | MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *)) |
#define | MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *)) |
#define | MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *)) |
#define | MBC_BATCH_INDEX(batch) (offsetof(MeshBatchList, batch) / sizeof(void *)) |
#define | FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) |
#define | MBC_EDITUV |
Enumerations | |
enum | { DRW_MESH_WEIGHT_STATE_MULTIPAINT = (1 << 0) , DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE = (1 << 1) , DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE = (1 << 2) } |
enum | eMRDataType { MR_DATA_NONE = 0 , MR_DATA_POLY_NOR = 1 << 1 , MR_DATA_LOOP_NOR = 1 << 2 , MR_DATA_LOOPTRI = 1 << 3 , MR_DATA_LOOSE_GEOM = 1 << 4 , MR_DATA_TAN_LOOP_NOR = 1 << 5 , MR_DATA_POLYS_SORTED = 1 << 6 } |
enum | DRWBatchFlag { MBC_SURFACE = (1u << MBC_BATCH_INDEX(surface)) , MBC_SURFACE_WEIGHTS = (1u << MBC_BATCH_INDEX(surface_weights)) , MBC_EDIT_TRIANGLES = (1u << MBC_BATCH_INDEX(edit_triangles)) , MBC_EDIT_VERTICES = (1u << MBC_BATCH_INDEX(edit_vertices)) , MBC_EDIT_EDGES = (1u << MBC_BATCH_INDEX(edit_edges)) , MBC_EDIT_VNOR = (1u << MBC_BATCH_INDEX(edit_vnor)) , MBC_EDIT_LNOR = (1u << MBC_BATCH_INDEX(edit_lnor)) , MBC_EDIT_FACEDOTS = (1u << MBC_BATCH_INDEX(edit_fdots)) , MBC_EDIT_MESH_ANALYSIS = (1u << MBC_BATCH_INDEX(edit_mesh_analysis)) , MBC_SKIN_ROOTS = (1u << MBC_BATCH_INDEX(edit_skin_roots)) , MBC_EDITUV_FACES_STRETCH_AREA = (1u << MBC_BATCH_INDEX(edituv_faces_stretch_area)) , MBC_EDITUV_FACES_STRETCH_ANGLE = (1u << MBC_BATCH_INDEX(edituv_faces_stretch_angle)) , MBC_EDITUV_FACES = (1u << MBC_BATCH_INDEX(edituv_faces)) , MBC_EDITUV_EDGES = (1u << MBC_BATCH_INDEX(edituv_edges)) , MBC_EDITUV_VERTS = (1u << MBC_BATCH_INDEX(edituv_verts)) , MBC_EDITUV_FACEDOTS = (1u << MBC_BATCH_INDEX(edituv_fdots)) , MBC_EDIT_SELECTION_VERTS = (1u << MBC_BATCH_INDEX(edit_selection_verts)) , MBC_EDIT_SELECTION_EDGES = (1u << MBC_BATCH_INDEX(edit_selection_edges)) , MBC_EDIT_SELECTION_FACES = (1u << MBC_BATCH_INDEX(edit_selection_faces)) , MBC_EDIT_SELECTION_FACEDOTS = (1u << MBC_BATCH_INDEX(edit_selection_fdots)) , MBC_ALL_VERTS = (1u << MBC_BATCH_INDEX(all_verts)) , MBC_ALL_EDGES = (1u << MBC_BATCH_INDEX(all_edges)) , MBC_LOOSE_EDGES = (1u << MBC_BATCH_INDEX(loose_edges)) , MBC_EDGE_DETECTION = (1u << MBC_BATCH_INDEX(edge_detection)) , MBC_WIRE_EDGES = (1u << MBC_BATCH_INDEX(wire_edges)) , MBC_WIRE_LOOPS = (1u << MBC_BATCH_INDEX(wire_loops)) , MBC_WIRE_LOOPS_UVS = (1u << MBC_BATCH_INDEX(wire_loops_uvs)) , MBC_SCULPT_OVERLAYS = (1u << MBC_BATCH_INDEX(sculpt_overlays)) , MBC_SURFACE_PER_MAT = (1u << MBC_BATCH_LEN) } |
Functions | |
BLI_STATIC_ASSERT (sizeof(DRW_MeshCDMask)<=sizeof(uint32_t), "DRW_MeshCDMask exceeds 32 bits") enum eMRIterType | |
BLI_INLINE int | mesh_render_mat_len_get (const Object *object, const Mesh *me) |
ENUM_OPERATORS (DRWBatchFlag, MBC_SURFACE_PER_MAT) | |
BLI_STATIC_ASSERT (MBC_BATCH_LEN< 32, "Number of batches exceeded the limit of bit fields") | |
Extract Loop | |
void | blender::draw::mesh_buffer_cache_create_requested (TaskGraph *task_graph, MeshBatchCache *cache, MeshBufferCache *mbc, Object *object, Mesh *me, bool is_editmode, bool is_paint_mode, bool is_mode_active, const float obmat[4][4], bool do_final, bool do_uvedit, const Scene *scene, const ToolSettings *ts, bool use_hide) |
Subdivision Extract Loop | |
void | blender::draw::mesh_buffer_cache_create_requested_subdiv (MeshBatchCache *cache, MeshBufferCache *mbc, DRWSubdivCache *subdiv_cache, MeshRenderData *mr) |
#define FOREACH_MESH_BUFFER_CACHE | ( | batch_cache, | |
mbc | |||
) |
Definition at line 261 of file draw_cache_extract.hh.
#define MBC_BATCH_INDEX | ( | batch | ) | (offsetof(MeshBatchList, batch) / sizeof(void *)) |
Definition at line 200 of file draw_cache_extract.hh.
#define MBC_BATCH_LEN (sizeof(MeshBatchList) / sizeof(void *)) |
Definition at line 196 of file draw_cache_extract.hh.
#define MBC_EDITUV |
Definition at line 317 of file draw_cache_extract.hh.
#define MBC_IBO_LEN (sizeof(MeshBufferList::ibo) / sizeof(void *)) |
Definition at line 198 of file draw_cache_extract.hh.
#define MBC_VBO_LEN (sizeof(MeshBufferList::vbo) / sizeof(void *)) |
Definition at line 197 of file draw_cache_extract.hh.
anonymous enum |
Enumerator | |
---|---|
DRW_MESH_WEIGHT_STATE_MULTIPAINT | |
DRW_MESH_WEIGHT_STATE_AUTO_NORMALIZE | |
DRW_MESH_WEIGHT_STATE_LOCK_RELATIVE |
Definition at line 49 of file draw_cache_extract.hh.
enum DRWBatchFlag |
Definition at line 202 of file draw_cache_extract.hh.
enum eMRDataType |
Enumerator | |
---|---|
MR_DATA_NONE | |
MR_DATA_POLY_NOR | |
MR_DATA_LOOP_NOR | |
MR_DATA_LOOPTRI | |
MR_DATA_LOOSE_GEOM | |
MR_DATA_TAN_LOOP_NOR | Force loop normals calculation. |
MR_DATA_POLYS_SORTED |
Definition at line 79 of file draw_cache_extract.hh.
BLI_STATIC_ASSERT | ( | ) |
IMPORTANT: Do not allocate manually as the real struct is bigger (i.e: GLBatch). This is only the common and "public" part of the struct. Use the provided allocator. TODO(fclem): Make the content of this struct hidden and expose getters/setters.
verts[0] is required, others can be NULL
Instance attributes.
NULL if element list not needed
Bookkeeping.
Type of geometry to draw.
Current assigned shader. DEPRECATED. Here only for uniform binding.
Definition at line 519 of file eevee_private.h.
References count, GPU_BATCH_INST_VBO_MAX_LEN, GPU_BATCH_VBO_MAX_LEN, GPUBatch, update(), and verts.
BLI_STATIC_ASSERT | ( | sizeof(DRW_MeshCDMask)<=sizeof(uint32_t) | , |
"DRW_MeshCDMask exceeds 32 bits" | |||
) |
Definition at line 69 of file draw_cache_extract.hh.
ENUM_OPERATORS | ( | DRWBatchFlag | , |
MBC_SURFACE_PER_MAT | |||
) |
BLI_INLINE int mesh_render_mat_len_get | ( | const Object * | object, |
const Mesh * | me | ||
) |
Definition at line 91 of file draw_cache_extract.hh.
References BKE_object_get_editmesh_eval_final(), NULL, and Mesh::totcol.
Referenced by DRW_mesh_material_count_get(), mesh_batch_cache_init(), mesh_batch_cache_valid(), blender::draw::mesh_buffer_cache_create_requested(), and mesh_render_data_create().