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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-18 14:26:37 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-18 14:26:37 +0400
commitea79dcebe2303b0b58a0791cd8b531ecc45a2394 (patch)
tree158dfa22551912786dc29f5a8db2f1036811b075
parent995d4d803aa889513a2d1ad4b7e26140217f3a5a (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.
-rw-r--r--source/blender/editors/space_view3d/drawobject.c3
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);