Blender V5.0
blender::draw::overlay::Resources Struct Reference

#include <overlay_private.hh>

Inherits blender::draw::select::SelectMap.

Public Member Functions

 Resources (const SelectionType selection_type_, const ShapeCache &shapes_)
 ~Resources ()
void update_theme_settings (const DRWContext *ctx, const State &state)
void update_clip_planes (const State &state)
void init (bool clipping_enabled)
void begin_sync (int clipping_plane_count)
void acquire (const DRWContext *draw_ctx, const State &state)
void release ()
ThemeColorID object_wire_theme_id (const ObjectRef &ob_ref, const State &state) const
const float4object_wire_color (const ObjectRef &ob_ref, ThemeColorID theme_id) const
const float4object_wire_color (const ObjectRef &ob_ref, const State &state) const
float4 background_blend_color (ThemeColorID theme_id) const
float4 object_background_blend_color (const ObjectRef &ob_ref, const State &state) const
float4 background_color_get (const State &state)
void free_movieclips_textures ()
bool is_selection () const
Public Member Functions inherited from blender::draw::select::SelectMap
 SelectMap (const SelectionType selection_type)
const ID select_id (const ObjectRef &ob_ref, uint sub_object_id=0)
void begin_sync (int clipping_plane_count)
void select_bind (PassSimple &pass)
void select_bind (PassMain &pass)
void select_bind (PassMain &pass, PassMain::Sub &sub)
void end_sync ()
void pre_draw ()
void read_result ()

Static Public Member Functions

static float vertex_size_get ()
Static Public Member Functions inherited from blender::draw::select::SelectMap
static const ID select_invalid_id ()

Public Attributes

ShaderModuleshaders = nullptr
Framebuffer overlay_color_only_fb = {"overlay_color_only_fb"}
Framebuffer overlay_line_only_fb = {"overlay_line_only_fb"}
Framebuffer overlay_fb = {"overlay_fb"}
Framebuffer overlay_line_fb = {"overlay_line_fb"}
Framebuffer overlay_in_front_fb = {"overlay_in_front_fb"}
Framebuffer overlay_line_in_front_fb = {"overlay_line_in_front_fb"}
Framebuffer overlay_output_color_only_fb = {"overlay_output_color_only_fb"}
Framebuffer overlay_output_fb = {"overlay_output_fb"}
gpu::FrameBufferrender_fb = nullptr
gpu::FrameBufferrender_in_front_fb = nullptr
TextureFromPool line_tx = {"line_tx"}
TextureFromPool overlay_tx = {"overlay_tx"}
TextureFromPool xray_depth_tx = {"xray_depth_tx"}
TextureFromPool xray_depth_in_front_tx = {"xray_depth_in_front_tx"}
TextureFromPool depth_in_front_alloc_tx = {"overlay_depth_in_front_tx"}
TextureFromPool color_overlay_alloc_tx = {"overlay_color_overlay_alloc_tx"}
TextureFromPool color_render_alloc_tx = {"overlay_color_render_alloc_tx"}
Texture dummy_depth_tx = {"dummy_depth_tx"}
detail::SubPassVector< GreasePencilDepthPlane, 16 > depth_planes
int64_t depth_planes_count = 0
draw::UniformBuffer< UniformDataglobals_buf
UniformDatatheme = globals_buf
draw::UniformArrayBuffer< float4, 6 > clip_planes_buf
TextureRef depth_in_front_tx
TextureRef color_overlay_tx
TextureRef color_render_tx
TextureRef depth_tx
TextureRef depth_target_tx
TextureRef depth_target_in_front_tx
bool weight_ramp_custom = false
ColorBand weight_ramp_copy = {}
Texture weight_ramp_tx = {"weight_ramp"}
Vector< MovieClip * > bg_movie_clips
const ShapeCacheshapes
Public Attributes inherited from blender::draw::select::SelectMap
const SelectionType selection_type
Vector< uintselect_id_map
Vector< bool > in_front_map
Vector< std::string > map_names
StorageArrayBuffer< uintselect_output_buf = {"select_output_buf"}
StorageArrayBuffer< uint, 4, truedummy_select_buf = {"dummy_select_buf"}
UniformBuffer< SelectInfoDatainfo_buf
int clipping_plane_count = 0

