Merge branch 'blender-v4.3-release'
This commit is contained in:
@@ -1542,6 +1542,7 @@ std::string WM_drag_get_string_firstline(const wmDrag *drag);
|
||||
void wmViewport(const rcti *winrct);
|
||||
void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct);
|
||||
void wmWindowViewport(const wmWindow *win);
|
||||
void wmWindowViewport_ex(const wmWindow *win, float offset);
|
||||
|
||||
/* OpenGL utilities with safety check. */
|
||||
void wmOrtho2(float x1, float x2, float y1, float y2);
|
||||
|
||||
@@ -1197,6 +1197,8 @@ void wm_drags_draw(bContext *C, wmWindow *win)
|
||||
CTX_wm_region_set(C, region);
|
||||
}
|
||||
|
||||
/* Needs zero offset here or it looks blurry. #128112. */
|
||||
wmWindowViewport_ex(win, 0.0f);
|
||||
wm_drag_draw_default(C, win, drag, xy);
|
||||
}
|
||||
GPU_blend(GPU_BLEND_NONE);
|
||||
|
||||
@@ -1120,6 +1120,10 @@ static void wm_draw_window_onscreen(bContext *C, wmWindow *win, int view)
|
||||
/* After area regions so we can do area 'overlay' drawing. */
|
||||
UI_SetTheme(0, 0);
|
||||
ED_screen_draw_edges(win);
|
||||
|
||||
/* Needs zero offset here or it looks blurry. #128112. */
|
||||
wmWindowViewport_ex(win, 0.0f);
|
||||
|
||||
wm_draw_callbacks(win);
|
||||
wmWindowViewport(win);
|
||||
|
||||
|
||||
@@ -71,17 +71,24 @@ void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct
|
||||
GPU_matrix_identity_set();
|
||||
}
|
||||
|
||||
void wmWindowViewport(const wmWindow *win)
|
||||
static void wmOrtho2_offset(const float x, const float y, const float ofs);
|
||||
|
||||
void wmWindowViewport_ex(const wmWindow *win, float offset)
|
||||
{
|
||||
const blender::int2 win_size = WM_window_native_pixel_size(win);
|
||||
|
||||
GPU_viewport(0, 0, win_size[0], win_size[1]);
|
||||
GPU_scissor(0, 0, win_size[0], win_size[1]);
|
||||
|
||||
wmOrtho2_pixelspace(win_size[0], win_size[1]);
|
||||
wmOrtho2_offset(win_size[0], win_size[1], offset);
|
||||
GPU_matrix_identity_set();
|
||||
}
|
||||
|
||||
void wmWindowViewport(const wmWindow *win)
|
||||
{
|
||||
wmWindowViewport_ex(win, -GLA_PIXEL_OFS);
|
||||
}
|
||||
|
||||
void wmOrtho2(float x1, float x2, float y1, float y2)
|
||||
{
|
||||
/* Prevent opengl from generating errors. */
|
||||
|
||||
Reference in New Issue
Block a user