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
This commit is contained in:
parent
cc74020b5a
commit
32f3d47990
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue