--- deliantra/Deliantra-Client/pango-render.c 2007/08/11 12:07:54 1.10 +++ deliantra/Deliantra-Client/pango-render.c 2007/12/26 10:34:23 1.13 @@ -166,7 +166,6 @@ { PangoOpenGLRenderer *renderer = PANGO_OPENGL_RENDERER (renderer_); glyph_info *g; - float x1, y1, x2, y2; if (glyph & PANGO_GLYPH_UNKNOWN_FLAG) { @@ -183,9 +182,7 @@ Glyph bm; font_render_glyph (&bm, font, glyph); - if (g) - g->generation = tc_generation; - else + if (!g) { g = g_slice_new (glyph_info); @@ -193,6 +190,7 @@ _pango_opengl_font_set_cache_glyph_data (font, glyph, g); } + g->generation = tc_generation; tc_get (&g->tex, bm.width, bm.height); g->left = bm.left; @@ -209,21 +207,13 @@ x += g->left; y -= g->top; - x1 = g->tex.x * (1. / TC_WIDTH ); - y1 = g->tex.y * (1. / TC_HEIGHT); - x2 = g->tex.w * (1. / TC_WIDTH ) + x1; - y2 = g->tex.h * (1. / TC_HEIGHT) + y1; - if (g->tex.name != renderer->key.texname) { renderer->key.texname = g->tex.name; renderer->arr = rc_array (renderer->rc, &renderer->key); } - rc_t2f_v3f (renderer->arr, x1, y1, x , y , 0); - rc_t2f_v3f (renderer->arr, x2, y1, x + g->tex.w, y , 0); - rc_t2f_v3f (renderer->arr, x2, y2, x + g->tex.w, y + g->tex.h, 0); - rc_t2f_v3f (renderer->arr, x1, y2, x , y + g->tex.h, 0); + rc_glyph (renderer->arr, g->tex.x, g->tex.y, g->tex.w, g->tex.h, x, y); } static void @@ -314,7 +304,7 @@ renderer->strikethrough = FALSE; gl->key.mode = GL_QUADS; - gl->key.format = GL_T2F_V3F; + gl->key.format = 0; // glyphs gl->key.texname = 0; for (l = run->item->analysis.extra_attrs; l; l = l->next)