|
Blender V4.3
|
#include "DNA_brush_types.h"#include "DNA_screen_types.h"#include "DNA_userdef_types.h"#include "DNA_view3d_types.h"#include "ED_screen.hh"#include "ED_util.hh"#include "ED_view3d.hh"#include "GPU_debug.hh"#include "GPU_immediate.hh"#include "GPU_matrix.hh"#include "GPU_shader.hh"#include "UI_resources.hh"#include "UI_view2d.hh"#include "WM_types.hh"#include "BLI_math_rotation.h"#include "BKE_global.hh"#include "BKE_object.hh"#include "BKE_paint.hh"#include "view3d_intern.hh"#include "draw_manager_c.hh"Go to the source code of this file.
Macros | |
| #define | CURSOR_VERT(axis_vec, axis, fac) |
| #define | CURSOR_EDGE(axis_vec, axis, sign) |
Functions | |
| void | DRW_draw_region_info () |
| static bool | is_cursor_visible (const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer) |
| void | DRW_draw_cursor () |
| void | DRW_draw_cursor_2d () |
| void | DRW_draw_gizmo_3d () |
| void | DRW_draw_gizmo_2d () |
2D Cursor | |
| static bool | is_cursor_visible_2d (const DRWContextState *draw_ctx) |
Generic Cursor | |
| void | DRW_draw_cursor_2d_ex (const ARegion *region, const float cursor[2]) |
Contains dynamic drawing using immediate mode
Definition in file draw_view_c.cc.
| #define CURSOR_EDGE | ( | axis_vec, | |
| axis, | |||
| sign ) |
Referenced by DRW_draw_cursor().
| #define CURSOR_VERT | ( | axis_vec, | |
| axis, | |||
| fac ) |
| void DRW_draw_cursor | ( | ) |
Definition at line 98 of file draw_view_c.cc.
References compare_v4v4(), CURSOR_EDGE, DRW_cache_cursor_get(), DRW_context_state_get(), ED_region_pixelspace(), ED_view3d_pixel_size_no_ui_scale(), ED_view3d_project_int_global(), eps, GPU_batch_draw(), GPU_batch_set_shader(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_color_mask(), GPU_COMP_F32, GPU_depth_mask(), GPU_DEPTH_NONE, GPU_depth_test(), GPU_FETCH_FLOAT, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_projection_get, GPU_matrix_projection_set, GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_PRIM_LINES, GPU_SHADER_3D_FLAT_COLOR, GPU_SHADER_3D_UNIFORM_COLOR, GPU_shader_get_builtin_shader(), GPU_vertformat_attr_add(), immBegin(), immBindBuiltinProgram(), immEnd(), immUnbindProgram(), immUniformThemeColor3(), immVertexFormat(), is_cursor_visible(), mul_qt_v3(), pos, DRWContextState::region, rotation_between_quats_to_quat(), DRWContextState::scene, TH_VIEW_OVERLAY, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_NEAR, V3D_PROJ_TEST_NOP, DRWContextState::view_layer, RegionView3D::viewquat, and blender::math::QuaternionBase< T >::w.
Referenced by DRW_draw_region_info().
| void DRW_draw_cursor_2d | ( | ) |
Definition at line 264 of file draw_view_c.cc.
References SpaceImage::cursor, DRW_context_state_get(), DRW_draw_cursor_2d_ex(), GPU_color_mask(), GPU_depth_mask(), GPU_DEPTH_NONE, GPU_depth_test(), is_cursor_visible_2d(), DRWContextState::region, and DRWContextState::space_data.
Referenced by DRW_draw_render_loop_2d_ex().
We may want to move this into a more general location.
Definition at line 231 of file draw_view_c.cc.
References DRW_cache_cursor_get(), ED_region_pixelspace(), GPU_batch_draw(), GPU_batch_set_shader(), GPU_blend(), GPU_BLEND_ALPHA, GPU_BLEND_NONE, GPU_line_smooth(), GPU_line_width(), GPU_matrix_pop(), GPU_matrix_projection_get, GPU_matrix_projection_set, GPU_matrix_push(), GPU_matrix_scale_2f(), GPU_matrix_translate_2f(), GPU_SHADER_3D_FLAT_COLOR, GPU_shader_get_builtin_shader(), and UI_view2d_view_to_region().
Referenced by DRW_draw_cursor_2d(), and sequencer_preview_region_draw().
| void DRW_draw_gizmo_2d | ( | ) |
Definition at line 294 of file draw_view_c.cc.
References DRW_context_state_get(), DRWContextState::evil_C, GPU_depth_mask(), DRWContextState::region, WM_gizmomap_draw(), and WM_GIZMOMAP_DRAWSTEP_2D.
Referenced by DRW_draw_callbacks_post_scene(), and DRW_draw_render_loop_2d_ex().
| void DRW_draw_gizmo_3d | ( | ) |
Definition at line 283 of file draw_view_c.cc.
References DRW_context_state_get(), DRWContextState::evil_C, DRWContextState::region, WM_gizmomap_draw(), and WM_GIZMOMAP_DRAWSTEP_3D.
Referenced by DRW_draw_callbacks_post_scene().
| void DRW_draw_region_info | ( | ) |
Definition at line 42 of file draw_view_c.cc.
References DRW_context_state_get(), DRW_draw_cursor(), DRWContextState::evil_C, GPU_debug_group_begin(), GPU_debug_group_end(), DRWContextState::region, and view3d_draw_region_info().
Referenced by DRW_draw_callbacks_post_scene().
|
static |
Definition at line 56 of file draw_view_c.cc.
References BKE_object_pose_armature_get(), BKE_paint_brush_for_read(), BKE_paint_get_active(), View3DOverlay::flag, View3D::flag2, G, G_TRANSFORM_CURSOR, Brush::image_brush_type, IMAGE_PAINT_BRUSH_TYPE_CLONE, IMAGEPAINT_PROJECT_LAYER_CLONE, OB_MODE_ALL_PAINT, OB_MODE_SCULPT_CURVES, OB_MODE_TEXTURE_PAINT, OB_MODE_WEIGHT_GREASE_PENCIL, OB_MODE_WEIGHT_PAINT, DRWContextState::obact, DRWContextState::object_mode, View3D::overlay, DRWContextState::v3d, V3D_HIDE_OVERLAYS, and V3D_OVERLAY_HIDE_CURSOR.
Referenced by DRW_draw_cursor(), and sequencer_preview_region_draw().
|
static |
Definition at line 202 of file draw_view_c.cc.
References SpaceImageOverlay::flag, SpaceImage::mode, SpaceImage::overlay, SI_MODE_MASK, SI_MODE_PAINT, SI_MODE_UV, SI_MODE_VIEW, SI_OVERLAY_SHOW_OVERLAYS, DRWContextState::space_data, SPACE_IMAGE, and SpaceInfo::spacetype.
Referenced by DRW_draw_cursor_2d().