diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-30 22:35:54 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-09-30 22:35:54 +0400 |
commit | 96977c6ffee0b23ad21d9664c4d442a37ed87a5f (patch) | |
tree | 2ae70748f83c4f507aca8229f52c7c4695b0c15d | |
parent | 09342644cff5b6cc077f549ee45ace929e15401d (diff) |
Fix #24067: sculpt brush/texture preview would disappear when overlapping
with the region boundary. Use glaDrawPixelsSafe like e.g. the image editor
to prevent this.
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 499c676bf6f..482eece42f6 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -60,6 +60,7 @@ #include "IMB_imbuf_types.h" #include "BIF_gl.h" +#include "BIF_glutil.h" #include "ED_datafiles.h" #include "ED_render.h" @@ -843,10 +844,6 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, glPixelTransferf(GL_GREEN_SCALE, rgb[1]); glPixelTransferf(GL_BLUE_SCALE, rgb[2]); } - - /* position */ - glRasterPos2f(x, y); - // XXX ui_rasterpos_safe(x, y, aspect); /* draw */ if((w<1 || h<1)) { @@ -869,13 +866,13 @@ static void icon_draw_rect(float x, float y, int w, int h, float aspect, int rw, /* scale it */ IMB_scaleImBuf(ima, w, h); - glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect); + glaDrawPixelsSafe(x, y, w, h, w, GL_RGBA, GL_UNSIGNED_BYTE, ima->rect); IMB_freeImBuf(ima); } } else - glDrawPixels(w, h, GL_RGBA, GL_UNSIGNED_BYTE, rect); + glaDrawPixelsSafe(x, y, w, h, w, GL_RGBA, GL_UNSIGNED_BYTE, rect); /* restore color */ if(alpha != 0.0f) |