Hello,
I am using an FTLGish interface to freetype2. I have been able to draw the text successfully with glDrawPixels and textures, however, I get a distorted image when using glBitmap.
Here is a snippet of my glDrawPixels code that works:
glDisable (GL_ALPHA_TEST);
glEnable(GL_ALPHA);
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA,
GL_ONE_MINUS_SRC_ALPHA);
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
// Move the glyph origin
glBitmap( 0, 0,
0, 0,
-right,
-left,
NULL);
glDrawPixels (Width, Height, GL_ALPHA, GL_UNSIGNED_BYTE,(const GLubyte *) data);
// Restore the glyph origin
glBitmap( 0, 0,
0, 0,
right,
left,
NULL);
Using the same code replacing glDrawPixels with glBitmap:
glBitmap(Width,
Height,
0, 0,
0, 0,
(const GLubyte*)data);
I get a distorted image rendered. (illegible fuzzy horizontal lines.)
What do I have to do differently to get glBitmap to render the image properly?
Thanks,
Mike.