64 bool is_material_shmode = (shading->type >
OB_SOLID);
66 int color_type = shading->wire_color_type;
72 for (
int xray = 0; xray < (is_material_shmode ? 1 : 2); xray++) {
90 for (
int use_coloring = 0; use_coloring < 2; use_coloring++) {
116 if (is_material_shmode) {
118 for (
int use_coloring = 0; use_coloring < 2; use_coloring++) {
136 float dupli_mat[4][4];
137 if ((dupli_parent !=
nullptr) && (dupli_object !=
nullptr)) {
141 if (collection !=
nullptr) {
142 sub_v3_v3(dupli_mat[3], collection->instance_offset);
144 mul_m4_m4m4(dupli_mat, dupli_parent->object_to_world().ptr(), dupli_mat);
147 copy_m4_m4(dupli_mat, dupli_object->
ob->object_to_world().ptr());
149 mul_m4_m4m4(dupli_mat, ob->object_to_world().ptr(), dupli_mat);
158 const bool use_coloring =
true;
175 bool has_edit_mesh_cage =
false;
176 bool is_mesh_verts_only =
false;
184 has_edit_mesh_cage = editmesh_eval_cage && (editmesh_eval_cage != editmesh_eval_final);
185 if (editmesh_eval_final) {
186 mesh = editmesh_eval_final;
189 is_mesh_verts_only = mesh->
edges_num == 0 && mesh->verts_num > 0;
216 blender::gpu::Batch *geom =
nullptr;
235 if (dupli && !init_dupli) {
263 bool draw_as_points =
true;
270 if (draw_as_points) {
284 blender::gpu::Batch *geom =
nullptr;
287 if (use_wire && (!
is_mesh || (!is_edit_mode || has_edit_mesh_cage))) {
295 const bool use_coloring = (use_wire && !is_edit_mode && !is_sculpt_mode &&
296 !has_edit_mesh_cage && !instance_parent_in_edit_mode);
299 if (geom || use_sculpt_pbvh) {
300 if (use_sculpt_pbvh) {
303 else if (all_wires) {
307 shgrp = pd->
wires_grp[is_xray][use_coloring];
314 else if (use_sculpt_pbvh) {
322 else if (
is_mesh && (!is_edit_mode || has_edit_mesh_cage)) {
328 if (is_mesh_verts_only) {
display list (or rather multi purpose list) stuff.
General operations, lookup, etc. for blender objects.
const Mesh * BKE_object_get_editmesh_eval_cage(const Object *object)
const Mesh * BKE_object_get_editmesh_eval_final(const Object *object)
bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const RegionView3D *rv3d)
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
void unit_m4(float m[4][4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
bool invert_m4(float mat[4][4])
MINLINE void sub_v3_v3(float r[3], const float a[3])
Object groups, one object can be in many groups at once.
@ VOLUME_WIREFRAME_POINTS
#define DRW_shgroup_call_no_cull(shgroup, geom, ob)
#define DRW_PASS_CREATE(pass, state)
#define DRW_shgroup_uniform_block(shgroup, name, ubo)
#define DRW_shgroup_call(shgroup, geom, ob)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert Invert a color
struct GPUShader GPUShader
blender::gpu::Batch * DRW_cache_curve_edge_wire_get(Object *ob)
blender::gpu::Batch * DRW_cache_object_face_wireframe_get(const Scene *scene, Object *ob)
blender::gpu::Batch * DRW_cache_surf_edge_wire_get(Object *ob)
blender::gpu::Batch * DRW_cache_particles_get_hair(Object *object, ParticleSystem *psys, ModifierData *md)
blender::gpu::Batch * DRW_cache_mesh_all_verts_get(Object *ob)
blender::gpu::Batch * DRW_cache_text_edge_wire_get(Object *ob)
blender::gpu::Batch * DRW_cache_mesh_loose_edges_get(Object *ob)
int DRW_object_wire_theme_get(Object *ob, ViewLayer *view_layer, float **r_color)
DRWView * DRW_view_create_with_zoffset(const DRWView *parent_view, const RegionView3D *rv3d, float offset)
Object * DRW_object_get_dupli_parent(const Object *)
bool DRW_object_is_in_edit_mode(const Object *ob)
bool DRW_state_is_image_render()
bool DRW_object_is_visible_psys_in_active_context(const Object *object, const ParticleSystem *psys)
const DRWContextState * DRW_context_state_get()
DupliObject * DRW_object_get_dupli(const Object *)
bool DRW_state_is_select()
bool DRW_state_is_depth()
const DRWView * DRW_view_default_get()
DRWShadingGroup * DRW_shgroup_create(GPUShader *shader, DRWPass *pass)
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value)
void DRW_shgroup_call_sculpt(DRWShadingGroup *shgroup, Object *ob, bool use_wire, bool use_mask, bool use_fset, bool use_color, bool use_uv)
DRWShadingGroup * DRW_shgroup_create_sub(DRWShadingGroup *shgroup)
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value)
void DRW_shgroup_uniform_texture_ref(DRWShadingGroup *shgroup, const char *name, GPUTexture **tex)
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value)
void DRW_shgroup_uniform_mat4_copy(DRWShadingGroup *shgroup, const char *name, const float(*value)[4])
void DRW_draw_pass(DRWPass *pass)
void DRW_view_set_active(const DRWView *view)
@ DRW_STATE_DEPTH_LESS_EQUAL
@ DRW_STATE_FIRST_VERTEX_CONVENTION
T interpolate(const T &a, const T &b, const FactorT &t)
GPUShader * OVERLAY_shader_wireframe(bool custom_bias)
GPUShader * OVERLAY_shader_wireframe_select()
static void wireframe_hair_cache_populate(OVERLAY_Data *vedata, Object *ob, ParticleSystem *psys)
void OVERLAY_wireframe_in_front_draw(OVERLAY_Data *data)
void OVERLAY_wireframe_draw(OVERLAY_Data *data)
void OVERLAY_wireframe_cache_populate(OVERLAY_Data *vedata, Object *ob, OVERLAY_DupliData *dupli, bool init_dupli)
void OVERLAY_wireframe_cache_init(OVERLAY_Data *vedata)
void OVERLAY_wireframe_init(OVERLAY_Data *vedata)
GPUUniformBuf * block_ubo
OVERLAY_StorageList * stl
OVERLAY_TextureList * txl
DRWShadingGroup * wire_shgrp
blender::gpu::Batch * wire_geom
DRWPass * wireframe_xray_ps
OVERLAY_ShadingData shdata
DRWShadingGroup * wires_all_grp[2][2]
struct OVERLAY_PrivateData::@227 antialiasing
DRWShadingGroup * wires_hair_grp[2][2]
DRWShadingGroup * wires_grp[2][2]
DRWShadingGroup * wires_sculpt_grp[2]
GPUTexture * dummy_depth_tx
GPUTexture * temp_depth_tx
struct Collection * instance_collection
struct SculptSession * sculpt
float wireframe_threshold
ccl_device_inline bool is_mesh(const ccl_global KernelLightTreeEmitter *kemitter)