From 6fa46ad315ceb46dbf47d6c6ffdda032d0e885ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Tue, 30 Sep 2014 18:29:32 +0200 Subject: Support for "virtual pixelsize" on 4k screens. On 4k devices the default pixel size leads to tiny OpenGL drawing that is hardly usable without doubling the DPI. The retina system on OSX aims to alleviate this problem by introducing a general 2x pixel size. No equivalent feature exists on other platforms so far. However, to emulate the effect this patch introduces a "virtual" pixel size factor for OpenGL drawing. Note that the user currently has to enable this manually by selecting the "Virtual Pixel Mode" in the user preferences (defaults to native). All windows of a Blender instance share the same virtual pixel size as well. It may be possible to handle this on a per-window basis and automate the selection somewhat (if enabled by the user), so working with multiple screens becomes more convenient, but technical limitations make this a bit difficult (on X11 with nvidia drivers the actual screen size is not reported correctly). Reviewers: ton, campbellbarton Differential Revision: https://developer.blender.org/D669 --- source/blender/windowmanager/wm_window.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/windowmanager/wm_window.h') diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index e0639b098a8..bf96e020a48 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -61,6 +61,8 @@ void wm_window_swap_buffers (wmWindow *win); void wm_window_set_swap_interval (wmWindow *win, int interval); int wm_window_get_swap_interval (wmWindow *win); +float wm_window_pixelsize(wmWindow *win); + void wm_get_cursor_position (wmWindow *win, int *x, int *y); wmWindow *wm_window_copy (bContext *C, wmWindow *winorig); -- cgit v1.2.3