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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-04-09 13:44:04 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-04-09 13:54:20 +0300
commit32f3d479907254d11219c112bd6a5529e714ea5b (patch)
treede41110682624a378d32820c93db49c135040232 /source/blender/editors/screen/glutil.c
parentcc74020b5ac7d974e91279e23efc80141c229b3c (diff)
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
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r--source/blender/editors/screen/glutil.c7
1 files changed, 7 insertions, 0 deletions
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
}
}