diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-18 14:26:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2013-11-18 14:26:37 +0400 |
commit | ea79dcebe2303b0b58a0791cd8b531ecc45a2394 (patch) | |
tree | 158dfa22551912786dc29f5a8db2f1036811b075 /source/blender/editors/space_view3d/drawobject.c | |
parent | 995d4d803aa889513a2d1ad4b7e26140217f3a5a (diff) |
Fix T37468: image empties now use no interpolation when mipmaps are disabled.
Image empties don't actually support mipmaps right now, but the user preference
doubles as a way to disable any kind of interpolating in texture filter and just
show nearest neighbour filter, so for this is a bit more consistent.
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 3ed1d15a9ee..2083da2d64f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -610,6 +610,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char if (ibuf && ibuf->rect) { const bool use_clip = (U.glalphaclip != 1.0f); + int zoomfilter = (U.gameflags & USER_DISABLE_MIPMAP )? GL_NEAREST : GL_LINEAR; /* Setup GL params */ glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -623,7 +624,7 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char glColor4fv(ob->col); /* Draw the Image on the screen */ - glaDrawPixelsTex(ofs_x, ofs_y, ima_x, ima_y, GL_RGBA, GL_UNSIGNED_BYTE, GL_LINEAR, ibuf->rect); + glaDrawPixelsTex(ofs_x, ofs_y, ima_x, ima_y, GL_RGBA, GL_UNSIGNED_BYTE, zoomfilter, ibuf->rect); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); glDisable(GL_BLEND); |