what is difference of copy bitmap to texture between opengl and gles1/gles2 ?
Code: Select all
bool FontFaceLayer::GenerateTexture(const byte*& texture_data, Vector2i& texture_dimensions, int texture_id)
.....
// Copy the glyph's bitmap data into its allocated texture.
if (glyph.bitmap_data != NULL)
{
byte* destination = rectangle.GetTextureData();
byte* source = glyph.bitmap_data;
for (int j = 0; j < glyph.bitmap_dimensions.y; ++j)
{
for (int k = 0; k < glyph.bitmap_dimensions.x; ++k)
destination[k * 4 + 3] = source[k];
destination += rectangle.GetTextureStride();
len += rectangle.GetTextureStride();
source += glyph.bitmap_dimensions.x;
}
//memcpy(destination, glyph.bitmap_data, glyph.bitmap_dimensions.x*glyph.bitmap_dimensions.y);
}
http://www.ogre3d.org/forums/viewtopic.php?f=21&t=76125