Freetype 2.1 and later align bitmap pitch on boundaries of 2 bytes. It is
therefore necessary to use glPixelStorei(..,UNPACK_..., 2). There is an #if() statement that allows the continued use of freetype 2.0 (Rh 7.x), as well as accomodating newer releases.
This commit is contained in:
@@ -39,6 +39,7 @@ FTBitmapGlyph::FTBitmapGlyph( FT_Glyph glyph)
|
||||
|
||||
data = osgNew unsigned char[srcPitch * destHeight];
|
||||
|
||||
// !!!! THIS assumes a positive Pitch value. No allowance for negative pitch
|
||||
for(int y = 0; y < srcHeight; ++y)
|
||||
{
|
||||
--destHeight;
|
||||
|
||||
Reference in New Issue
Block a user