Blender V5.0
extract_mesh.hh File Reference

Extraction of Mesh data into VBO to feed to GPU. More...

#include "BLI_math_matrix_types.hh"
#include "BLI_math_vector_types.hh"
#include "BLI_task.hh"
#include "BLI_virtual_array.hh"
#include "DNA_scene_types.h"
#include "BKE_mesh.hh"
#include "BKE_object.hh"
#include "bmesh.hh"
#include "GPU_vertex_buffer.hh"
#include "draw_cache_extract.hh"

Go to the source code of this file.

Classes

struct  blender::draw::MeshRenderData
struct  blender::draw::EditLoopData

Namespaces

namespace  blender
namespace  blender::draw

Enumerations

enum class  blender::draw::UvExtractionMode : int8_t { blender::draw::Edit , blender::draw::Selection , blender::draw::All }

Functions

void blender::draw::mesh_render_data_update_loose_geom (MeshRenderData &mr, MeshBufferCache &cache)
uint2 blender::draw::edge_from_corners (const IndexRange face, const int corner)
template<typename T>
void blender::draw::extract_mesh_loose_edge_data (const Span< T > vert_data, const Span< int2 > edges, const Span< int > loose_edges, MutableSpan< T > gpu_data)
gpu::VertBufPtr blender::draw::extract_positions (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_positions_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBufPtr *orco_vbo)
gpu::VertBufPtr blender::draw::extract_face_dots_position (const MeshRenderData &mr)
void blender::draw::extract_face_dots_subdiv (const DRWSubdivCache &subdiv_cache, gpu::VertBufPtr &fdots_pos, gpu::VertBufPtr *fdots_nor, gpu::IndexBufPtr &fdots)
gpu::VertBufPtr blender::draw::extract_normals (const MeshRenderData &mr, bool use_hq)
gpu::VertBufPtr blender::draw::extract_normals_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::VertBuf &pos)
gpu::VertBufPtr blender::draw::extract_vert_normals (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_dot_normals (const MeshRenderData &mr, bool use_hq)
gpu::VertBufPtr blender::draw::extract_edge_factor (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edge_factor_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::VertBuf &pos)
gpu::IndexBufPtr blender::draw::extract_tris (const MeshRenderData &mr, const SortedFaceData &face_sorted)
void blender::draw::create_material_subranges (const SortedFaceData &face_sorted, gpu::IndexBuf &tris_ibo, MutableSpan< gpu::IndexBufPtr > ibos)
gpu::IndexBufPtr blender::draw::extract_tris_subdiv (const DRWSubdivCache &subdiv_cache, MeshBatchCache &cache)
void blender::draw::extract_lines (const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
void blender::draw::extract_lines_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr, gpu::IndexBufPtr *lines, gpu::IndexBufPtr *lines_loose, bool &no_loose_wire)
gpu::IndexBufPtr blender::draw::extract_points (const MeshRenderData &mr)
gpu::IndexBufPtr blender::draw::extract_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr blender::draw::extract_edit_data (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edit_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr blender::draw::extract_tangents (const MeshRenderData &mr, const MeshBatchCache &cache, bool use_hq)
gpu::VertBufPtr blender::draw::extract_tangents_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr blender::draw::extract_vert_index (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edge_index (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_index (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_dot_index (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_vert_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edge_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_index_subdiv (const DRWSubdivCache &subdiv_cache, const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_weights (const MeshRenderData &mr, const MeshBatchCache &cache)
gpu::VertBufPtr blender::draw::extract_weights_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::IndexBufPtr blender::draw::extract_face_dots (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_dots_uv (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_face_dots_edituv_data (const MeshRenderData &mr)
gpu::IndexBufPtr blender::draw::extract_lines_paint_mask (const MeshRenderData &mr)
gpu::IndexBufPtr blender::draw::extract_lines_paint_mask_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::IndexBufPtr blender::draw::extract_lines_adjacency (const MeshRenderData &mr, bool &r_is_manifold)
gpu::IndexBufPtr blender::draw::extract_lines_adjacency_subdiv (const DRWSubdivCache &subdiv_cache, bool &r_is_manifold)
gpu::VertBufPtr blender::draw::extract_uv_maps (const MeshRenderData &mr, const MeshBatchCache &cache)
gpu::VertBufPtr blender::draw::extract_uv_maps_subdiv (const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr blender::draw::extract_edituv_stretch_area (const MeshRenderData &mr, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr blender::draw::extract_edituv_stretch_area_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, float &tot_area, float &tot_uv_area)
gpu::VertBufPtr blender::draw::extract_edituv_stretch_angle (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edituv_stretch_angle_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const MeshBatchCache &cache)
gpu::VertBufPtr blender::draw::extract_mesh_analysis (const MeshRenderData &mr, const float4x4 &object_to_world)
gpu::VertBufPtr blender::draw::extract_skin_roots (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_sculpt_data (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_sculpt_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
gpu::VertBufPtr blender::draw::extract_orco (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_paint_overlay_flags (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_paint_overlay_flags_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
Mesh/BMesh Interface (indirect, partially cached access to complex data).
const CustomDatablender::draw::mesh_cd_vdata_get_from_mesh (const Mesh &mesh)
const CustomDatablender::draw::mesh_cd_edata_get_from_mesh (const Mesh &mesh)
const CustomDatablender::draw::mesh_cd_pdata_get_from_mesh (const Mesh &mesh)
const CustomDatablender::draw::mesh_cd_ldata_get_from_mesh (const Mesh &mesh)
MeshRenderData blender::draw::mesh_render_data_create (Object &object, Mesh &mesh, const bool is_editmode, const bool is_paint_mode, const bool do_final, const bool do_uvedit, const bool use_hide, const ToolSettings *ts)
void blender::draw::mesh_render_data_update_corner_normals (MeshRenderData &mr)
void blender::draw::mesh_render_data_update_face_normals (MeshRenderData &mr)
Polygons sorted per material

Contains face indices sorted based on their material.

const SortedFaceDatablender::draw::mesh_render_data_faces_sorted_ensure (const MeshRenderData &mr, MeshBufferCache &cache)
Extract Edit Flag Utils
void blender::draw::mesh_render_data_face_flag (const MeshRenderData &mr, const BMFace *efa, const BMUVOffsets &offsets, EditLoopData &eattr)
void blender::draw::mesh_render_data_loop_flag (const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
void blender::draw::mesh_render_data_loop_edge_flag (const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
Extract Edit UV Data / Flags
gpu::VertBufPtr blender::draw::extract_edituv_data (const MeshRenderData &mr)
gpu::VertBufPtr blender::draw::extract_edituv_data_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
Extract Edit UV Triangles Indices
gpu::IndexBufPtr blender::draw::extract_edituv_tris (const MeshRenderData &mr, bool edit_uvs)
gpu::IndexBufPtr blender::draw::extract_edituv_tris_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
Extract Edit UV Line Indices around faces
gpu::IndexBufPtr blender::draw::extract_edituv_lines (const MeshRenderData &mr, UvExtractionMode mode)
gpu::IndexBufPtr blender::draw::extract_edituv_lines_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, UvExtractionMode mode)
Extract Edit UV Points Indices
gpu::IndexBufPtr blender::draw::extract_edituv_points (const MeshRenderData &mr)
gpu::IndexBufPtr blender::draw::extract_edituv_points_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
Extract Edit UV Face-dots Indices
gpu::IndexBufPtr blender::draw::extract_edituv_face_dots (const MeshRenderData &mr)
Extract Attributes
gpu::VertBufPtr blender::draw::extract_attribute (const MeshRenderData &mr, StringRef name)
gpu::VertBufPtr blender::draw::extract_attribute_subdiv (const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, StringRef name)
gpu::VertBufPtr blender::draw::extract_attr_viewer (const MeshRenderData &mr)

Mesh Render Data

enum class  blender::draw::MeshExtractType { blender::draw::BMesh , blender::draw::Mesh }
const Meshblender::draw::editmesh_final_or_this (const Object &object, const Mesh &mesh)
BLI_INLINE BMFaceblender::draw::bm_original_face_get (const MeshRenderData &mr, int idx)
BLI_INLINE BMEdgeblender::draw::bm_original_edge_get (const MeshRenderData &mr, int idx)
BLI_INLINE BMVertblender::draw::bm_original_vert_get (const MeshRenderData &mr, int idx)
BLI_INLINE const floatblender::draw::bm_vert_co_get (const MeshRenderData &mr, const BMVert *eve)
BLI_INLINE const floatblender::draw::bm_vert_no_get (const MeshRenderData &mr, const BMVert *eve)
BLI_INLINE const floatblender::draw::bm_face_no_get (const MeshRenderData &mr, const BMFace *efa)

Detailed Description

Extraction of Mesh data into VBO to feed to GPU.

Definition in file extract_mesh.hh.