mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
Fixed compiler warnings when new versions of FreeType are used.
This commit is contained in:
@@ -116,9 +116,9 @@ GlyphData *TrueTypeRasterizer::getGlyphData(uint32 glyph) const
|
|||||||
// We treat the luminance of the FreeType bitmap as alpha in the GlyphData.
|
// We treat the luminance of the FreeType bitmap as alpha in the GlyphData.
|
||||||
if (bitmap.pixel_mode == FT_PIXEL_MODE_MONO)
|
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.
|
// Extract the 1-bit value and convert it to uint8.
|
||||||
uint8 v = ((pixels[x / 8]) & (1 << (7 - (x % 8)))) ? 255 : 0;
|
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)
|
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) + 0] = 255;
|
||||||
dest[2 * (y * bitmap.width + x) + 1] = pixels[x];
|
dest[2 * (y * bitmap.width + x) + 1] = pixels[x];
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ public:
|
|||||||
FORMAT_RG8, // Two-channel (red and green) with 8 bits per channel.
|
FORMAT_RG8, // Two-channel (red and green) with 8 bits per channel.
|
||||||
FORMAT_RGBA8, // RGBA 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_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_RG11B10F, // Floating point [0, +65024]. RG with 11 FP bits each, and B with 10 FP bits.
|
||||||
FORMAT_R16F, // Floating point [-inf, +inf]. R with 16 FP bits.
|
FORMAT_R16F, // Floating point [-65504, +65504]. R with 16 FP bits.
|
||||||
FORMAT_RG16F, // Floating point [-inf, +inf]. RG with 16 FP bits per channel.
|
FORMAT_RG16F, // Floating point [-65504, +65504]. RG with 16 FP bits per channel.
|
||||||
FORMAT_RGBA16F, // Floating point [-inf, +inf]. RGBA with 16 FP bits per channel.
|
FORMAT_RGBA16F, // Floating point [-65504, +65504]. RGBA with 16 FP bits per channel.
|
||||||
FORMAT_R32F, // Floating point [-inf, +inf]. R with 32 FP bits.
|
FORMAT_R32F, // Floating point [-65504, +65504]. R with 32 FP bits.
|
||||||
FORMAT_RG32F, // Floating point [-inf, +inf]. RG with 32 FP bits per channel.
|
FORMAT_RG32F, // Floating point [-65504, +65504]. RG with 32 FP bits per channel.
|
||||||
FORMAT_RGBA32F, // Floating point [-inf, +inf]. RGBA 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_SRGB, // sRGB with 8 bits per channel, plus 8 bit linear A.
|
||||||
FORMAT_MAX_ENUM
|
FORMAT_MAX_ENUM
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user