Blender
V3.3
|
#include "BLI_sys_types.h"
Go to the source code of this file.
Classes | |
struct | DRWPatchMap |
struct | DRWSubdivLooseEdge |
struct | DRWSubdivLooseVertex |
struct | DRWSubdivLooseGeom |
struct | DRWSubdivCache |
Typedefs | |
DRWPatchMap | |
This is a GPU version of the OpenSubDiv PatchMap. The quad tree and the patch handles are copied to GPU buffers in order to lookup the right patch for a given set of patch coordinates. | |
typedef struct DRWPatchMap | DRWPatchMap |
DRWSubdivLooseEdge | |
This stores information about a subdivided loose edge. | |
typedef struct DRWSubdivLooseEdge | DRWSubdivLooseEdge |
DRWSubdivLooseVertex | |
This stores information about a subdivided loose vertex, that may or may not come from a loose edge. | |
typedef struct DRWSubdivLooseVertex | DRWSubdivLooseVertex |
DRWSubdivLooseGeom | |
This stores the subdivided vertices and edges of loose geometry from MeshExtractLooseGeom. | |
typedef struct DRWSubdivLooseGeom | DRWSubdivLooseGeom |
Functions | |
void | DRW_create_subdivision (struct Object *ob, struct Mesh *mesh, struct MeshBatchCache *batch_cache, struct MeshBufferCache *mbc, const bool is_editmode, const bool is_paint_mode, const bool is_mode_active, const float obmat[4][4], const bool do_final, const bool do_uvedit, const bool do_cage, const ToolSettings *ts, const bool use_hide) |
void | DRW_subdivide_loose_geom (DRWSubdivCache *subdiv_cache, struct MeshBufferCache *cache) |
void | DRW_subdiv_cache_free (struct Subdiv *subdiv) |
void | draw_subdiv_init_mesh_render_data (DRWSubdivCache *cache, struct MeshRenderData *mr, const struct ToolSettings *toolsettings) |
void | draw_subdiv_init_origindex_buffer (struct GPUVertBuf *buffer, int32_t *vert_origindex, uint num_loops, uint loose_len) |
struct GPUVertBuf * | draw_subdiv_build_origindex_buffer (int *vert_origindex, uint num_loops) |
void | draw_subdiv_build_sculpt_data_buffer (const DRWSubdivCache *cache, struct GPUVertBuf *mask_vbo, struct GPUVertBuf *face_set_vbo, struct GPUVertBuf *sculpt_data) |
void | draw_subdiv_accumulate_normals (const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, struct GPUVertBuf *face_adjacency_offsets, struct GPUVertBuf *face_adjacency_lists, struct GPUVertBuf *vertex_loop_map, struct GPUVertBuf *vertex_normals) |
void | draw_subdiv_finalize_normals (const DRWSubdivCache *cache, struct GPUVertBuf *vertex_normals, struct GPUVertBuf *subdiv_loop_subdiv_vert_index, struct GPUVertBuf *pos_nor) |
void | draw_subdiv_finalize_custom_normals (const DRWSubdivCache *cache, GPUVertBuf *src_custom_normals, GPUVertBuf *pos_nor) |
void | draw_subdiv_extract_pos_nor (const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, struct GPUVertBuf *orco) |
void | draw_subdiv_interp_custom_data (const DRWSubdivCache *cache, struct GPUVertBuf *src_data, struct GPUVertBuf *dst_data, int dimensions, int dst_offset, bool compress_to_u16) |
void | draw_subdiv_extract_uvs (const DRWSubdivCache *cache, struct GPUVertBuf *uvs, int face_varying_channel, int dst_offset) |
void | draw_subdiv_build_edge_fac_buffer (const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, struct GPUVertBuf *edge_idx, struct GPUVertBuf *edge_fac) |
void | draw_subdiv_build_tris_buffer (const DRWSubdivCache *cache, struct GPUIndexBuf *subdiv_tris, int material_count) |
void | draw_subdiv_build_lines_buffer (const DRWSubdivCache *cache, struct GPUIndexBuf *lines_indices) |
void | draw_subdiv_build_lines_loose_buffer (const DRWSubdivCache *cache, struct GPUIndexBuf *lines_indices, GPUVertBuf *lines_flags, uint num_loose_edges) |
void | draw_subdiv_build_fdots_buffers (const DRWSubdivCache *cache, struct GPUVertBuf *fdots_pos, struct GPUVertBuf *fdots_nor, struct GPUIndexBuf *fdots_indices) |
void | draw_subdiv_build_lnor_buffer (const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, struct GPUVertBuf *lnor) |
void | draw_subdiv_build_edituv_stretch_area_buffer (const DRWSubdivCache *cache, struct GPUVertBuf *coarse_data, struct GPUVertBuf *subdiv_data) |
void | draw_subdiv_build_edituv_stretch_angle_buffer (const DRWSubdivCache *cache, struct GPUVertBuf *pos_nor, struct GPUVertBuf *uvs, int uvs_offset, struct GPUVertBuf *stretch_angles) |
struct GPUVertFormat * | draw_subdiv_get_pos_nor_format (void) |
DRWSubdivCache | |
This holds the various buffers used to evaluate and render subdivision through OpenGL. | |
typedef struct DRWSubdivCache | DRWSubdivCache |
void | draw_subdiv_cache_free (DRWSubdivCache *cache) |
typedef struct DRWPatchMap DRWPatchMap |
typedef struct DRWSubdivCache DRWSubdivCache |
typedef struct DRWSubdivLooseEdge DRWSubdivLooseEdge |
typedef struct DRWSubdivLooseGeom DRWSubdivLooseGeom |
typedef struct DRWSubdivLooseVertex DRWSubdivLooseVertex |
void draw_subdiv_accumulate_normals | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | pos_nor, | ||
struct GPUVertBuf * | face_adjacency_offsets, | ||
struct GPUVertBuf * | face_adjacency_lists, | ||
struct GPUVertBuf * | vertex_loop_map, | ||
struct GPUVertBuf * | vertex_normals | ||
) |
Definition at line 1559 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_verts, and SHADER_BUFFER_NORMALS_ACCUMULATE.
Referenced by blender::draw::extract_pos_nor_init_subdiv().
void draw_subdiv_build_edge_fac_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | pos_nor, | ||
struct GPUVertBuf * | edge_idx, | ||
struct GPUVertBuf * | edge_fac | ||
) |
Definition at line 1799 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_crappy_amd_driver(), GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, and SHADER_BUFFER_EDGE_FAC.
Referenced by blender::draw::extract_edge_fac_init_subdiv().
void draw_subdiv_build_edituv_stretch_angle_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | pos_nor, | ||
struct GPUVertBuf * | uvs, | ||
int | uvs_offset, | ||
struct GPUVertBuf * | stretch_angles | ||
) |
Definition at line 1885 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, and SHADER_BUFFER_UV_STRETCH_ANGLE.
Referenced by blender::draw::extract_edituv_stretch_angle_init_subdiv().
void draw_subdiv_build_edituv_stretch_area_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | coarse_data, | ||
struct GPUVertBuf * | subdiv_data | ||
) |
Definition at line 1858 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, SHADER_BUFFER_UV_STRETCH_AREA, and DRWSubdivCache::subdiv_polygon_offset_buffer.
Referenced by blender::draw::extract_edituv_stretch_area_init_subdiv().
void draw_subdiv_build_fdots_buffers | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | fdots_pos, | ||
struct GPUVertBuf * | fdots_nor, | ||
struct GPUIndexBuf * | fdots_indices | ||
) |
Definition at line 1685 of file draw_cache_impl_subdivision.cc.
References BLI_assert, create_buffer_and_interface(), draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), Subdiv::evaluator, DRWSubdivCache::extra_coarse_face_data, DRWSubdivCache::fdots_patch_coords, OpenSubdiv_Evaluator::fillPatchArraysBuffer, get_patch_array_format(), get_patch_evaluation_shader(), get_patch_index_format(), get_patch_param_format(), get_subdiv_vertex_format(), GPU_BARRIER_ELEMENT_ARRAY, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_indexbuf_bind_as_ssbo(), GPU_memory_barrier(), DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), GPU_vertbuf_discard(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_coarse_poly, opensubdiv_gpu_buffer_init(), DRWPatchMap::patch_map_handles, DRWPatchMap::patch_map_quadtree, SHADER_PATCH_EVALUATION_FACE_DOTS, SHADER_PATCH_EVALUATION_FACE_DOTS_WITH_NORMALS, DRWSubdivCache::subdiv, DRWSubdivCache::verts_orig_index, OpenSubdiv_Evaluator::wrapPatchIndexBuffer, OpenSubdiv_Evaluator::wrapPatchParamBuffer, and OpenSubdiv_Evaluator::wrapSrcBuffer.
Referenced by blender::draw::extract_fdots_init_subdiv().
void draw_subdiv_build_lines_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUIndexBuf * | lines_indices | ||
) |
Definition at line 1758 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), DRWSubdivCache::edges_orig_index, DRWSubdivCache::extra_coarse_face_data, get_subdiv_shader(), GPU_BARRIER_ELEMENT_ARRAY, GPU_indexbuf_bind_as_ssbo(), GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, SHADER_BUFFER_LINES, and DRWSubdivCache::subdiv_polygon_offset_buffer.
Referenced by blender::draw::extract_lines_init_subdiv().
void draw_subdiv_build_lines_loose_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUIndexBuf * | lines_indices, | ||
GPUVertBuf * | lines_flags, | ||
uint | num_loose_edges | ||
) |
Definition at line 1779 of file draw_cache_impl_subdivision.cc.
References drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_ELEMENT_ARRAY, GPU_indexbuf_bind_as_ssbo(), GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), and SHADER_BUFFER_LINES_LOOSE.
Referenced by blender::draw::extract_lines_loose_geom_subdiv().
void draw_subdiv_build_lnor_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | pos_nor, | ||
struct GPUVertBuf * | lnor | ||
) |
Definition at line 1825 of file draw_cache_impl_subdivision.cc.
References BLI_assert, draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), DRWSubdivCache::extra_coarse_face_data, get_subdiv_shader(), GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, SHADER_BUFFER_LNOR, DRWSubdivCache::subdiv_polygon_offset_buffer, and DRWSubdivCache::verts_orig_index.
Referenced by blender::draw::extract_lnor_init_subdiv().
struct GPUVertBuf* draw_subdiv_build_origindex_buffer | ( | int * | vert_origindex, |
uint | num_loops | ||
) |
Definition at line 491 of file draw_cache_impl_subdivision.cc.
References buffer, draw_subdiv_init_origindex_buffer(), and GPU_vertbuf_calloc().
Referenced by draw_subdiv_build_cache(), draw_subdiv_cache_ensure_mat_offsets(), and blender::draw::extract_pos_nor_init_subdiv().
void draw_subdiv_build_sculpt_data_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | mask_vbo, | ||
struct GPUVertBuf * | face_set_vbo, | ||
struct GPUVertBuf * | sculpt_data | ||
) |
Definition at line 1532 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, and SHADER_BUFFER_SCULPT_DATA.
Referenced by blender::draw::extract_sculpt_data_init_subdiv().
void draw_subdiv_build_tris_buffer | ( | const DRWSubdivCache * | cache, |
struct GPUIndexBuf * | subdiv_tris, | ||
int | material_count | ||
) |
Definition at line 1639 of file draw_cache_impl_subdivision.cc.
References BLI_assert, draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), DRWSubdivCache::extra_coarse_face_data, get_subdiv_shader(), GPU_BARRIER_ELEMENT_ARRAY, GPU_indexbuf_bind_as_ssbo(), GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, DRWSubdivCache::polygon_mat_offset, SHADER_BUFFER_TRIS, SHADER_BUFFER_TRIS_MULTIPLE_MATERIALS, and DRWSubdivCache::subdiv_polygon_offset_buffer.
Referenced by blender::draw::extract_tris_init_subdiv().
void draw_subdiv_cache_free | ( | DRWSubdivCache * | cache | ) |
Definition at line 575 of file draw_cache_impl_subdivision.cc.
References DRWSubdivCache::corner_patch_coords, draw_patch_map_free(), draw_subdiv_cache_free_material_data(), draw_subdiv_free_edit_mode_cache(), DRWSubdivLooseGeom::edge_len, DRWSubdivLooseGeom::edges, DRWSubdivCache::extra_coarse_face_data, DRWSubdivCache::face_ptex_offset_buffer, DRWSubdivCache::gpu_patch_map, GPU_uniformbuf_free(), GPU_VERTBUF_DISCARD_SAFE, DRWSubdivLooseGeom::loop_len, DRWSubdivCache::loose_geom, DRWSubdivCache::may_have_loose_geom, MEM_SAFE_FREE, DRWSubdivCache::num_coarse_poly, DRWSubdivCache::num_subdiv_edges, DRWSubdivCache::num_subdiv_loops, DRWSubdivCache::num_subdiv_quads, DRWSubdivCache::num_subdiv_triangles, DRWSubdivCache::num_subdiv_verts, DRWSubdivCache::patch_coords, DRWSubdivCache::resolution, DRWSubdivCache::subdiv_loop_poly_index, DRWSubdivCache::subdiv_loop_subdiv_edge_index, DRWSubdivCache::subdiv_loop_subdiv_vert_index, DRWSubdivCache::subdiv_polygon_offset, DRWSubdivCache::subdiv_polygon_offset_buffer, DRWSubdivCache::subdiv_vertex_face_adjacency, DRWSubdivCache::subdiv_vertex_face_adjacency_offsets, DRWSubdivCache::ubo, DRWSubdivLooseGeom::vert_len, and DRWSubdivLooseGeom::verts.
Referenced by draw_subdiv_build_cache(), and mesh_batch_cache_free_subdiv_cache().
void draw_subdiv_extract_pos_nor | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | pos_nor, | ||
struct GPUVertBuf * | orco | ||
) |
Definition at line 1318 of file draw_cache_impl_subdivision.cc.
References BLI_assert, create_buffer_and_interface(), draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), Subdiv::evaluator, OpenSubdiv_Evaluator::fillPatchArraysBuffer, get_patch_array_format(), get_patch_evaluation_shader(), get_patch_index_format(), get_patch_param_format(), get_subdiv_vertex_format(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), GPU_vertbuf_discard(), GPU_VERTBUF_DISCARD_SAFE, MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, DRWSubdivCache::patch_coords, DRWPatchMap::patch_map_handles, DRWPatchMap::patch_map_quadtree, SHADER_PATCH_EVALUATION, SHADER_PATCH_EVALUATION_ORCO, DRWSubdivCache::subdiv, DRWSubdivCache::verts_orig_index, OpenSubdiv_Evaluator::wrapPatchIndexBuffer, OpenSubdiv_Evaluator::wrapPatchParamBuffer, OpenSubdiv_Evaluator::wrapSrcBuffer, and OpenSubdiv_Evaluator::wrapSrcVertexDataBuffer.
Referenced by blender::draw::extract_edituv_stretch_angle_init_subdiv(), and blender::draw::extract_pos_nor_init_subdiv().
void draw_subdiv_extract_uvs | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | uvs, | ||
int | face_varying_channel, | ||
int | dst_offset | ||
) |
Definition at line 1395 of file draw_cache_impl_subdivision.cc.
References BLI_assert, OpenSubdiv_Buffer::buffer_offset, DRWSubdivCache::corner_patch_coords, create_buffer_and_interface(), draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), Subdiv::evaluator, OpenSubdiv_Evaluator::fillFVarPatchArraysBuffer, get_patch_array_format(), get_patch_evaluation_shader(), get_patch_index_format(), get_patch_param_format(), get_uvs_format(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), DRWSubdivCache::gpu_patch_map, GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), GPU_vertbuf_discard(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, DRWPatchMap::patch_map_handles, DRWPatchMap::patch_map_quadtree, SHADER_PATCH_EVALUATION_FVAR, DRWSubdivCache::subdiv, DRWSubdivCache::verts_orig_index, OpenSubdiv_Evaluator::wrapFVarPatchIndexBuffer, OpenSubdiv_Evaluator::wrapFVarPatchParamBuffer, and OpenSubdiv_Evaluator::wrapFVarSrcBuffer.
Referenced by blender::draw::extract_uv_init_subdiv().
void draw_subdiv_finalize_custom_normals | ( | const DRWSubdivCache * | cache, |
GPUVertBuf * | src_custom_normals, | ||
GPUVertBuf * | pos_nor | ||
) |
Definition at line 1614 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, and SHADER_BUFFER_NORMALS_FINALIZE.
Referenced by blender::draw::extract_pos_nor_init_subdiv().
void draw_subdiv_finalize_normals | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | vertex_normals, | ||
struct GPUVertBuf * | subdiv_loop_subdiv_vert_index, | ||
struct GPUVertBuf * | pos_nor | ||
) |
Definition at line 1589 of file draw_cache_impl_subdivision.cc.
References BLI_assert, drw_subdiv_compute_dispatch(), get_subdiv_shader(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, and SHADER_BUFFER_NORMALS_FINALIZE.
Referenced by blender::draw::extract_pos_nor_init_subdiv().
struct GPUVertFormat* draw_subdiv_get_pos_nor_format | ( | void | ) |
Return the format used for the positions and normals VBO.
Definition at line 393 of file draw_cache_impl_subdivision.cc.
References GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_vertformat_alias_add(), and GPU_vertformat_attr_add().
Referenced by blender::draw::extract_edituv_stretch_angle_init_subdiv(), and blender::draw::extract_pos_nor_init_subdiv().
void draw_subdiv_init_mesh_render_data | ( | DRWSubdivCache * | cache, |
struct MeshRenderData * | mr, | ||
const struct ToolSettings * | toolsettings | ||
) |
void draw_subdiv_init_origindex_buffer | ( | struct GPUVertBuf * | buffer, |
int32_t * | vert_origindex, | ||
uint | num_loops, | ||
uint | loose_len | ||
) |
Definition at line 479 of file draw_cache_impl_subdivision.cc.
References buffer, get_origindex_format(), GPU_USAGE_STATIC, GPU_vertbuf_data_alloc(), GPU_vertbuf_get_data(), and GPU_vertbuf_init_with_format_ex().
Referenced by draw_subdiv_build_origindex_buffer(), blender::draw::extract_edge_fac_init_subdiv(), blender::draw::extract_edge_idx_init_subdiv(), blender::draw::extract_poly_idx_init_subdiv(), and blender::draw::extract_vert_idx_init_subdiv().
void draw_subdiv_interp_custom_data | ( | const DRWSubdivCache * | cache, |
struct GPUVertBuf * | src_data, | ||
struct GPUVertBuf * | dst_data, | ||
int | dimensions, | ||
int | dst_offset, | ||
bool | compress_to_u16 | ||
) |
Definition at line 1464 of file draw_cache_impl_subdivision.cc.
References BLI_assert, DRWSubdivCache::corner_patch_coords, draw_subdiv_cache_need_polygon_data(), drw_subdiv_compute_dispatch(), DRWSubdivCache::extra_coarse_face_data, DRWSubdivCache::face_ptex_offset_buffer, get_subdiv_shader(), GPU_BARRIER_SHADER_STORAGE, GPU_BARRIER_VERTEX_ATTRIB_ARRAY, GPU_memory_barrier(), GPU_shader_bind(), GPU_shader_unbind(), GPU_vertbuf_bind_as_ssbo(), MAX_GPU_SUBDIV_SSBOS, DRWSubdivCache::num_subdiv_quads, SHADER_COMP_CUSTOM_DATA_INTERP_1D, SHADER_COMP_CUSTOM_DATA_INTERP_2D, SHADER_COMP_CUSTOM_DATA_INTERP_3D, SHADER_COMP_CUSTOM_DATA_INTERP_4D, and DRWSubdivCache::subdiv_polygon_offset_buffer.
Referenced by blender::draw::extract_attr_init_subdiv(), blender::draw::extract_pos_nor_init_subdiv(), blender::draw::extract_sculpt_data_init_subdiv(), blender::draw::extract_tan_init_subdiv(), and blender::draw::extract_weights_init_subdiv().
void DRW_create_subdivision | ( | struct Object * | ob, |
struct Mesh * | mesh, | ||
struct MeshBatchCache * | batch_cache, | ||
struct MeshBufferCache * | mbc, | ||
const bool | is_editmode, | ||
const bool | is_paint_mode, | ||
const bool | is_mode_active, | ||
const float | obmat[4][4], | ||
const bool | do_final, | ||
const bool | do_uvedit, | ||
const bool | do_cage, | ||
const ToolSettings * | ts, | ||
const bool | use_hide | ||
) |
Definition at line 2209 of file draw_cache_impl_subdivision.cc.
References draw_subdiv_create_requested_buffers(), g_evaluator_cache, mesh, openSubdiv_createEvaluatorCache(), OPENSUBDIV_EVALUATOR_GPU, and PIL_check_seconds_timer().
Referenced by DRW_mesh_batch_cache_create_requested().
Definition at line 2274 of file draw_cache_impl_subdivision.cc.
References BLI_linklist_prepend(), BLI_mutex_lock(), BLI_mutex_unlock(), gpu_subdiv_free_queue, and gpu_subdiv_queue_mutex.
Referenced by DRW_engines_register().
void DRW_subdivide_loose_geom | ( | DRWSubdivCache * | subdiv_cache, |
struct MeshBufferCache * | cache | ||
) |
Definition at line 2109 of file draw_cache_impl_subdivision.cc.
References BKE_subdiv_mesh_interpolate_position_on_edge(), DRWSubdivLooseVertex::co, MVert::co, DRWSubdivLooseEdge::coarse_edge_index, DRWSubdivLooseVertex::coarse_vertex_index, copy_v3_v3(), MeshExtractLooseGeom::edge_len, DRWSubdivLooseGeom::edge_len, MeshExtractLooseGeom::edges, DRWSubdivLooseGeom::edges, float(), SubdivSettings::is_simple, DRWSubdivLooseGeom::loop_len, MeshBufferCache::loose_geom, DRWSubdivCache::loose_geom, DRWSubdivLooseEdge::loose_subdiv_v1_index, DRWSubdivLooseEdge::loose_subdiv_v2_index, Mesh::medge, MEM_callocN, DRWSubdivCache::mesh, Mesh::mvert, DRWSubdivCache::resolution, Subdiv::settings, DRWSubdivCache::subdiv, u1, u2, MEdge::v1, MEdge::v2, MeshExtractLooseGeom::vert_len, DRWSubdivLooseGeom::vert_len, MeshExtractLooseGeom::verts, and DRWSubdivLooseGeom::verts.
Referenced by blender::draw::mesh_buffer_cache_create_requested_subdiv().