Blender
V3.3
|
#include "BLI_math.h"
#include "BLI_rect.h"
#include "DNA_screen_types.h"
#include "DNA_windowmanager_types.h"
#include "GPU_matrix.h"
#include "GPU_viewport.h"
#include "WM_api.h"
Go to the source code of this file.
Functions | |
void | wmViewport (const rcti *winrct) |
void | wmPartialViewport (rcti *drawrct, const rcti *winrct, const rcti *partialrct) |
void | wmWindowViewport (wmWindow *win) |
void | wmOrtho2 (float x1, float x2, float y1, float y2) |
static void | wmOrtho2_offset (const float x, const float y, const float ofs) |
void | wmOrtho2_region_pixelspace (const ARegion *region) |
void | wmOrtho2_pixelspace (const float x, const float y) |
void | wmGetProjectionMatrix (float mat[4][4], const rcti *winrct) |
OpenGL utilities for setting up 2D viewport for window and regions.
Definition in file wm_subwindow.c.
Definition at line 113 of file wm_subwindow.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT, GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT, height, orthographic_m4(), and width.
Referenced by ui_popup_block_refresh(), and ui_update_window_matrix().
Definition at line 84 of file wm_subwindow.c.
References GPU_MATRIX_ORTHO_CLIP_FAR_DEFAULT, GPU_MATRIX_ORTHO_CLIP_NEAR_DEFAULT, GPU_matrix_ortho_set(), x2, and y1.
Referenced by DRW_draw_render_loop_2d_ex(), ED_annotation_draw_2dimage(), screen_opengl_render_doit(), screen_preview_draw(), UI_view2d_view_ortho(), UI_view2d_view_orthoSpecial(), UI_view2d_view_restore(), and wmOrtho2_offset().
Definition at line 98 of file wm_subwindow.c.
References wmOrtho2(), x, and y.
Referenced by wmOrtho2_pixelspace(), and wmOrtho2_region_pixelspace().
Definition at line 108 of file wm_subwindow.c.
References wmOrtho2_offset(), x, and y.
Referenced by draw_channel_headers(), blender::ed::space_node::node_draw_space(), wmPartialViewport(), wmViewport(), and wmWindowViewport().
Definition at line 103 of file wm_subwindow.c.
References ARegion::winx, ARegion::winy, and wmOrtho2_offset().
Referenced by draw_horizontal_scale_indicators(), blender::ed::space_node::draw_nodespace_back_pix(), blender::ed::space_node::draw_tree_path(), draw_vertical_scale_indicators(), drawSnapping(), drw_text_cache_draw_ex(), ED_region_do_draw(), ED_region_pixelspace(), ED_time_scrub_channel_search_draw(), ED_time_scrub_draw(), ED_time_scrub_draw_current_frame(), gizmo_ruler_draw(), hud_region_draw(), knifetool_draw_angle(), knifetool_draw_visible_distances(), UI_block_draw(), ui_searchbox_region_draw_cb__operator(), ui_searchbox_region_draw_fn(), ui_tooltip_region_draw_cb(), and UI_view2d_text_cache_draw().
Definition at line 33 of file wm_subwindow.c.
References BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), GPU_matrix_identity_set(), GPU_scissor(), GPU_viewport(), height, width, wmOrtho2_pixelspace(), x, rcti::xmax, rcti::xmin, y, and rcti::ymin.
Referenced by ED_region_do_draw().
Definition at line 21 of file wm_subwindow.c.
References BLI_rcti_size_x(), BLI_rcti_size_y(), GPU_matrix_identity_set(), GPU_scissor(), GPU_viewport(), height, width, wmOrtho2_pixelspace(), rcti::xmin, and rcti::ymin.
Referenced by blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), paint_cursor_draw_3d_view_brush_cursor_inactive(), v3d_cursor_snap_draw_fn(), view3d_region_operator_needs_opengl(), wm_drags_draw(), wm_draw_window_offscreen(), wm_gesture_draw(), wm_region_draw_overlay(), and wm_xr_draw_viewport_buffers_to_active_framebuffer().
Definition at line 72 of file wm_subwindow.c.
References GPU_matrix_identity_set(), GPU_scissor(), GPU_viewport(), height, width, WM_window_pixels_x(), WM_window_pixels_y(), and wmOrtho2_pixelspace().
Referenced by blender::ed::sculpt_paint::min_distance_edit::min_distance_edit_draw(), paint_cursor_cursor_draw_3d_view_brush_cursor_active(), paint_cursor_draw_3d_view_brush_cursor_inactive(), v3d_cursor_snap_draw_fn(), wm_drags_draw(), wm_draw_window(), wm_draw_window_onscreen(), and wm_region_draw_overlay().