Blender
V3.3
|
#include "DNA_curve_types.h"
#include "DNA_curves_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_pointcloud_types.h"
#include "DNA_scene_types.h"
#include "DNA_volume_types.h"
#include "UI_resources.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "GPU_batch.h"
#include "GPU_batch_utils.h"
#include "GPU_capabilities.h"
#include "MEM_guardedalloc.h"
#include "draw_cache.h"
#include "draw_cache_impl.h"
#include "draw_manager.h"
Go to the source code of this file.
Classes | |
struct | Vert |
struct | VertShaded |
struct | DRWShapeCache |
Lights | |
#define | DIAMOND_NSEGMENTS 4 |
#define | INNER_NSEGMENTS 8 |
#define | OUTER_NSEGMENTS 10 |
#define | CIRCLE_NSEGMENTS 32 |
static float | light_distance_z_get (char axis, const bool start) |
GPUBatch * | DRW_cache_groundline_get (void) |
GPUBatch * | DRW_cache_light_point_lines_get (void) |
GPUBatch * | DRW_cache_light_sun_lines_get (void) |
GPUBatch * | DRW_cache_light_spot_lines_get (void) |
GPUBatch * | DRW_cache_light_spot_volume_get (void) |
GPUBatch * | DRW_cache_light_area_disk_lines_get (void) |
GPUBatch * | DRW_cache_light_area_square_lines_get (void) |
Internal Types | |
typedef struct Vert | Vert |
typedef struct VertShaded | VertShaded |
static struct DRWShapeCache | SHC = {NULL} |
void | DRW_shape_cache_free (void) |
Common | |
static const float | bone_box_verts [8][3] |
static const float | bone_box_smooth_normals [8][3] |
static const uint | bone_box_wire [24] |
static const uint | bone_box_solid_tris [12][3] |
static const uint | bone_box_wire_lines_adjacency [12][4] |
static const float | bone_box_solid_normals [12][3] |
static void | circle_verts (GPUVertBuf *vbo, int *vert_idx, int segments, float radius, float z, int flag) |
static void | circle_dashed_verts (GPUVertBuf *vbo, int *vert_idx, int segments, float radius, float z, int flag) |
GPUBatch * | DRW_cache_cube_get (void) |
GPUBatch * | DRW_cache_circle_get (void) |
GPUBatch * | DRW_cache_normal_arrow_get (void) |
#define CIRCLE_NSEGMENTS 32 |
Definition at line 1454 of file draw_cache.c.
#define CIRCLE_RESOL 64 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 32 |
#define CIRCLE_RESOL 64 |
#define CIRCLE_RESOL 64 |
#define CIRCLE_RESOL 64 |
#define CIRCLE_RESOL 12 |
#define CIRCLE_RESOL 32 |
#define COL_BONE (1 << 3) |
Definition at line 2369 of file draw_cache.c.
#define COL_HEAD (1 << 1) |
Definition at line 2367 of file draw_cache.c.
#define COL_TAIL (1 << 2) |
Definition at line 2368 of file draw_cache.c.
#define COL_WIRE (1 << 0) |
Definition at line 2366 of file draw_cache.c.
#define DIAMOND_NSEGMENTS 4 |
Definition at line 1451 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LATITUDE_HIGH 80 |
Definition at line 68 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LATITUDE_LOW 32 |
Definition at line 62 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LATITUDE_MEDIUM 64 |
Definition at line 65 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LONGITUDE_HIGH 60 |
Definition at line 69 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LONGITUDE_LOW 24 |
Definition at line 63 of file draw_cache.c.
#define DRW_SPHERE_SHAPE_LONGITUDE_MEDIUM 48 |
Definition at line 66 of file draw_cache.c.
#define INNER_NSEGMENTS 8 |
Definition at line 1452 of file draw_cache.c.
#define MARKER_FILL_LAYER 6 |
Definition at line 2514 of file draw_cache.c.
#define MARKER_LEN (sizeof(axis_marker) / (sizeof(float[2]))) |
Definition at line 2513 of file draw_cache.c.
#define NSEGMENTS 32 |
#define NSEGMENTS 8 |
#define NSEGMENTS 12 |
#define NSEGMENTS 24 /* Must be multiple of 2. */ |
#define OUTER_NSEGMENTS 10 |
Definition at line 1453 of file draw_cache.c.
#define POS_BONE (1 << 6) |
Definition at line 2373 of file draw_cache.c.
#define POS_HEAD (1 << 4) |
Definition at line 2371 of file draw_cache.c.
#define POS_TAIL (1 << 5) |
Definition at line 2372 of file draw_cache.c.
#define S_X 0.0215f |
Definition at line 2490 of file draw_cache.c.
#define S_X 0.0175f |
Definition at line 2490 of file draw_cache.c.
#define S_X 0.02f |
Definition at line 2490 of file draw_cache.c.
#define S_X 0.007f |
Definition at line 2490 of file draw_cache.c.
#define S_Y 0.025f |
Definition at line 2491 of file draw_cache.c.
#define S_Y 0.025f |
Definition at line 2491 of file draw_cache.c.
#define S_Y 0.025f |
Definition at line 2491 of file draw_cache.c.
#define S_Y 0.007f |
Definition at line 2491 of file draw_cache.c.
#define set_vert | ( | a, | |
b, | |||
quarter | |||
) |
Definition at line 2577 of file draw_cache.c.
#define SIDE_STIPPLE 32 |
#define SIDE_STIPPLE 32 |
#define SPIRAL_RESOL 32 |
#define VCLASS_CAMERA_DIST (1 << 6) |
Definition at line 48 of file draw_cache.c.
#define VCLASS_CAMERA_FRAME (1 << 5) |
Definition at line 47 of file draw_cache.c.
#define VCLASS_CAMERA_VOLUME (1 << 7) |
Definition at line 49 of file draw_cache.c.
#define VCLASS_EMPTY_AXES (1 << 11) |
Definition at line 55 of file draw_cache.c.
#define VCLASS_EMPTY_AXES_NAME (1 << 12) |
Definition at line 56 of file draw_cache.c.
#define VCLASS_EMPTY_AXES_SHADOW (1 << 13) |
Definition at line 57 of file draw_cache.c.
#define VCLASS_EMPTY_SCALED (1 << 10) |
Definition at line 54 of file draw_cache.c.
#define VCLASS_EMPTY_SIZE (1 << 14) |
Definition at line 58 of file draw_cache.c.
#define VCLASS_LIGHT_AREA_SHAPE (1 << 0) |
Definition at line 41 of file draw_cache.c.
#define VCLASS_LIGHT_DIST (1 << 4) |
Definition at line 45 of file draw_cache.c.
#define VCLASS_LIGHT_SPOT_BLEND (1 << 2) |
Definition at line 43 of file draw_cache.c.
#define VCLASS_LIGHT_SPOT_CONE (1 << 3) |
Definition at line 44 of file draw_cache.c.
#define VCLASS_LIGHT_SPOT_SHAPE (1 << 1) |
Definition at line 42 of file draw_cache.c.
#define VCLASS_SCREENALIGNED (1 << 9) |
Definition at line 52 of file draw_cache.c.
#define VCLASS_SCREENSPACE (1 << 8) |
Definition at line 51 of file draw_cache.c.
#define X_LEN (sizeof(x_axis_name) / (sizeof(float[2]))) |
Definition at line 2454 of file draw_cache.c.
#define Y_LEN (sizeof(y_axis_name) / (sizeof(float[2]))) |
Definition at line 2468 of file draw_cache.c.
#define Z_LEN (sizeof(z_axis_name) / (sizeof(float[2]))) |
Definition at line 2486 of file draw_cache.c.
typedef struct VertShaded VertShaded |
|
static |
Definition at line 225 of file draw_cache.c.
References GPU_vertbuf_attr_set().
Definition at line 2150 of file draw_cache.c.
Referenced by DRW_cache_bone_envelope_solid_get().
|
static |
Definition at line 563 of file draw_cache.c.
References Freestyle::a, angle(), usdtokens::b(), Freestyle::c, cosf, GPU_vertbuf_vert_set(), M_PI, sinf, v, and z.
Referenced by DRW_cache_field_cone_limit_get(), DRW_cache_field_sphere_limit_get(), DRW_cache_field_tube_limit_get(), DRW_cache_light_area_disk_lines_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_point_lines_get(), DRW_cache_light_spot_lines_get(), and DRW_cache_light_sun_lines_get().
|
static |
Definition at line 548 of file draw_cache.c.
References Freestyle::a, angle(), usdtokens::b(), Freestyle::c, cosf, GPU_vertbuf_vert_set(), M_PI, sinf, v, and z.
Referenced by DRW_cache_camera_distances_get(), DRW_cache_field_curve_get(), DRW_cache_field_force_get(), DRW_cache_field_wind_get(), DRW_cache_groundline_get(), DRW_cache_light_area_disk_lines_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_point_lines_get(), DRW_cache_light_spot_lines_get(), DRW_cache_light_sun_lines_get(), DRW_cache_lightprobe_cube_get(), and DRW_cache_lightprobe_grid_get().
Definition at line 3397 of file draw_cache.c.
References Object::data, DRW_curves_batch_cache_free_old(), DRW_mesh_batch_cache_free_old(), OB_CURVES, OB_MESH, and Object::type.
Referenced by DRW_cache_free_old_batches().
Definition at line 3329 of file draw_cache.c.
References CTX_data_mode_enum_ex(), CTX_MODE_EDIT_MESH, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_SCULPT, Object::data, DRW_context_state_get(), DRW_curve_batch_cache_create_requested(), DRW_curves_batch_cache_create_requested(), DRW_mesh_batch_cache_create_requested(), DRW_object_is_in_edit_mode(), DRW_object_use_hide_faces(), DST, ELEM, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MESH, OB_SURF, DRWContextState::obact, DRWContextState::object_edit, DRWContextState::object_mode, scene, DRWContextState::scene, DRWManager::task_graph, and Object::type.
Referenced by drw_engines_cache_populate(), DRW_render_object_iter(), and duplidata_key_free().
Definition at line 3392 of file draw_cache.c.
References BLI_gset_add(), DRWManager::delayed_extraction, and DST.
Referenced by drw_shgroup_bone_custom_mesh_wire(), drw_shgroup_bone_custom_solid_mesh(), and drw_shgroup_custom_bone_curve().
Definition at line 3362 of file draw_cache.c.
References BKE_object_get_evaluated_mesh_no_subsurf(), CTX_data_mode_enum_ex(), CTX_MODE_EDIT_MESH, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_SCULPT, DRW_context_state_get(), DRW_curve_batch_cache_create_requested(), DRW_mesh_batch_cache_create_requested(), DRW_object_is_in_edit_mode(), DRW_object_use_hide_faces(), DST, ELEM, mesh, NULL, OB_CURVES_LEGACY, OB_FONT, OB_MESH, OB_SURF, DRWContextState::obact, DRWContextState::object_edit, DRWContextState::object_mode, scene, DRWContextState::scene, DRWManager::task_graph, and Object::type.
Referenced by drw_task_graph_deinit().
Definition at line 3298 of file draw_cache.c.
References Object::data, DRW_curve_batch_cache_validate(), DRW_curves_batch_cache_validate(), DRW_lattice_batch_cache_validate(), DRW_mball_batch_cache_validate(), DRW_mesh_batch_cache_validate(), DRW_pointcloud_batch_cache_validate(), DRW_volume_batch_cache_validate(), OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by DRW_draw_depth_object(), drw_duplidata_load(), drw_engines_cache_populate(), and DRW_render_object_iter().
Definition at line 2518 of file draw_cache.c.
References axis_marker, DRWShapeCache::drw_bone_arrows, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), MARKER_FILL_LAYER, MARKER_LEN, mul_v2_v2fl(), NULL, SHC, v, VCLASS_EMPTY_AXES, VCLASS_EMPTY_AXES_NAME, VCLASS_SCREENALIGNED, x_axis_name, X_LEN, y_axis_name, Y_LEN, z_axis_name, and Z_LEN.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2090 of file draw_cache.c.
References attr_id, bone_box_smooth_normals, bone_box_solid_normals, bone_box_solid_tris, bone_box_verts, DRWShapeCache::drw_bone_box, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), nor, NULL, pos, and SHC.
Referenced by DRW_cache_bone_box_wire_get(), and OVERLAY_armature_cache_init().
Definition at line 2123 of file draw_cache.c.
References bone_box_wire_lines_adjacency, DRWShapeCache::drw_bone_box_wire, DRW_cache_bone_box_get(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_indexbuf_add_line_adj_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_LINES_ADJ, GPUBatch, and SHC.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2637 of file draw_cache.c.
References Freestyle::a, ARRAY_SIZE, attr_id, cosf, DRWShapeCache::drw_bone_dof_lines, float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_LOOP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, pos, set_vert, SHC, sinf, staticSine, v, x, and y.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2584 of file draw_cache.c.
References ARRAY_SIZE, attr_id, DRWShapeCache::drw_bone_dof_sphere, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_data_resize(), GPU_vertformat_attr_add(), NULL, pos, set_vert, SHC, staticSine, v, x, and z.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2207 of file draw_cache.c.
References Freestyle::a, attr_id, CIRCLE_RESOL, copy_v2_v2(), cosf, DRWShapeCache::drw_bone_envelope_outline, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_STRIP, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, SHC, sinf, v, v1, and v2.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2157 of file draw_cache.c.
References attr_id, benv_lat_lon_to_co(), DRWShapeCache::drw_bone_envelope, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_STRIP, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, pos, and SHC.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2029 of file draw_cache.c.
References attr_id, bone_octahedral_smooth_normals, bone_octahedral_solid_normals, bone_octahedral_solid_tris, bone_octahedral_verts, DRWShapeCache::drw_bone_octahedral, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), nor, NULL, pos, and SHC.
Referenced by DRW_cache_bone_octahedral_wire_get(), and OVERLAY_armature_cache_init().
Definition at line 2065 of file draw_cache.c.
References bone_octahedral_wire_lines_adjacency, DRWShapeCache::drw_bone_octahedral_wire, DRW_cache_bone_octahedral_get(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_indexbuf_add_line_adj_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_LINES_ADJ, GPUBatch, and SHC.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2252 of file draw_cache.c.
References Freestyle::a, attr_id, CIRCLE_RESOL, cosf, DRWShapeCache::drw_bone_point, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRI_FAN, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, nor, NULL, pos, SHC, sinf, and v.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2327 of file draw_cache.c.
References Freestyle::a, attr_id, CIRCLE_RESOL, cosf, DRWShapeCache::drw_bone_point_wire, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, pos, SHC, sinf, sphere_wire_vbo(), and v.
Referenced by OVERLAY_armature_cache_init(), and OVERLAY_metaball_cache_init().
Definition at line 2375 of file draw_cache.c.
References Freestyle::a, attr_id, CIRCLE_RESOL, COL_BONE, COL_HEAD, COL_TAIL, COL_WIRE, copy_v2_fl(), cosf, DRWShapeCache::drw_bone_stick, ELEM, GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_COMP_U32, GPU_FETCH_FLOAT, GPU_FETCH_INT, GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), GPU_indexbuf_build(), GPU_indexbuf_init_ex(), GPU_PRIM_TRI_FAN, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, pos, POS_BONE, POS_HEAD, POS_TAIL, SHC, sinf, and v.
Referenced by OVERLAY_armature_cache_init().
Definition at line 2802 of file draw_cache.c.
References circle_verts(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_camera_distances, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_CAMERA_DIST, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2677 of file draw_cache.c.
References Freestyle::a, usdtokens::b(), DRWShapeCache::drw_camera_frame, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_CAMERA_FRAME, x, and y.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2782 of file draw_cache.c.
References DRWShapeCache::drw_camera_tria, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, and VCLASS_CAMERA_FRAME.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2758 of file draw_cache.c.
References Freestyle::a, usdtokens::b(), DRWShapeCache::drw_camera_tria_wire, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_CAMERA_FRAME, x, and y.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2709 of file draw_cache.c.
References Freestyle::a, ARRAY_SIZE, bone_box_solid_tris, bone_box_verts, DRWShapeCache::drw_camera_volume, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_CAMERA_FRAME, VCLASS_CAMERA_VOLUME, x, y, and z.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2734 of file draw_cache.c.
References ARRAY_SIZE, bone_box_verts, bone_box_wire, DRWShapeCache::drw_camera_volume_wire, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_CAMERA_FRAME, VCLASS_CAMERA_VOLUME, x, y, and z.
Referenced by OVERLAY_extra_cache_init().
Definition at line 728 of file draw_cache.c.
References Freestyle::a, CIRCLE_RESOL, cosf, DRWShapeCache::drw_circle, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINE_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, SHC, sinf, v, VCLASS_EMPTY_SCALED, x, y, and z.
Referenced by overlay_edit_mesh_add_ob_to_pass(), and OVERLAY_extra_cache_init().
Definition at line 695 of file draw_cache.c.
References ARRAY_SIZE, bone_box_solid_tris, bone_box_verts, DRWShapeCache::drw_cube, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), SHC, v, VCLASS_EMPTY_SCALED, x, y, and z.
Referenced by OVERLAY_background_cache_init(), workbench_volume_modifier_cache_populate(), and workbench_volume_object_cache_populate().
Definition at line 3198 of file draw_cache.c.
References angle(), attr_id, color, cosf, DRWShapeCache::drw_cursor, DRWShapeCache::drw_cursor_only_circle, float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_COMP_U8, GPU_FETCH_FLOAT, GPU_FETCH_INT_TO_FLOAT_UNIT, GPU_indexbuf_add_generic_vert(), GPU_indexbuf_add_primitive_restart(), GPU_indexbuf_build(), GPU_indexbuf_init_ex(), GPU_PRIM_LINE_STRIP, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), GPUBatch, M_PI, NULL, pos, red, SHC, sinf, TH_VIEW_OVERLAY, UI_GetThemeColor3ubv(), v, x, and y.
Referenced by DRW_draw_cursor(), and DRW_draw_cursor_2d_ex().
Definition at line 2933 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_normal_edge(), OB_CURVES_LEGACY, and Object::type.
Referenced by OVERLAY_edit_curve_cache_populate().
Definition at line 2940 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_edit_edges(), ELEM, OB_CURVES_LEGACY, OB_SURF, and Object::type.
Referenced by OVERLAY_edit_curve_cache_populate(), and OVERLAY_edit_surf_cache_populate().
Definition at line 2926 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_wire_edge(), OB_CURVES_LEGACY, and Object::type.
Referenced by drw_shgroup_custom_bone_curve(), OVERLAY_edit_curve_cache_populate(), and OVERLAY_wireframe_cache_populate().
Definition at line 2948 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_edit_verts(), ELEM, OB_CURVES_LEGACY, OB_SURF, and Object::type.
Referenced by OVERLAY_edit_curve_cache_populate(), and OVERLAY_edit_surf_cache_populate().
Definition at line 1172 of file draw_cache.c.
References attr_id, DRWShapeCache::drw_empty_capsule_body, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, pos, and SHC.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1205 of file draw_cache.c.
References angle(), attr_id, copy_v2_v2(), copy_v3_fl3(), cosf, DRWShapeCache::drw_empty_capsule_cap, float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NSEGMENTS, NULL, pos, SHC, sinf, and v.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1092 of file draw_cache.c.
References angle(), cosf, DRWShapeCache::drw_empty_cone, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NSEGMENTS, NULL, SHC, sinf, v, and VCLASS_EMPTY_SCALED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1025 of file draw_cache.c.
References ARRAY_SIZE, bone_box_verts, bone_box_wire, DRWShapeCache::drw_empty_cube, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, VCLASS_EMPTY_SCALED, x, y, and z.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1131 of file draw_cache.c.
References angle(), cosf, DRWShapeCache::drw_empty_cylinder, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NSEGMENTS, NULL, SHC, sinf, v, and VCLASS_EMPTY_SCALED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1083 of file draw_cache.c.
References DRWShapeCache::drw_empty_sphere, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, NULL, SHC, sphere_wire_vbo(), and VCLASS_EMPTY_SCALED.
Referenced by drw_debug_draw_spheres(), and OVERLAY_extra_cache_init().
Definition at line 1390 of file draw_cache.c.
References Freestyle::a, angle(), circle_dashed_verts(), CIRCLE_RESOL, cosf, DRWShapeCache::drw_field_cone_limit, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, SHC, SIDE_STIPPLE, sinf, v, VCLASS_EMPTY_SIZE, and z.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1336 of file draw_cache.c.
References CIRCLE_RESOL, circle_verts(), DRWShapeCache::drw_field_curve, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, SHC, v, VCLASS_EMPTY_SIZE, and VCLASS_SCREENALIGNED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1284 of file draw_cache.c.
References CIRCLE_RESOL, circle_verts(), DRWShapeCache::drw_field_force, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, SHC, v, VCLASS_EMPTY_SIZE, and VCLASS_SCREENALIGNED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1424 of file draw_cache.c.
References circle_dashed_verts(), CIRCLE_RESOL, DRWShapeCache::drw_field_sphere_limit, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, SHC, v, VCLASS_EMPTY_SIZE, and VCLASS_SCREENALIGNED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1356 of file draw_cache.c.
References Freestyle::a, angle(), circle_dashed_verts(), CIRCLE_RESOL, cosf, DRWShapeCache::drw_field_tube_limit, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, SHC, SIDE_STIPPLE, sinf, v, VCLASS_EMPTY_SIZE, and z.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1307 of file draw_cache.c.
References Freestyle::a, angle(), cosf, DRWShapeCache::drw_field_vortex, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINE_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, r, SHC, sinf, SPIRAL_RESOL, v, and VCLASS_EMPTY_SIZE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1261 of file draw_cache.c.
References CIRCLE_RESOL, circle_verts(), DRWShapeCache::drw_field_wind, extra_vert_format(), float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), NULL, SHC, v, VCLASS_EMPTY_SIZE, and z.
Referenced by OVERLAY_extra_cache_init().
Use this one for rendering full-screen passes. For 3D objects use DRW_cache_quad_get().
Definition at line 356 of file draw_cache.c.
References attr_id, DRWShapeCache::drw_fullscreen_quad, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_alias_add(), GPU_vertformat_attr_add(), NULL, pos, and SHC.
Referenced by DRW_transform_none(), eevee_create_bloom_pass(), EEVEE_effects_cache_init(), EEVEE_lightbake_cache_init(), EEVEE_lightprobes_cache_init(), EEVEE_materials_cache_init(), EEVEE_mist_output_init(), EEVEE_occlusion_output_init(), EEVEE_renderpasses_cache_finish(), EEVEE_shadow_output_init(), EEVEE_temporal_sampling_cache_init(), EEVEE_volumes_output_init(), and blender::eevee::WorldPipeline::sync().
Definition at line 429 of file draw_cache.c.
References attr_id, DRWShapeCache::drw_grid, float(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), madd_v2_v2v2fl(), NULL, pos, and SHC.
Referenced by OVERLAY_grid_cache_init().
Definition at line 1475 of file draw_cache.c.
References circle_verts(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_ground_line, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, and v.
Referenced by OVERLAY_extra_cache_init().
Definition at line 3043 of file draw_cache.c.
References BLI_assert, Object::data, DRW_lattice_batch_cache_get_edit_verts(), OB_LATTICE, and Object::type.
Referenced by OVERLAY_edit_lattice_cache_populate().
Definition at line 3021 of file draw_cache.c.
References BLI_assert, Object::data, DRW_lattice_batch_cache_get_all_verts(), OB_LATTICE, and Object::type.
Definition at line 3029 of file draw_cache.c.
References BLI_assert, BLI_listbase_is_empty(), Object::data, DRW_lattice_batch_cache_get_all_edges(), Lattice::dvert, Lattice::editlatt, EditLatt::latt, OB_LATTICE, Object::type, Lattice::vertex_group_active_index, and Lattice::vertex_group_names.
Referenced by OVERLAY_edit_lattice_cache_populate(), and OVERLAY_lattice_cache_populate().
Definition at line 1627 of file draw_cache.c.
References circle_dashed_verts(), CIRCLE_NSEGMENTS, circle_verts(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_light_area_disk_lines, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), INNER_NSEGMENTS, light_distance_z_get(), NULL, OUTER_NSEGMENTS, r, SHC, v, VCLASS_LIGHT_AREA_SHAPE, VCLASS_LIGHT_DIST, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1659 of file draw_cache.c.
References Freestyle::a, usdtokens::b(), circle_dashed_verts(), circle_verts(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_light_area_square_lines, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), INNER_NSEGMENTS, light_distance_z_get(), NULL, OUTER_NSEGMENTS, r, SHC, v, VCLASS_LIGHT_AREA_SHAPE, VCLASS_LIGHT_DIST, VCLASS_SCREENSPACE, x, and y.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1496 of file draw_cache.c.
References circle_dashed_verts(), CIRCLE_NSEGMENTS, circle_verts(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_light_point_lines, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), INNER_NSEGMENTS, NULL, OUTER_NSEGMENTS, r, SHC, v, VCLASS_LIGHT_AREA_SHAPE, VCLASS_SCREENALIGNED, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1554 of file draw_cache.c.
References Freestyle::a, angle(), Freestyle::c, circle_dashed_verts(), CIRCLE_NSEGMENTS, circle_verts(), cosf, DIAMOND_NSEGMENTS, DRWShapeCache::drw_light_spot_lines, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), INNER_NSEGMENTS, light_distance_z_get(), M_PI, NULL, OUTER_NSEGMENTS, r, SHC, sinf, v, VCLASS_LIGHT_AREA_SHAPE, VCLASS_LIGHT_DIST, VCLASS_LIGHT_SPOT_BLEND, VCLASS_LIGHT_SPOT_CONE, VCLASS_LIGHT_SPOT_SHAPE, VCLASS_SCREENALIGNED, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1600 of file draw_cache.c.
References Freestyle::a, angle(), Freestyle::c, CIRCLE_NSEGMENTS, cosf, DRWShapeCache::drw_light_spot_volume, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_TRI_FAN, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, SHC, sinf, v, and VCLASS_LIGHT_SPOT_SHAPE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1520 of file draw_cache.c.
References Freestyle::a, angle(), Freestyle::c, circle_dashed_verts(), circle_verts(), cosf, DIAMOND_NSEGMENTS, DRWShapeCache::drw_light_sun_lines, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), INNER_NSEGMENTS, M_PI, NULL, OUTER_NSEGMENTS, r, SHC, sinf, v, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1773 of file draw_cache.c.
References circle_verts(), copy_v2_v2(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_lightprobe_cube, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), light_distance_z_get(), NULL, r, SHC, v, VCLASS_LIGHT_DIST, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1827 of file draw_cache.c.
References add_v2_v2v2(), circle_verts(), copy_v2_v2(), DIAMOND_NSEGMENTS, DRWShapeCache::drw_lightprobe_grid, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), light_distance_z_get(), mul_v2_v2fl(), NULL, r, SHC, v, VCLASS_LIGHT_DIST, and VCLASS_SCREENSPACE.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1889 of file draw_cache.c.
References Freestyle::a, DRWShapeCache::drw_lightprobe_planar, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, r, SHC, v, VCLASS_SCREENSPACE, x, and y.
Referenced by OVERLAY_extra_cache_init().
Definition at line 2968 of file draw_cache.c.
References BLI_assert, DRW_metaball_batch_cache_get_edge_detection(), OB_MBALL, and Object::type.
Referenced by DRW_cache_object_edge_detection_get().
Definition at line 2974 of file draw_cache.c.
References BLI_assert, DRW_metaball_batch_cache_get_wireframes_face(), OB_MBALL, and Object::type.
Referenced by DRW_cache_object_face_wireframe_get().
Definition at line 2962 of file draw_cache.c.
References BLI_assert, DRW_metaball_batch_cache_get_triangles_with_normals(), OB_MBALL, and Object::type.
Referenced by DRW_cache_object_surface_get().
GPUBatch** DRW_cache_mball_surface_shaded_get | ( | Object * | ob, |
struct GPUMaterial ** | gpumat_array, | ||
uint | gpumat_array_len | ||
) |
Definition at line 2980 of file draw_cache.c.
References BLI_assert, Object::data, DRW_metaball_batch_cache_get_surface_shaded(), OB_MBALL, and Object::type.
Referenced by DRW_cache_object_surface_material_get().
Definition at line 2840 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_all_edges(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_all_edges_get().
Definition at line 2834 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_all_verts(), OB_MESH, and Object::type.
Referenced by OVERLAY_paint_vertex_cache_populate(), and OVERLAY_wireframe_cache_populate().
Definition at line 2852 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_edge_detection(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_edge_detection_get().
Definition at line 2908 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_wireframes_face(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_face_wireframe_get().
Definition at line 2846 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_loose_edges(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_loose_edges_get(), and OVERLAY_wireframe_cache_populate().
Definition at line 2864 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_edges(), OB_MESH, and Object::type.
Referenced by OVERLAY_paint_vertex_cache_populate().
Definition at line 2858 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_surface_get(), OVERLAY_edit_mesh_cache_populate(), OVERLAY_paint_texture_cache_populate(), and OVERLAY_paint_vertex_cache_populate().
Definition at line 2914 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_edit_mesh_analysis(), OB_MESH, and Object::type.
Referenced by OVERLAY_edit_mesh_cache_populate().
Definition at line 2896 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_sculpt(), OB_MESH, and Object::type.
Referenced by workbench_cache_common_populate().
GPUBatch** DRW_cache_mesh_surface_shaded_get | ( | struct Object * | ob, |
struct GPUMaterial ** | gpumat_array, | ||
uint | gpumat_array_len | ||
) |
Return list of batches with length equal to max(1, totcol)
.
Definition at line 2870 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_shaded(), OB_MESH, and Object::type.
Referenced by DRW_cache_object_surface_material_get().
Return list of batches with length equal to max(1, totcol)
.
Definition at line 2878 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_texpaint(), OB_MESH, and Object::type.
Referenced by workbench_cache_common_populate(), and workbench_cache_texpaint_populate().
Definition at line 2884 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_texpaint_single(), OB_MESH, and Object::type.
Referenced by OVERLAY_paint_texture_cache_populate(), and workbench_cache_texpaint_populate().
Definition at line 2890 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_vertpaint(), OB_MESH, and Object::type.
Referenced by workbench_cache_common_populate().
Definition at line 2902 of file draw_cache.c.
References BLI_assert, Object::data, DRW_mesh_batch_cache_get_surface_weights(), OB_MESH, and Object::type.
Referenced by OVERLAY_paint_vertex_cache_populate().
Definition at line 751 of file draw_cache.c.
References DRWShapeCache::drw_normal_arrow, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, and SHC.
Referenced by OVERLAY_edit_mesh_cache_populate().
Definition at line 800 of file draw_cache.c.
References DRW_cache_mesh_all_edges_get(), NULL, OB_MESH, and Object::type.
Referenced by basic_cache_populate().
Definition at line 812 of file draw_cache.c.
References DRW_cache_mball_edge_detection_get(), DRW_cache_mesh_edge_detection_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by OVERLAY_outline_cache_populate(), and workbench_shadow_cache_populate().
Definition at line 836 of file draw_cache.c.
References DRW_cache_gpencil_face_wireframe_get(), DRW_cache_mball_face_wireframe_get(), DRW_cache_mesh_face_wireframe_get(), DRW_cache_volume_face_wireframe_get(), DRW_pointcloud_batch_cache_get_dots(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by OVERLAY_wireframe_cache_populate().
Definition at line 863 of file draw_cache.c.
References DRW_cache_mesh_loose_edges_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
int DRW_cache_object_material_count_get | ( | struct Object * | ob | ) |
Definition at line 936 of file draw_cache.c.
References BKE_object_get_evaluated_mesh_no_subsurf(), BLI_assert, Object::data, DRW_curve_material_count_get(), DRW_curves_material_count_get(), DRW_gpencil_material_count_get(), DRW_mesh_material_count_get(), DRW_metaball_material_count_get(), DRW_pointcloud_material_count_get(), DRW_volume_material_count_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, type, and Object::type.
Referenced by basic_cache_populate(), basic_object_surface_material_get(), EEVEE_cryptomatte_cache_populate(), EEVEE_materials_cache_populate(), blender::eevee::MaterialModule::material_array_get(), workbench_cache_common_populate(), workbench_cache_sculpt_populate(), workbench_cache_texpaint_populate(), and workbench_object_surface_material_get().
GPUVertBuf* DRW_cache_object_pos_vertbuf_get | ( | struct Object * | ob | ) |
Returns the vertbuf used by shaded surface batch.
Definition at line 911 of file draw_cache.c.
References BKE_object_get_evaluated_mesh_no_subsurf(), Object::data, DRW_mball_batch_cache_pos_vertbuf_get(), DRW_mesh_batch_cache_pos_vertbuf_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, type, and Object::type.
Referenced by EEVEE_motion_blur_cache_populate(), and blender::eevee::VelocityModule::step_object_sync().
Definition at line 887 of file draw_cache.c.
References DRW_cache_mball_surface_get(), DRW_cache_mesh_surface_get(), DRW_cache_pointcloud_surface_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by basic_cache_populate(), EEVEE_cryptomatte_cache_populate(), EEVEE_motion_blur_cache_populate(), external_cache_populate(), OVERLAY_facing_cache_populate(), OVERLAY_fade_cache_populate(), OVERLAY_mode_transfer_cache_populate(), OVERLAY_outline_cache_populate(), OVERLAY_pose_cache_populate(), workbench_cache_common_populate(), and workbench_shadow_cache_populate().
GPUBatch** DRW_cache_object_surface_material_get | ( | struct Object * | ob, |
struct GPUMaterial ** | gpumat_array, | ||
uint | gpumat_array_len | ||
) |
Definition at line 971 of file draw_cache.c.
References DRW_cache_mball_surface_shaded_get(), DRW_cache_mesh_surface_shaded_get(), DRW_cache_pointcloud_surface_shaded_get(), NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, and Object::type.
Referenced by basic_object_surface_material_get(), EEVEE_cryptomatte_cache_populate(), EEVEE_materials_cache_populate(), blender::eevee::SyncModule::sync_mesh(), and workbench_object_surface_material_get().
GPUBatch* DRW_cache_particles_get_dots | ( | Object * | object, |
ParticleSystem * | psys | ||
) |
Definition at line 3098 of file draw_cache.c.
References DRW_particles_batch_cache_get_dots().
Referenced by OVERLAY_particle_cache_populate().
GPUBatch* DRW_cache_particles_get_edit_inner_points | ( | Object * | object, |
ParticleSystem * | psys, | ||
struct PTCacheEdit * | edit | ||
) |
Definition at line 3111 of file draw_cache.c.
References DRW_particles_batch_cache_get_edit_inner_points().
Referenced by OVERLAY_edit_particle_cache_populate().
GPUBatch* DRW_cache_particles_get_edit_strands | ( | Object * | object, |
ParticleSystem * | psys, | ||
struct PTCacheEdit * | edit, | ||
bool | use_weight | ||
) |
Definition at line 3103 of file draw_cache.c.
References DRW_particles_batch_cache_get_edit_strands().
Referenced by OVERLAY_edit_particle_cache_populate().
GPUBatch* DRW_cache_particles_get_edit_tip_points | ( | Object * | object, |
ParticleSystem * | psys, | ||
struct PTCacheEdit * | edit | ||
) |
Definition at line 3118 of file draw_cache.c.
References DRW_particles_batch_cache_get_edit_tip_points().
Referenced by OVERLAY_edit_particle_cache_populate().
GPUBatch* DRW_cache_particles_get_hair | ( | Object * | object, |
ParticleSystem * | psys, | ||
ModifierData * | md | ||
) |
Definition at line 3093 of file draw_cache.c.
References DRW_particles_batch_cache_get_hair().
Referenced by basic_cache_populate_particles(), external_cache_populate(), and wireframe_hair_cache_populate().
GPUBatch* DRW_cache_particles_get_prim | ( | int | type | ) |
Definition at line 3125 of file draw_cache.c.
References Freestyle::a, angle(), BLI_assert, CIRCLE_RESOL, cosf, DRWShapeCache::drw_particle_axis, DRWShapeCache::drw_particle_circle, DRWShapeCache::drw_particle_cross, extra_vert_format(), Lattice::flag, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINE_STRIP, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NULL, PART_DRAW_AXIS, PART_DRAW_CIRC, PART_DRAW_CROSS, SHC, sinf, type, v, VCLASS_EMPTY_AXES, VCLASS_SCREENALIGNED, x, and y.
Referenced by OVERLAY_particle_cache_populate().
Definition at line 1003 of file draw_cache.c.
References DRWShapeCache::drw_plain_axes, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, and VCLASS_EMPTY_SCALED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 3057 of file draw_cache.c.
References BLI_assert, DRW_pointcloud_batch_cache_get_dots(), OB_POINTCLOUD, and Object::type.
Definition at line 3063 of file draw_cache.c.
References BLI_assert, DRW_pointcloud_batch_cache_get_surface(), OB_POINTCLOUD, and Object::type.
Referenced by DRW_cache_object_surface_get().
Definition at line 183 of file draw_cache.c.
References DRWShapeCache::drw_procedural_lines, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, and SHC.
Referenced by DRW_shgroup_call_procedural_lines().
Definition at line 169 of file draw_cache.c.
References DRWShapeCache::drw_procedural_verts, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_POINTS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, and SHC.
Referenced by DRW_shgroup_call_procedural_points().
Definition at line 197 of file draw_cache.c.
References DRWShapeCache::drw_procedural_tris, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, and SHC.
Referenced by DRW_shgroup_call_procedural_triangles().
Definition at line 389 of file draw_cache.c.
References Freestyle::a, DRWShapeCache::drw_quad, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_TRI_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, and VCLASS_EMPTY_SCALED.
Referenced by edit_text_cache_populate_cursor(), edit_text_cache_populate_select(), EEVEE_lightprobes_cache_init(), external_cache_image_add(), OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), OVERLAY_grid_cache_init(), OVERLAY_image_camera_cache_populate(), OVERLAY_image_empty_cache_populate(), and workbench_volume_modifier_cache_populate().
Definition at line 409 of file draw_cache.c.
References Freestyle::a, DRWShapeCache::drw_quad_wires, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINE_STRIP, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, and VCLASS_EMPTY_SCALED.
Referenced by OVERLAY_edit_uv_cache_init(), OVERLAY_extra_cache_init(), and OVERLAY_grid_cache_init().
Definition at line 1045 of file draw_cache.c.
References Freestyle::a, DRWShapeCache::drw_single_arrow, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_PRIM_LINES, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), NULL, SHC, v, and VCLASS_EMPTY_SCALED.
Referenced by OVERLAY_extra_cache_init().
Definition at line 1708 of file draw_cache.c.
References attr_id, copy_v3_fl3(), cosf, DRWShapeCache::drw_speaker, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_LINES, GPU_vertbuf_attr_set(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, pos, r, SHC, sinf, v, x, y, and z.
Referenced by OVERLAY_extra_cache_init().
GPUBatch* DRW_cache_sphere_get | ( | const eDRWLevelOfDetail | level_of_detail | ) |
Definition at line 482 of file draw_cache.c.
References BLI_assert, DRW_LOD_HIGH, DRW_LOD_LOW, DRW_LOD_MAX, DRW_LOD_MEDIUM, DRWShapeCache::drw_sphere_lod, DRW_SPHERE_SHAPE_LATITUDE_HIGH, DRW_SPHERE_SHAPE_LATITUDE_LOW, DRW_SPHERE_SHAPE_LATITUDE_MEDIUM, DRW_SPHERE_SHAPE_LONGITUDE_HIGH, DRW_SPHERE_SHAPE_LONGITUDE_LOW, DRW_SPHERE_SHAPE_LONGITUDE_MEDIUM, extra_vert_format(), GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_F32, GPU_FETCH_FLOAT, GPU_PRIM_TRIS, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), M_PI, NULL, SHC, sphere_lat_lon_vert(), and v.
Referenced by eevee_lookdev_hdri_preview_init(), and OVERLAY_extra_cache_init().
Definition at line 3008 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_wire_edge(), OB_SURF, and Object::type.
Referenced by OVERLAY_wireframe_cache_populate().
Definition at line 2995 of file draw_cache.c.
References BLI_assert, Object::data, DRW_curve_batch_cache_get_wire_edge(), OB_FONT, and Object::type.
Referenced by drw_shgroup_custom_bone_curve(), OVERLAY_edit_text_cache_populate(), and OVERLAY_wireframe_cache_populate().
Definition at line 3075 of file draw_cache.c.
References BLI_assert, Object::data, DRW_volume_batch_cache_get_wireframes_face(), OB_VOLUME, and Object::type.
Referenced by DRW_cache_object_face_wireframe_get().
Definition at line 3081 of file draw_cache.c.
References BLI_assert, Object::data, DRW_volume_batch_cache_get_selection_surface(), OB_VOLUME, and Object::type.
Referenced by OVERLAY_outline_volume(), and OVERLAY_volume_cache_populate().
void DRW_cdlayer_attr_aliases_add | ( | GPUVertFormat * | format, |
const char * | base_name, | ||
const CustomData * | UNUSEDdata, | ||
const CustomDataLayer * | cl, | ||
bool | is_active_render, | ||
bool | is_active_layer | ||
) |
Definition at line 3414 of file draw_cache.c.
References BLI_snprintf(), GPU_MAX_SAFE_ATTR_NAME, GPU_vertformat_alias_add(), GPU_vertformat_safe_attr_name(), and CustomDataLayer::name.
Definition at line 776 of file draw_cache.c.
References DRWShapeCache::drw_gpencil_dummy_quad, GPU_batch_create_ex(), GPU_BATCH_OWNS_VBO, GPU_COMP_U8, GPU_FETCH_INT, GPU_PRIM_TRI_FAN, GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), NULL, and SHC.
Referenced by gpencil_dummy_buffer_get().
Definition at line 153 of file draw_cache.c.
References batch, GPU_BATCH_DISCARD_SAFE, GPUBatch, and SHC.
Referenced by DRW_engines_free().
|
static |
Definition at line 217 of file draw_cache.c.
References GPU_COMP_F32, GPU_COMP_I32, GPU_FETCH_FLOAT, GPU_FETCH_INT, and GPU_vertformat_attr_add().
Referenced by DRW_cache_bone_arrows_get(), DRW_cache_camera_distances_get(), DRW_cache_camera_frame_get(), DRW_cache_camera_tria_get(), DRW_cache_camera_tria_wire_get(), DRW_cache_camera_volume_get(), DRW_cache_camera_volume_wire_get(), DRW_cache_circle_get(), DRW_cache_cube_get(), DRW_cache_empty_cone_get(), DRW_cache_empty_cube_get(), DRW_cache_empty_cylinder_get(), DRW_cache_field_cone_limit_get(), DRW_cache_field_curve_get(), DRW_cache_field_force_get(), DRW_cache_field_sphere_limit_get(), DRW_cache_field_tube_limit_get(), DRW_cache_field_vortex_get(), DRW_cache_field_wind_get(), DRW_cache_groundline_get(), DRW_cache_light_area_disk_lines_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_point_lines_get(), DRW_cache_light_spot_lines_get(), DRW_cache_light_spot_volume_get(), DRW_cache_light_sun_lines_get(), DRW_cache_lightprobe_cube_get(), DRW_cache_lightprobe_grid_get(), DRW_cache_lightprobe_planar_get(), DRW_cache_particles_get_prim(), DRW_cache_plain_axes_get(), DRW_cache_quad_get(), DRW_cache_quad_wires_get(), DRW_cache_single_arrow_get(), DRW_cache_sphere_get(), and sphere_wire_vbo().
Definition at line 1456 of file draw_cache.c.
Referenced by DRW_cache_light_area_disk_lines_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_spot_lines_get(), DRW_cache_lightprobe_cube_get(), and DRW_cache_lightprobe_grid_get().
|
static |
Definition at line 473 of file draw_cache.c.
References cosf, GPU_vertbuf_vert_set(), sinf, VCLASS_EMPTY_SCALED, x, y, and z.
Referenced by DRW_cache_sphere_get().
|
static |
Definition at line 312 of file draw_cache.c.
References angle(), cosf, extra_vert_format(), float(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertbuf_vert_set(), M_PI, NSEGMENTS, sinf, and v.
Referenced by DRW_cache_bone_point_wire_outline_get(), and DRW_cache_empty_sphere_get().
|
static |
|
static |
Definition at line 590 of file draw_cache.c.
Referenced by DRW_cache_bone_box_get().
|
static |
Definition at line 675 of file draw_cache.c.
Referenced by DRW_cache_bone_box_get().
|
static |
Definition at line 613 of file draw_cache.c.
Referenced by DRW_cache_bone_box_get(), DRW_cache_camera_volume_get(), and DRW_cache_cube_get().
|
static |
Definition at line 579 of file draw_cache.c.
Referenced by DRW_cache_bone_box_get(), DRW_cache_camera_volume_get(), DRW_cache_camera_volume_wire_get(), DRW_cache_cube_get(), and DRW_cache_empty_cube_get().
|
static |
Definition at line 601 of file draw_cache.c.
Referenced by DRW_cache_camera_volume_wire_get(), and DRW_cache_empty_cube_get().
|
static |
Store indices of generated verts from bone_box_solid_tris to define adjacency infos. See bone_octahedral_solid_tris for more infos.
Definition at line 637 of file draw_cache.c.
Referenced by DRW_cache_bone_box_wire_get().
|
static |
Definition at line 1936 of file draw_cache.c.
Referenced by DRW_cache_bone_octahedral_get().
|
static |
Definition at line 2018 of file draw_cache.c.
Referenced by DRW_cache_bone_octahedral_get().
|
static |
Definition at line 1965 of file draw_cache.c.
Referenced by DRW_cache_bone_octahedral_get().
|
static |
Definition at line 1927 of file draw_cache.c.
Referenced by DRW_cache_bone_octahedral_get().
|
static |
Store indices of generated verts from bone_octahedral_solid_tris to define adjacency infos. Example: triangle {2, 1, 0} is adjacent to {3, 2, 0}, {1, 4, 0} and {5, 1, 2}. {2, 1, 0} becomes {0, 1, 2} {3, 2, 0} becomes {3, 4, 5} {1, 4, 0} becomes {9, 10, 11} {5, 1, 2} becomes {12, 13, 14} According to opengl specification it becomes (starting from the first vertex of the first face aka. vertex 2): {0, 12, 1, 10, 2, 3}
Definition at line 1988 of file draw_cache.c.
Referenced by DRW_cache_bone_octahedral_wire_get().
|
static |
Referenced by DRW_cache_bone_arrows_get(), DRW_cache_bone_box_get(), DRW_cache_bone_box_wire_get(), DRW_cache_bone_dof_lines_get(), DRW_cache_bone_dof_sphere_get(), DRW_cache_bone_envelope_outline_get(), DRW_cache_bone_envelope_solid_get(), DRW_cache_bone_octahedral_get(), DRW_cache_bone_octahedral_wire_get(), DRW_cache_bone_point_get(), DRW_cache_bone_point_wire_outline_get(), DRW_cache_bone_stick_get(), DRW_cache_camera_distances_get(), DRW_cache_camera_frame_get(), DRW_cache_camera_tria_get(), DRW_cache_camera_tria_wire_get(), DRW_cache_camera_volume_get(), DRW_cache_camera_volume_wire_get(), DRW_cache_circle_get(), DRW_cache_cube_get(), DRW_cache_cursor_get(), DRW_cache_empty_capsule_body_get(), DRW_cache_empty_capsule_cap_get(), DRW_cache_empty_cone_get(), DRW_cache_empty_cube_get(), DRW_cache_empty_cylinder_get(), DRW_cache_empty_sphere_get(), DRW_cache_field_cone_limit_get(), DRW_cache_field_curve_get(), DRW_cache_field_force_get(), DRW_cache_field_sphere_limit_get(), DRW_cache_field_tube_limit_get(), DRW_cache_field_vortex_get(), DRW_cache_field_wind_get(), DRW_cache_fullscreen_quad_get(), DRW_cache_grid_get(), DRW_cache_groundline_get(), DRW_cache_light_area_disk_lines_get(), DRW_cache_light_area_square_lines_get(), DRW_cache_light_point_lines_get(), DRW_cache_light_spot_lines_get(), DRW_cache_light_spot_volume_get(), DRW_cache_light_sun_lines_get(), DRW_cache_lightprobe_cube_get(), DRW_cache_lightprobe_grid_get(), DRW_cache_lightprobe_planar_get(), DRW_cache_normal_arrow_get(), DRW_cache_particles_get_prim(), DRW_cache_plain_axes_get(), drw_cache_procedural_lines_get(), drw_cache_procedural_points_get(), drw_cache_procedural_triangles_get(), DRW_cache_quad_get(), DRW_cache_quad_wires_get(), DRW_cache_single_arrow_get(), DRW_cache_speaker_get(), DRW_cache_sphere_get(), DRW_gpencil_dummy_buffer_get(), and DRW_shape_cache_free().
|
static |
Definition at line 2558 of file draw_cache.c.
Referenced by DRW_cache_bone_dof_lines_get(), and DRW_cache_bone_dof_sphere_get().
|
static |
|
static |
|
static |
Definition at line 2474 of file draw_cache.c.
Referenced by DRW_cache_bone_arrows_get().