[Top][All Lists]

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

Re: [ft-devel] freetype opengl texture

From: zill
Subject: Re: [ft-devel] freetype opengl texture
Date: Fri, 10 Aug 2007 11:18:19 -0700 (PDT)

I see what you mean.  I checked the definition and I definitely need to use
the buffer of the bitmap so I changed my code to
&ft_face->glyph->bitmap.buffer, but I'm still getting a plain white square. 
The good thing is that I think something is happening because when I set the
size to 64, 64 it is still staying a 16*16 white square.  So, something is
being stored in the texture, just not what I want.  That leads me to believe
that it could just be the fact that it is a gray scale image and I might not
be using the right glTexImage2D() parameters.  Here is what I'm using:

glTexImage2D(GL_TEXTURE_2D, 0, 1, 64, 64, 0, GL_ALPHA, GL_UNSIGNED_BYTE,

anyone have any suggestions?

Christian Demmer wrote:
> zill wrote:
>>FreeType specifically says it should be glyph->bitmap and if I change it,
>>throws all kind of errors at me.
> Please check the definition of the bitmap struct. I think Freetype
> contains no advice how to load an OpenGL texture. 
>>  I changed to the power of two, and it is
>>still giving me blank images, not that that would cause that anyways.  Why
>>is nothing being stored in the bitmap?
>>> Should this be &ft_face->glyph->bitmap->buffer?
> Sorry, I missed this typo (C is not my native language :-) the & is
> wrong; buffer is a pointer.
> Greetings, Christian
> _______________________________________________
> Freetype-devel mailing list
> address@hidden

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]