[Bf-blender-cvs] [cbb82720be9] blender2.8: Fix T58726: Pixels not being drawn if dpi scalling > 1

Clément Foucault noreply at git.blender.org
Wed Dec 5 15:47:44 CET 2018


Commit: cbb82720be938185656c4fe691d80277326929f3
Author: Clément Foucault
Date:   Wed Dec 5 15:31:36 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBcbb82720be938185656c4fe691d80277326929f3

Fix T58726: Pixels not being drawn if dpi scalling > 1

===================================================================

M	source/blender/editors/screen/screen_draw.c

===================================================================

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);
+	}
 }
 
 /**



More information about the Bf-blender-cvs mailing list