Blender
V3.3
|
#include "DRW_render.h"
#include "BKE_global.h"
#include "BKE_gpencil.h"
#include "BKE_object.h"
#include "DNA_gpencil_types.h"
#include "UI_resources.h"
#include "overlay_private.h"
Go to the source code of this file.
Classes | |
struct | iterData |
Typedefs | |
typedef struct iterData | iterData |
Functions | |
static void | gpencil_depth_plane (Object *ob, float r_plane[4]) |
void | OVERLAY_outline_init (OVERLAY_Data *vedata) |
void | OVERLAY_outline_cache_init (OVERLAY_Data *vedata) |
static void | gpencil_layer_cache_populate (bGPDlayer *gpl, bGPDframe *UNUSED(gpf), bGPDstroke *UNUSED(gps), void *thunk) |
static void | gpencil_stroke_cache_populate (bGPDlayer *UNUSED(gpl), bGPDframe *UNUSED(gpf), bGPDstroke *gps, void *thunk) |
static void | OVERLAY_outline_gpencil (OVERLAY_PrivateData *pd, Object *ob) |
static void | OVERLAY_outline_volume (OVERLAY_PrivateData *pd, Object *ob) |
static void | OVERLAY_outline_curves (OVERLAY_PrivateData *pd, Object *ob) |
void | OVERLAY_outline_cache_populate (OVERLAY_Data *vedata, Object *ob, OVERLAY_DupliData *dupli, bool init_dupli) |
void | OVERLAY_outline_draw (OVERLAY_Data *vedata) |
Definition at line 22 of file overlay_outline.c.
References add_v3_fl(), BKE_boundbox_calc_center_aabb(), BKE_boundbox_calc_size_aabb(), BKE_object_boundbox_get(), center, copy_v3_v3(), DRW_view_is_persp_get(), DRW_view_viewmat_get(), invert_m4(), mul_m4_m4m4(), mul_mat3_m4_v3(), normalize_v3(), NULL, Object::obmat, plane_from_point_normal_v3(), rescale_m4(), size(), sub_v3_v3v3(), transpose_m4(), and unit_m4().
Referenced by OVERLAY_outline_gpencil().
|
static |
Definition at line 176 of file overlay_outline.c.
References Object::data, bGPdata::draw_mode, DRW_shgroup_create_sub(), DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_vec4_copy(), bGPdata::flag, GP_DATA_STROKE_KEEPTHICKNESS, GP_DRAWMODE_3D, bGPDlayer::line_change, mat4_to_scale(), iterData::ob, Object::obmat, bGPdata::pixfactor, iterData::plane, and iterData::stroke_grp.
Referenced by OVERLAY_outline_gpencil().
|
static |
Definition at line 200 of file overlay_outline.c.
References BKE_gpencil_material_settings(), iterData::cfra, DRW_cache_gpencil_fills_get(), DRW_cache_gpencil_strokes_get(), DRW_shgroup_call_instance_range(), DRW_shgroup_call_range(), iterData::fill_grp, bGPDstroke_Runtime::fill_start, MaterialGPencilStyle::flag, GP_MATERIAL_FILL_SHOW, GP_MATERIAL_HIDE, GP_MATERIAL_STROKE_SHOW, GPUBatch, bGPDstroke::mat_nr, iterData::ob, bGPDstroke::runtime, iterData::stroke_grp, bGPDstroke_Runtime::stroke_start, bGPDstroke::tot_triangles, and bGPDstroke::totpoints.
Referenced by OVERLAY_outline_gpencil().
void OVERLAY_outline_cache_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 106 of file overlay_outline.c.
References OVERLAY_PrivateData::antialiasing, DRW_Global::block_ubo, OVERLAY_PrivateData::clipping_state, DefaultTextureList::depth, DRW_PASS_CREATE, DRW_shgroup_call_procedural_triangles(), DRW_shgroup_create(), DRW_shgroup_uniform_block, DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_texture_ref(), DRW_STATE_BLEND_ALPHA_PREMUL, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, DRW_viewport_texture_list_get(), OVERLAY_PrivateData::enabled, G, G_draw, G_TRANSFORM_OBJ, NULL, OVERLAY_PrivateData::outlines_curves_grp, OVERLAY_PassList::outlines_detect_ps, OVERLAY_PrivateData::outlines_gpencil_grp, OVERLAY_PrivateData::outlines_grp, OVERLAY_TextureList::outlines_id_tx, OVERLAY_PassList::outlines_prepass_ps, OVERLAY_PrivateData::outlines_ptcloud_grp, OVERLAY_shader_outline_detect(), OVERLAY_shader_outline_prepass(), OVERLAY_shader_outline_prepass_curves(), OVERLAY_shader_outline_prepass_gpencil(), OVERLAY_shader_outline_prepass_pointcloud(), OVERLAY_StorageList::pd, OVERLAY_Data::psl, sh, state, OVERLAY_Data::stl, OVERLAY_TextureList::temp_depth_tx, TH_OUTLINE_WIDTH, OVERLAY_Data::txl, UI_GetThemeValuef(), OVERLAY_PrivateData::v3d_flag, V3D_SELECT_OUTLINE, OVERLAY_PrivateData::xray_enabled, and OVERLAY_PrivateData::xray_enabled_and_not_wire.
Referenced by OVERLAY_cache_init().
void OVERLAY_outline_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob, | ||
OVERLAY_DupliData * | dupli, | ||
bool | init_dupli | ||
) |
Definition at line 280 of file overlay_outline.c.
References DRW_cache_object_edge_detection_get(), DRW_cache_object_surface_get(), DRW_context_state_get(), DRW_object_axis_orthogonal_to_view(), DRW_object_is_flat(), DRW_shgroup_call, DRW_shgroup_call_instance_range(), Object::dt, GPUBatch, NULL, OB_BOUNDBOX, OB_CURVES, OB_GPENCIL, OB_POINTCLOUD, OB_VOLUME, OVERLAY_DupliData::outline_geom, OVERLAY_DupliData::outline_shgrp, OVERLAY_PrivateData::outlines_grp, OVERLAY_PrivateData::outlines_ptcloud_grp, OVERLAY_outline_curves(), OVERLAY_outline_gpencil(), OVERLAY_outline_volume(), OVERLAY_StorageList::pd, RegionView3D::persp, DRWContextState::rv3d, RV3D_ORTHO, OVERLAY_Data::stl, Object::type, OVERLAY_PrivateData::wireframe_mode, and OVERLAY_PrivateData::xray_enabled_and_not_wire.
Referenced by OVERLAY_cache_populate().
|
static |
Definition at line 274 of file overlay_outline.c.
References DRW_shgroup_curves_create_sub(), NULL, and OVERLAY_PrivateData::outlines_curves_grp.
Referenced by OVERLAY_outline_cache_populate().
void OVERLAY_outline_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 356 of file overlay_outline.c.
References DRW_draw_pass(), DRW_pass_is_empty(), DRW_state_is_fbo(), DRW_stats_group_end(), DRW_stats_group_start(), OVERLAY_Data::fbl, GPU_framebuffer_bind(), NULL, OVERLAY_PassList::outlines_detect_ps, OVERLAY_FramebufferList::outlines_prepass_fb, OVERLAY_PassList::outlines_prepass_ps, OVERLAY_FramebufferList::outlines_resolve_fb, and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
|
static |
Definition at line 235 of file overlay_outline.c.
References BKE_gpencil_visible_stroke_advanced_iter(), OVERLAY_PrivateData::cfra, Object::data, bGPdata::draw_mode, DRW_shgroup_create_sub(), GP_DRAWMODE_2D, GPENCIL_ANY_MODE, gpencil_depth_plane(), gpencil_layer_cache_populate(), gpencil_stroke_cache_populate(), if(), NULL, iterData::ob, OVERLAY_PrivateData::outlines_gpencil_grp, and iterData::plane.
Referenced by OVERLAY_outline_cache_populate().
void OVERLAY_outline_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 72 of file overlay_outline.c.
References OVERLAY_PrivateData::antialiasing, DRW_state_is_fbo(), DRW_texture_ensure_fullscreen_2d(), DRW_viewport_texture_list_get(), OVERLAY_PrivateData::enabled, OVERLAY_Data::fbl, GPU_DEPTH24_STENCIL8, GPU_R16UI, OVERLAY_TextureList::outlines_id_tx, OVERLAY_FramebufferList::outlines_prepass_fb, OVERLAY_FramebufferList::outlines_resolve_fb, OVERLAY_StorageList::pd, OVERLAY_Data::stl, OVERLAY_TextureList::temp_depth_tx, and OVERLAY_Data::txl.
Referenced by OVERLAY_engine_init().
|
static |
Definition at line 263 of file overlay_outline.c.
References DRW_cache_volume_selection_surface_get(), DRW_shgroup_call, GPUBatch, NULL, and OVERLAY_PrivateData::outlines_grp.
Referenced by OVERLAY_outline_cache_populate().