[Bf-blender-cvs] [32f3d479907] master: Image draw: Fix/workaround image corruption on draw
Sergey Sharybin
noreply at git.blender.org
Tue Apr 9 12:58:18 CEST 2019
Commit: 32f3d479907254d11219c112bd6a5529e714ea5b
Author: Sergey Sharybin
Date: Tue Apr 9 12:44:04 2019 +0200
Branches: master
https://developer.blender.org/rB32f3d479907254d11219c112bd6a5529e714ea5b
Image draw: Fix/workaround image corruption on draw
Was mainly visible with high-res image. Not entirely clear why it is
only happening on macOS. While the entire function should be re-written
to make float images displayed faster, still nice to fix the drawing.
Reviewers: fclem
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D4664
===================================================================
M source/blender/editors/screen/glutil.c
===================================================================
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 230d6179871..4dc3b24c309 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -286,6 +286,13 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state,
immAttr2f(texco, (float)(0 + offset_left) / tex_w, (float)(subpart_h - offset_top) / tex_h);
immVertex2f(pos, rast_x + (float)offset_left * xzoom, rast_y + (float)(subpart_h - offset_top) * yzoom * scaleY);
immEnd();
+
+ /* NOTE: Weirdly enough this is only required on macOS. Without this there is some sort of
+ * bleeding of data is happening from tiles which are drawn later on.
+ * This doesn't seem to be too slow, but still would be nice to have fast and nice solution. */
+#ifdef __APPLE__
+ glFlush();
+#endif
}
}
More information about the Bf-blender-cvs
mailing list