fix font aligned tex.

SVN revision: 43049
This commit is contained in:
Carsten Haitzler 2009-10-13 10:42:03 +00:00
parent 0b3d755ce9
commit 017e26b4e0
2 changed files with 3 additions and 5 deletions

View File

@ -19,7 +19,7 @@ evas_gl_font_texture_new(Evas_GL_Context *gc, RGBA_Font_Glyph *fg)
j = fg->glyph_out->bitmap.pitch;
if (j < w) j = w;
nw = w;
nw = ((w + 3) / 4) * 4;
ndata = alloca(nw *h);
if (!ndata) return NULL;
if (fg->glyph_out->bitmap.num_grays == 256)

View File

@ -350,15 +350,13 @@ evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, int w,
#ifdef GL_UNPACK_ROW_LENGTH
glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
#endif
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
glTexSubImage2D(GL_TEXTURE_2D, 0,
tex->x, tex->y, w, h,
GL_ALPHA, GL_UNSIGNED_BYTE,
pixels);
if (tex->pt->texture != tex->gc->shader.cur_tex)
{
glBindTexture(GL_TEXTURE_2D, tex->gc->shader.cur_tex);
}
glBindTexture(GL_TEXTURE_2D, tex->gc->shader.cur_tex);
}
Evas_GL_Texture *