diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-30 20:29:32 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-30 20:29:32 +0400 |
commit | 6fa46ad315ceb46dbf47d6c6ffdda032d0e885ed (patch) | |
tree | b1454974f24b9d7020ddd26a6c86c0cdc12d454d /source/blender/makesdna | |
parent | c7684b456a3236549b17e731288365331beec2ed (diff) |
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
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index ed59014cf75..d33e3be9a6f 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -534,6 +534,8 @@ typedef struct UserDef { float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */ float pixelsize; /* private, set by GHOST, to multiply DPI with */ + int virtual_pixel; /* virtual pixelsize mode */ + int pad2; short pie_interaction_type; /* if keeping a pie menu spawn button pressed after this time, it turns into * a drag/release pie menu */ @@ -854,6 +856,11 @@ typedef enum eImageDrawMethod { IMAGE_DRAW_METHOD_DRAWPIXELS = 3, } eImageDrawMethod; +typedef enum eUserpref_VirtualPixel { + VIRTUAL_PIXEL_NATIVE = 0, + VIRTUAL_PIXEL_DOUBLE = 1, +} eUserpref_VirtualPixel; + #ifdef __cplusplus } #endif |