Revision: 53178
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53178
Author:   blendix
Date:     2012-12-19 12:51:43 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
UI DPI: use a sharper filter when scaling icons, when the scale matches a mipmap
level, this has no effect, it's for the zoom levels in between. There's a
tradeoff here between blurring and aliasing, I think this looks better.

Before: http://www.pasteall.org/pic/show.php?id=42090
After: http://www.pasteall.org/pic/show.php?id=42091

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_icons.c

Modified: trunk/blender/source/blender/editors/interface/interface_icons.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_icons.c    
2012-12-19 12:30:39 UTC (rev 53177)
+++ trunk/blender/source/blender/editors/interface/interface_icons.c    
2012-12-19 12:51:43 UTC (rev 53178)
@@ -958,6 +958,9 @@
        glEnable(GL_TEXTURE_2D);
        glBindTexture(GL_TEXTURE_2D, icongltex.id);
 
+       /* sharper downscaling, has no effect when scale matches with a mip 
level */
+       glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -0.5f);
+
        glBegin(GL_QUADS);
        glTexCoord2f(x1, y1);
        glVertex2f(x, y);
@@ -972,6 +975,8 @@
        glVertex2f(x, y + h);
        glEnd();
 
+       glTexEnvf(GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, 0.0f);
+
        glBindTexture(GL_TEXTURE_2D, 0);
        glDisable(GL_TEXTURE_2D);
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to