Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-12-05 17:31:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-12-05 17:47:41 +0300
commitcbb82720be938185656c4fe691d80277326929f3 (patch)
treec1069dc9a6d16b8592b89264f5964383941e4cd4 /source/blender/editors/screen/screen_draw.c
parentc014e03b17d34e1ba506c8af56d25ba378390357 (diff)
Fix T58726: Pixels not being drawn if dpi scalling > 1
Diffstat (limited to 'source/blender/editors/screen/screen_draw.c')
-rw-r--r--source/blender/editors/screen/screen_draw.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index c6e9340a54d..679bd66753b 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -399,7 +399,11 @@ void ED_screen_draw_edges(wmWindow *win)
BLI_rcti_size_x(&scissor_rect) + 1,
BLI_rcti_size_y(&scissor_rect) + 1);
- glEnable(GL_SCISSOR_TEST);
+ /* It seems that all areas gets smaller when pixelsize is > 1.
+ * So in order to avoid missing pixels we just disable de scissors. */
+ if (U.pixelsize <= 1.0f) {
+ glEnable(GL_SCISSOR_TEST);
+ }
UI_GetThemeColor4fv(TH_EDITOR_OUTLINE, col);
col[3] = 1.0f;
@@ -420,7 +424,9 @@ void ED_screen_draw_edges(wmWindow *win)
GPU_blend(false);
- glDisable(GL_SCISSOR_TEST);
+ if (U.pixelsize <= 1.0f) {
+ glDisable(GL_SCISSOR_TEST);
+ }
}
/**