Browse Source

Text: drop also the Vector2 include in GlyphCacheGL.h.

Now it's finally as it should be.
pull/674/head
Vladimír Vondruš 1 year ago
parent
commit
c71e9b953b
  1. 9
      src/Magnum/Text/GlyphCacheGL.cpp
  2. 28
      src/Magnum/Text/GlyphCacheGL.h

9
src/Magnum/Text/GlyphCacheGL.cpp

@ -35,6 +35,7 @@
#if (!defined(MAGNUM_TARGET_GLES) || (defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL))) || defined(MAGNUM_BUILD_DEPRECATED)
#include "Magnum/PixelFormat.h"
#endif
#include "Magnum/Math/Vector2.h"
#if !defined(MAGNUM_TARGET_GLES) || (defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL))
#include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h"
@ -91,8 +92,12 @@ GlyphCacheGL::State::State(const PixelFormat format, const Vector2i& size, const
GlyphCacheGL::GlyphCacheGL(PixelFormat format, const Vector2i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding): AbstractGlyphCache{Containers::pointer<State>(format, size, processedFormat, processedSize, padding)} {}
GlyphCacheGL::GlyphCacheGL(PixelFormat format, const Vector2i& size, PixelFormat processedFormat, const Vector2i& processedSize): GlyphCacheGL{format, size, processedFormat, processedSize, Vector2i{1}} {}
GlyphCacheGL::GlyphCacheGL(const PixelFormat format, const Vector2i& size, const Vector2i& padding): GlyphCacheGL{format, size, format, size, padding} {}
GlyphCacheGL::GlyphCacheGL(const PixelFormat format, const Vector2i& size): GlyphCacheGL{format, size, Vector2i{1}} {}
#ifdef MAGNUM_BUILD_DEPRECATED
/* The unconditional Optional unwrap in these two may assert in rare cases.
Let's hope it doesn't in practice. */
@ -208,8 +213,12 @@ GlyphCacheArrayGL::State::State(const PixelFormat format, const Vector3i& size,
GlyphCacheArrayGL::GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding): AbstractGlyphCache{Containers::pointer<State>(format, size, processedFormat, processedSize, padding)} {}
GlyphCacheArrayGL::GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, PixelFormat processedFormat, const Vector2i& processedSize): GlyphCacheArrayGL{format, size, processedFormat, processedSize, Vector2i{1}} {}
GlyphCacheArrayGL::GlyphCacheArrayGL(const PixelFormat format, const Vector3i& size, const Vector2i& padding): GlyphCacheArrayGL{format, size, format, size.xy(), padding} {}
GlyphCacheArrayGL::GlyphCacheArrayGL(const PixelFormat format, const Vector3i& size): GlyphCacheArrayGL{format, size, Vector2i{1}} {}
GlyphCacheArrayGL::GlyphCacheArrayGL(NoCreateT) noexcept: AbstractGlyphCache{NoCreate} {}
GL::Texture2DArray& GlyphCacheArrayGL::texture() {

28
src/Magnum/Text/GlyphCacheGL.h

@ -34,7 +34,9 @@
#include "Magnum/configure.h"
#ifdef MAGNUM_TARGET_GL
#include "Magnum/Math/Vector2.h"
#ifdef MAGNUM_BUILD_DEPRECATED
#include "Magnum/Math/Vector2.h" /* default argument in deprecated APIs */
#endif
#include "Magnum/GL/GL.h"
#include "Magnum/Text/AbstractGlyphCache.h"
@ -96,7 +98,13 @@ class MAGNUM_TEXT_EXPORT GlyphCacheGL: public AbstractGlyphCache {
* @p format and @p size, use @ref AbstractGlyphCache(PixelFormat, const Vector3i&, PixelFormat, const Vector2i&, const Vector2i&)
* to specify different values.
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size, const Vector2i& padding = Vector2i{1});
#else
/* To avoid a Vector2 include */
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size, const Vector2i& padding);
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size);
#endif
#ifdef MAGNUM_BUILD_DEPRECATED
/**
@ -179,7 +187,13 @@ class MAGNUM_TEXT_EXPORT GlyphCacheGL: public AbstractGlyphCache {
* into account.
* @see @ref AbstractGlyphCache(PixelFormat, const Vector2i&, const Vector2i&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding = Vector2i{1});
#else
/* To avoid a Vector2 include */
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding);
explicit GlyphCacheGL(PixelFormat format, const Vector2i& size, PixelFormat processedFormat, const Vector2i& processedSize);
#endif
#ifdef DOXYGEN_GENERATING_OUTPUT
private:
@ -247,7 +261,13 @@ class MAGNUM_TEXT_EXPORT GlyphCacheArrayGL: public AbstractGlyphCache {
* @p format and @p size, use @ref AbstractGlyphCache(PixelFormat, const Vector3i&, PixelFormat, const Vector2i&, const Vector2i&)
* to specify different values.
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, const Vector2i& padding = Vector2i{1});
#else
/* To avoid a Vector2 include */
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, const Vector2i& padding);
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size);
#endif
/**
* @brief Construct with a specific processed format and size
@ -268,7 +288,13 @@ class MAGNUM_TEXT_EXPORT GlyphCacheArrayGL: public AbstractGlyphCache {
* has @p processedSize.
* @see @ref AbstractGlyphCache(PixelFormat, const Vector2i&, const Vector2i&)
*/
#ifdef DOXYGEN_GENERATING_OUTPUT
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding = Vector2i{1});
#else
/* To avoid a Vector2 include */
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, PixelFormat processedFormat, const Vector2i& processedSize, const Vector2i& padding);
explicit GlyphCacheArrayGL(PixelFormat format, const Vector3i& size, PixelFormat processedFormat, const Vector2i& processedSize);
#endif
/**
* @brief Construct without creating the internal state and the OpenGL texture object

Loading…
Cancel
Save