Partial fix T41749
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Sep 2014 05:01:39 +0000 (15:01 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Sep 2014 05:01:39 +0000 (15:01 +1000)
2d & 3d cached text now draws pixel aligned now.

source/blender/editors/interface/view2d.c
source/blender/editors/space_view3d/drawobject.c

index ccc6f6de94e55414147d42a67460f145f4beb794..d48faa34618e341358b41ad10335e25d4ddd34b1 100644 (file)
@@ -2355,12 +2355,8 @@ void UI_view2d_text_cache_draw(ARegion *ar)
 
        /* investigate using BLF_ascender() */
        const float default_height = g_v2d_strings ? BLF_height_default("28", 3) : 0.0f;
-       
-       // glMatrixMode(GL_PROJECTION);
-       // glPushMatrix();
-       // glMatrixMode(GL_MODELVIEW);
-       // glPushMatrix();
-       ED_region_pixelspace(ar);
+
+       wmOrtho2_region_ui(ar);
 
        for (v2s = g_v2d_strings; v2s; v2s = v2s->next) {
                int xofs = 0, yofs;
index 75d64e93d59d8a8b9e11b6c2105503b9c4cce1bd..e7b6e50ef1cdc7bb9eb7cbfdd63dff409f6bde42 100644 (file)
@@ -880,7 +880,8 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, bool depth_write, flo
                glPushMatrix();
                glMatrixMode(GL_MODELVIEW);
                glPushMatrix();
-               ED_region_pixelspace(ar);
+               wmOrtho2_region_ui(ar);
+               glLoadIdentity();
                
                if (depth_write) {
                        if (v3d->zbuf) glDisable(GL_DEPTH_TEST);