Detailed Description

Definition at line 588 of file overlay_private.hh.

Constructor & Destructor Documentation

◆ Resources()

blender::draw::overlay::Resources::Resources ( const SelectionType selection_type_,
const ShapeCache & shapes_ )
inline

Definition at line 673 of file overlay_private.hh.

References blender::draw::select::SelectMap::SelectMap(), and shapes.

◆ ~Resources()

blender::draw::overlay::Resources::~Resources ( )
inline

Definition at line 676 of file overlay_private.hh.

References free_movieclips_textures().

Member Function Documentation

◆ acquire()

◆ background_blend_color()

float4 blender::draw::overlay::Resources::background_blend_color ( ThemeColorID theme_id) const
inline

Definition at line 928 of file overlay_private.hh.

References TH_BACK, and UI_GetThemeColorBlendShade4fv().

Referenced by object_background_blend_color().

◆ background_color_get()

float4 blender::draw::overlay::Resources::background_color_get ( const State & state)
inline

◆ begin_sync()

void blender::draw::overlay::Resources::begin_sync ( int clipping_plane_count)
inline

◆ free_movieclips_textures()

void blender::draw::overlay::Resources::free_movieclips_textures ( )
inline

Definition at line 956 of file overlay_private.hh.

References bg_movie_clips, and BKE_movieclip_free_gputexture().

Referenced by begin_sync(), release(), and ~Resources().

◆ init()

void blender::draw::overlay::Resources::init ( bool clipping_enabled)
inline

◆ is_selection()

◆ object_background_blend_color()

float4 blender::draw::overlay::Resources::object_background_blend_color ( const ObjectRef & ob_ref,
const State & state ) const
inline

Definition at line 935 of file overlay_private.hh.

References background_blend_color(), object_wire_theme_id(), and state.

◆ object_wire_color() [1/2]

const float4 & blender::draw::overlay::Resources::object_wire_color ( const ObjectRef & ob_ref,
const State & state ) const
inline

Definition at line 922 of file overlay_private.hh.

References object_wire_color(), object_wire_theme_id(), and state.

◆ object_wire_color() [2/2]

const float4 & blender::draw::overlay::Resources::object_wire_color ( const ObjectRef & ob_ref,
ThemeColorID theme_id ) const
inline

◆ object_wire_theme_id()

◆ release()

void blender::draw::overlay::Resources::release ( )
inline

◆ update_clip_planes()

void blender::draw::overlay::Resources::update_clip_planes ( const State & state)

Definition at line 222 of file overlay_instance.cc.

References clip_planes_buf, i, RV3D_BOXCLIP, RV3D_LOCK_FLAGS, and state.

◆ update_theme_settings()

void blender::draw::overlay::Resources::update_theme_settings ( const DRWContext * ctx,
const State & state )

Definition at line 242 of file overlay_instance.cc.

