Fixed compiler warnings when new versions of FreeType are used.

This commit is contained in:
Alex Szpakowski
2015-11-30 23:36:17 -04:00
parent 6036454a20
commit 5bdd858487
2 changed files with 11 additions and 11 deletions
@@ -116,9 +116,9 @@ GlyphData *TrueTypeRasterizer::getGlyphData(uint32 glyph) const
// We treat the luminance of the FreeType bitmap as alpha in the GlyphData.
if (bitmap.pixel_mode == FT_PIXEL_MODE_MONO)
{
for (int y = 0; y < bitmap.rows; y++)
for (int y = 0; y < (int) bitmap.rows; y++)
{
for (int x = 0; x < bitmap.width; x++)
for (int x = 0; x < (int) bitmap.width; x++)
{
// Extract the 1-bit value and convert it to uint8.
uint8 v = ((pixels[x / 8]) & (1 << (7 - (x % 8)))) ? 255 : 0;
@@ -131,9 +131,9 @@ GlyphData *TrueTypeRasterizer::getGlyphData(uint32 glyph) const
}
else if (bitmap.pixel_mode == FT_PIXEL_MODE_GRAY)
{
for (int y = 0; y < bitmap.rows; y++)
for (int y = 0; y < (int) bitmap.rows; y++)
{
for (int x = 0; x < bitmap.width; x++)
for (int x = 0; x < (int) bitmap.width; x++)
{
dest[2 * (y * bitmap.width + x) + 0] = 255;
dest[2 * (y * bitmap.width + x) + 1] = pixels[x];
+7 -7
View File
@@ -55,13 +55,13 @@ public:
FORMAT_RG8, // Two-channel (red and green) with 8 bits per channel.
FORMAT_RGBA8, // RGBA with 8 bits per channel.
FORMAT_RGB10A2, // RGB with 10 bits each, and A with 2 bits.
FORMAT_RG11B10F, // Floating point [0, +inf]. RG with 11 FP bits each, and B with 10 FP bits.
FORMAT_R16F, // Floating point [-inf, +inf]. R with 16 FP bits.
FORMAT_RG16F, // Floating point [-inf, +inf]. RG with 16 FP bits per channel.
FORMAT_RGBA16F, // Floating point [-inf, +inf]. RGBA with 16 FP bits per channel.
FORMAT_R32F, // Floating point [-inf, +inf]. R with 32 FP bits.
FORMAT_RG32F, // Floating point [-inf, +inf]. RG with 32 FP bits per channel.
FORMAT_RGBA32F, // Floating point [-inf, +inf]. RGBA with 32 FP bits per channel.
FORMAT_RG11B10F, // Floating point [0, +65024]. RG with 11 FP bits each, and B with 10 FP bits.
FORMAT_R16F, // Floating point [-65504, +65504]. R with 16 FP bits.
FORMAT_RG16F, // Floating point [-65504, +65504]. RG with 16 FP bits per channel.
FORMAT_RGBA16F, // Floating point [-65504, +65504]. RGBA with 16 FP bits per channel.
FORMAT_R32F, // Floating point [-65504, +65504]. R with 32 FP bits.
FORMAT_RG32F, // Floating point [-65504, +65504]. RG with 32 FP bits per channel.
FORMAT_RGBA32F, // Floating point [-65504, +65504]. RGBA with 32 FP bits per channel.
FORMAT_SRGB, // sRGB with 8 bits per channel, plus 8 bit linear A.
FORMAT_MAX_ENUM
};