what is the result of using: glTexImage2D(GL_TEXTURE_2D, 0, 1, 30, 30, 0, GL_ALPHA, GL_UNSIGNED_BYTE, >> &ft_face->glyph->bitmap);
with a FT_RENDER_MODE_NORMAL ? Just trying to guess something that might help you - David On Thu, 9 Aug 2007 15:08:29 -0700 (PDT), "zill" <[EMAIL PROTECTED]> said: > > I'm still pretty confused then. First, I changed to FT_RENDER_MODE_LCD > because I don't see where what type I would use for a 256 gray scale. > I'm > also using GL_RGB. From the description I read, it seems that should > work, > but I'm just getting a plain white square. It seems that nothing is > happening. I would expect to at least have some sort of screwed up > image. > That tells me that nothing is happening to ft_face->glyph->bitmap. My gl > function might need changed, but I think the plain white texture is proof > that FT_Render_Glyph isn't doing what I want it to. > > I followed everything that I read from freetype (granted it doesn't tell > you > how to use it with openGL) so I think I'm using the freetype functions > right. But nothing is happening to the glyph's bitmap. > > Does anyone see what I'm doing wrong? > > > David Turner-5 wrote: > > > > Hello, > > > > I thought the documentation made it clear that FT_RENDER_MODE_NORMAL > > corresponds > > to 8-bit gray maps with 256 levels of "gray" > > > > see: > > > > http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Mode > > > > hope this helps, > > - David > > > > On Thu, 9 Aug 2007 10:00:28 -0700 (PDT), "zill" <[EMAIL PROTECTED]> said: > >> > >> 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, > >> &ft_face->glyph->bitmap); > >> > >> 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: > >> http://www.nabble.com/freetype-opengl-texture-tf4243821.html#a12076307 > >> Sent from the Freetype - Dev mailing list archive at Nabble.com. > >> > >> > >> > >> _______________________________________________ > >> Freetype-devel mailing list > >> [email protected] > >> http://lists.nongnu.org/mailman/listinfo/freetype-devel > > > > > > _______________________________________________ > > Freetype-devel mailing list > > [email protected] > > http://lists.nongnu.org/mailman/listinfo/freetype-devel > > > > > > -- > View this message in context: > http://www.nabble.com/freetype-opengl-texture-tf4243821.html#a12081478 > Sent from the Freetype - Dev mailing list archive at Nabble.com. > > > > _______________________________________________ > Freetype-devel mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/freetype-devel _______________________________________________ Freetype-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/freetype-devel