References b, blender::eevee::UniformData::camera, blender::math::dot(), View3DShading::flag, float, globals_buf, blender::math::interpolate(), is_selection(), max_ff(), OB_SOLID, blender::math::reduce_add(), rgba_uchar_to_float(), size(), srgb_to_linearrgb_v4(), state, TH_ACTIVE, TH_AXIS_X, TH_AXIS_Y, TH_AXIS_Z, TH_BACK, TH_BACK_GRAD, TH_BEVEL, TH_BONE_LOCKED_WEIGHT, TH_BONE_POSE, TH_BONE_POSE_ACTIVE, TH_BONE_SOLID, TH_CAMERA, TH_CAMERA_PATH, TH_CFRAME, TH_CREASE, TH_EDGE_MODE_SELECT, TH_EDGE_SELECT, TH_EDGE_WIDTH, TH_EDITMESH_ACTIVE, TH_EMPTY, TH_FACE, TH_FACE_BACK, TH_FACE_FRONT, TH_FACE_MODE_SELECT, TH_FACE_RETOPOLOGY, TH_FACE_SELECT, TH_FACEDOT_SIZE, TH_FRAME_AFTER, TH_FRAME_BEFORE, TH_FREESTYLE, TH_GP_VERTEX, TH_GP_VERTEX_SELECT, TH_GP_VERTEX_SIZE, TH_GRID, TH_HANDLE_ALIGN, TH_HANDLE_AUTO, TH_HANDLE_AUTOCLAMP, TH_HANDLE_FREE, TH_HANDLE_SEL_ALIGN, TH_HANDLE_SEL_AUTO, TH_HANDLE_SEL_AUTOCLAMP, TH_HANDLE_SEL_FREE, TH_HANDLE_SEL_VECT, TH_HANDLE_VECT, TH_LIGHT, TH_LNORMAL, TH_NORMAL, TH_NURB_SEL_ULINE, TH_NURB_SEL_VLINE, TH_NURB_ULINE, TH_NURB_VLINE, TH_OBCENTER_DIA, TH_SEAM, TH_SELECT, TH_SHARP, TH_SKIN_ROOT, TH_SPEAKER, TH_TEXT, TH_TEXT_HI, TH_TRANSFORM, TH_TRANSPARENT_CHECKER_PRIMARY, TH_TRANSPARENT_CHECKER_SECONDARY, TH_TRANSPARENT_CHECKER_SIZE, TH_UV_SHADOW, TH_V3D_CLIPPING_BORDER, TH_VERTEX, TH_VERTEX_SELECT, TH_VERTEX_UNREFERENCED, TH_VNORMAL, TH_WIRE, TH_WIRE_EDIT, theme, View3DShading::type, U, UI_GetThemeColor4fv(), UI_GetThemeColorBlendShade3fv(), UI_GetThemeColorBlendShade4fv(), UI_GetThemeColorShade4fv(), UI_GetThemeColorShadeAlpha4fv(), UI_GetThemeValuef(), USER_GPU_FLAG_FRESNEL_EDIT, V3D_SHADING_BACKFACE_CULLING, vertex_size_get(), and DRWContext::viewport_size_get().

◆ vertex_size_get()

float blender::draw::overlay::Resources::vertex_size_get ( )
inlinestatic

Member Data Documentation

◆ bg_movie_clips

Vector<MovieClip *> blender::draw::overlay::Resources::bg_movie_clips

Definition at line 669 of file overlay_private.hh.

Referenced by free_movieclips_textures().

◆ clip_planes_buf

◆ color_overlay_alloc_tx

TextureFromPool blender::draw::overlay::Resources::color_overlay_alloc_tx = {"overlay_color_overlay_alloc_tx"}

Definition at line 625 of file overlay_private.hh.

◆ color_overlay_tx

TextureRef blender::draw::overlay::Resources::color_overlay_tx

Definition at line 645 of file overlay_private.hh.

◆ color_render_alloc_tx

TextureFromPool blender::draw::overlay::Resources::color_render_alloc_tx = {"overlay_color_render_alloc_tx"}

Definition at line 626 of file overlay_private.hh.

◆ color_render_tx

TextureRef blender::draw::overlay::Resources::color_render_tx

Definition at line 646 of file overlay_private.hh.

◆ depth_in_front_alloc_tx

TextureFromPool blender::draw::overlay::Resources::depth_in_front_alloc_tx = {"overlay_depth_in_front_tx"}

Definition at line 624 of file overlay_private.hh.

◆ depth_in_front_tx

TextureRef blender::draw::overlay::Resources::depth_in_front_tx

Definition at line 644 of file overlay_private.hh.

◆ depth_planes

◆ depth_planes_count

int64_t blender::draw::overlay::Resources::depth_planes_count = 0

◆ depth_target_in_front_tx

TextureRef blender::draw::overlay::Resources::depth_target_in_front_tx

Definition at line 661 of file overlay_private.hh.

◆ depth_target_tx

TextureRef blender::draw::overlay::Resources::depth_target_tx

Depth target. Can either be default depth buffer texture from DefaultTextureList or xray_depth_tx if X-ray is enabled.

