[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft-devel] freetype opengl texture

From: zill
Subject: [ft-devel] freetype opengl texture
Date: Thu, 9 Aug 2007 10:00:28 -0700 (PDT)

I loaded the glyph exactly how freetype explains:

FT_UInt glyph_index = FT_Get_Char_Index(ft_face, c);
FT_UInt error = FT_Load_Glyph(ft_face, glyph_index, FT_LOAD_DEFAULT);
if (error) { return false }
error = FT_Render_Glyph(ft_face->glyph, FT_RENDER_MODE_NORMAL);
if (error) { return false }

glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture);
glTexImage2D(GL_TEXTURE_2D, 0, 3, 30, 30, 0, GL_RGBA, GL_UNSIGNED_BYTE,

Then I try to load it into a texture, but it doesn't work.  I don't see
anywhere in freetype where it says what type of bitmap the glyphs are (RGB,
RGBA, etc...) and I'm only using 30 so that I know the glyph will fit into
the texture, since the font size is set to 16.  Can anyone tell me what I've
done wrong.  I don't see what it could be.

Thank you.
View this message in context:
Sent from the Freetype - Dev mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]