|
|
|
|
@ -33,27 +33,15 @@
|
|
|
|
|
|
|
|
|
|
namespace Magnum { namespace Text { |
|
|
|
|
|
|
|
|
|
/** @todo Do this using delegating constructors when support for GCC 4.6 is dropped */ |
|
|
|
|
GlyphCache::GlyphCache(const TextureFormat internalFormat, const Vector2i& size, const Vector2i& padding): GlyphCache{internalFormat, size, size, padding} {} |
|
|
|
|
|
|
|
|
|
GlyphCache::GlyphCache(const TextureFormat internalFormat, const Vector2i& originalSize, const Vector2i& size, const Vector2i& padding): _size(originalSize), _padding(padding) { |
|
|
|
|
initialize(internalFormat, size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GlyphCache::GlyphCache(const TextureFormat internalFormat, const Vector2i& size, const Vector2i& padding): _size(size), _padding(padding) { |
|
|
|
|
initialize(internalFormat, size); |
|
|
|
|
} |
|
|
|
|
GlyphCache::GlyphCache(const Vector2i& size, const Vector2i& padding): GlyphCache{size, size, padding} {} |
|
|
|
|
|
|
|
|
|
GlyphCache::GlyphCache(const Vector2i& originalSize, const Vector2i& size, const Vector2i& padding): _size(originalSize), _padding(padding) { |
|
|
|
|
initialize(size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GlyphCache::GlyphCache(const Vector2i& size, const Vector2i& padding): _size(size), _padding(padding) { |
|
|
|
|
initialize(size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GlyphCache::~GlyphCache() = default; |
|
|
|
|
|
|
|
|
|
void GlyphCache::initialize(const Vector2i& size) { |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::texture_rg); |
|
|
|
|
#endif |
|
|
|
|
@ -69,6 +57,8 @@ void GlyphCache::initialize(const Vector2i& size) {
|
|
|
|
|
initialize(internalFormat, size); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
GlyphCache::~GlyphCache() = default; |
|
|
|
|
|
|
|
|
|
void GlyphCache::initialize(const TextureFormat internalFormat, const Vector2i& size) { |
|
|
|
|
/* Initialize texture */ |
|
|
|
|
_texture.setWrapping(Sampler::Wrapping::ClampToEdge) |
|
|
|
|
|