Definition at line 660 of file overlay_private.hh.

◆ depth_tx

TextureRef blender::draw::overlay::Resources::depth_tx

Scene depth buffer that can also be used as render target for overlays.

Can only be bound as a texture if either:

  • the current frame-buffer has no depth buffer attached.
  • state.xray_enabled is true.

Definition at line 654 of file overlay_private.hh.

Referenced by blender::draw::overlay::Outline::draw_line_only_ex().

◆ dummy_depth_tx

Texture blender::draw::overlay::Resources::dummy_depth_tx = {"dummy_depth_tx"}

Definition at line 630 of file overlay_private.hh.

◆ globals_buf

◆ line_tx

TextureFromPool blender::draw::overlay::Resources::line_tx = {"line_tx"}

Definition at line 615 of file overlay_private.hh.

◆ overlay_color_only_fb

Framebuffer blender::draw::overlay::Resources::overlay_color_only_fb = {"overlay_color_only_fb"}

Definition at line 592 of file overlay_private.hh.

◆ overlay_fb

Framebuffer blender::draw::overlay::Resources::overlay_fb = {"overlay_fb"}

Definition at line 596 of file overlay_private.hh.

◆ overlay_in_front_fb

Framebuffer blender::draw::overlay::Resources::overlay_in_front_fb = {"overlay_in_front_fb"}

Definition at line 600 of file overlay_private.hh.

◆ overlay_line_fb

Framebuffer blender::draw::overlay::Resources::overlay_line_fb = {"overlay_line_fb"}

Definition at line 598 of file overlay_private.hh.

◆ overlay_line_in_front_fb

Framebuffer blender::draw::overlay::Resources::overlay_line_in_front_fb = {"overlay_line_in_front_fb"}

Definition at line 602 of file overlay_private.hh.

◆ overlay_line_only_fb

Framebuffer blender::draw::overlay::Resources::overlay_line_only_fb = {"overlay_line_only_fb"}

Definition at line 594 of file overlay_private.hh.

◆ overlay_output_color_only_fb

Framebuffer blender::draw::overlay::Resources::overlay_output_color_only_fb = {"overlay_output_color_only_fb"}

Definition at line 605 of file overlay_private.hh.

◆ overlay_output_fb

Framebuffer blender::draw::overlay::Resources::overlay_output_fb = {"overlay_output_fb"}

Definition at line 607 of file overlay_private.hh.

◆ overlay_tx

TextureFromPool blender::draw::overlay::Resources::overlay_tx = {"overlay_tx"}

Definition at line 617 of file overlay_private.hh.

◆ render_fb

gpu::FrameBuffer* blender::draw::overlay::Resources::render_fb = nullptr

Definition at line 611 of file overlay_private.hh.

◆ render_in_front_fb

gpu::FrameBuffer* blender::draw::overlay::Resources::render_in_front_fb = nullptr

Definition at line 612 of file overlay_private.hh.

◆ shaders

◆ shapes

const ShapeCache& blender::draw::overlay::Resources::shapes

◆ theme

◆ weight_ramp_copy

ColorBand blender::draw::overlay::Resources::weight_ramp_copy = {}

Definition at line 665 of file overlay_private.hh.

◆ weight_ramp_custom

bool blender::draw::overlay::Resources::weight_ramp_custom = false

Copy of the settings the current texture was generated with. Used to detect updates.

Definition at line 664 of file overlay_private.hh.

◆ weight_ramp_tx

Texture blender::draw::overlay::Resources::weight_ramp_tx = {"weight_ramp"}

Baked color ramp texture from theme and user settings. Maps weight [0..1] to color.

Definition at line 667 of file overlay_private.hh.

◆ xray_depth_in_front_tx

TextureFromPool blender::draw::overlay::Resources::xray_depth_in_front_tx = {"xray_depth_in_front_tx"}

Definition at line 620 of file overlay_private.hh.

◆ xray_depth_tx

TextureFromPool blender::draw::overlay::Resources::xray_depth_tx = {"xray_depth_tx"}

Definition at line 619 of file overlay_private.hh.


The documentation for this struct was generated from the following files: