Partial fix T41749

2d & 3d cached text now draws pixel aligned now.
This commit is contained in:
2014-09-10 15:01:39 +10:00
parent ad0790f14e
commit 384220eeab
2 changed files with 4 additions and 7 deletions

View 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;

View 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);