|
|
|
@ -72,19 +72,19 @@ GlyphCacheGL::State::State(const PixelFormat format, const Vector2i& size, const |
|
|
|
pixelFormat = GL::PixelFormat::Red; |
|
|
|
pixelFormat = GL::PixelFormat::Red; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* And use setImage() instead of setStorage() if the format is unsized, as
|
|
|
|
/* On ES2, GL::textureFormat() always produces an unsized format, so we
|
|
|
|
EXT_texture_storage doesn't allow those */ |
|
|
|
have to use setImage() instead of setStorage() as EXT_texture_storage |
|
|
|
if(textureFormat == GL::TextureFormat::Red || |
|
|
|
doesn't allow those */ |
|
|
|
textureFormat == GL::TextureFormat::Luminance || |
|
|
|
CORRADE_INTERNAL_ASSERT( |
|
|
|
textureFormat == GL::TextureFormat::RG || |
|
|
|
textureFormat == GL::TextureFormat::Red || |
|
|
|
textureFormat == GL::TextureFormat::LuminanceAlpha || |
|
|
|
textureFormat == GL::TextureFormat::Luminance || |
|
|
|
textureFormat == GL::TextureFormat::RGB || |
|
|
|
textureFormat == GL::TextureFormat::RG || |
|
|
|
textureFormat == GL::TextureFormat::SRGB || |
|
|
|
textureFormat == GL::TextureFormat::LuminanceAlpha || |
|
|
|
textureFormat == GL::TextureFormat::RGBA || |
|
|
|
textureFormat == GL::TextureFormat::RGB || |
|
|
|
textureFormat == GL::TextureFormat::SRGBAlpha) |
|
|
|
textureFormat == GL::TextureFormat::SRGB || |
|
|
|
texture.setImage(0, textureFormat, ImageView2D{pixelFormat, GL::PixelType::UnsignedByte, processedSize}); |
|
|
|
textureFormat == GL::TextureFormat::RGBA || |
|
|
|
else |
|
|
|
textureFormat == GL::TextureFormat::SRGBAlpha); |
|
|
|
texture.setStorage(1, textureFormat, processedSize); |
|
|
|
texture.setImage(0, textureFormat, ImageView2D{pixelFormat, GL::PixelType::UnsignedByte, processedSize}); |
|
|
|
#else |
|
|
|
#else |
|
|
|
texture.setStorage(1, GL::textureFormat(processedFormat), processedSize); |
|
|
|
texture.setStorage(1, GL::textureFormat(processedFormat), processedSize); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|