Browse Source

Split the OpenGL layer out, pt 24: adapted plugins.

pull/233/head
Vladimír Vondruš 8 years ago
parent
commit
ddd939fdcc
  1. 6
      src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp
  2. 2
      src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.h
  3. 14
      src/MagnumPlugins/MagnumFontConverter/Test/MagnumFontConverterGLTest.cpp

6
src/MagnumPlugins/MagnumFont/Test/MagnumFontGLTest.cpp

@ -26,7 +26,7 @@
#include <sstream>
#include <Corrade/Utility/Directory.h>
#include "Magnum/OpenGLTester.h"
#include "Magnum/GL/OpenGLTester.h"
#include "Magnum/Text/AbstractFont.h"
#include "Magnum/Text/GlyphCache.h"
#include "Magnum/Trade/AbstractImporter.h"
@ -35,7 +35,7 @@
namespace Magnum { namespace Text { namespace Test {
struct MagnumFontGLTest: OpenGLTester {
struct MagnumFontGLTest: GL::OpenGLTester {
explicit MagnumFontGLTest();
void nonexistent();
@ -134,7 +134,7 @@ void MagnumFontGLTest::createGlyphCache() {
/* Just testing that nothing crashes, asserts or errors */
std::unique_ptr<GlyphCache> cache = font->createGlyphCache();
MAGNUM_VERIFY_NO_ERROR();
MAGNUM_VERIFY_NO_GL_ERROR();
CORRADE_VERIFY(cache);
CORRADE_COMPARE(cache->glyphCount(), 3);

2
src/MagnumPlugins/MagnumFontConverter/MagnumFontConverter.h

@ -57,7 +57,7 @@ namespace Magnum { namespace Text {
Expects filename prefix, creates two files, `prefix.conf` and `prefix.tga`. See
@ref MagnumFont for more information about the font.
This plugin is available only on desktop OpenGL, as it uses @ref Texture::image()
This plugin is available only on desktop OpenGL, as it uses @ref GL::Texture::image()
to read back the generated data. It depends on the @ref Text library and the
@ref Trade::TgaImageConverter "TgaImageConverter" plugin. It is built if
`WITH_MAGNUMFONTCONVERTER` is enabled when building Magnum. To use as a

14
src/MagnumPlugins/MagnumFontConverter/Test/MagnumFontConverterGLTest.cpp

@ -26,11 +26,11 @@
#include <Corrade/Utility/Directory.h>
#include <Corrade/TestSuite/Compare/File.h>
#include "Magnum/Context.h"
#include "Magnum/Extensions.h"
#include "Magnum/PixelFormat.h"
#include "Magnum/TextureFormat.h"
#include "Magnum/OpenGLTester.h"
#include "Magnum/GL/Context.h"
#include "Magnum/GL/Extensions.h"
#include "Magnum/GL/TextureFormat.h"
#include "Magnum/GL/OpenGLTester.h"
#include "Magnum/Text/GlyphCache.h"
#include "Magnum/Text/AbstractFont.h"
#include "Magnum/Text/AbstractFontConverter.h"
@ -42,7 +42,7 @@
namespace Magnum { namespace Text { namespace Test {
struct MagnumFontConverterGLTest: OpenGLTester {
struct MagnumFontConverterGLTest: GL::OpenGLTester {
explicit MagnumFontConverterGLTest();
void exportFont();
@ -112,8 +112,8 @@ void MagnumFontConverterGLTest::exportFont() {
font.openFile({}, {});
/* Create fake cache */
MAGNUM_ASSERT_EXTENSION_SUPPORTED(Extensions::GL::ARB::texture_rg);
GlyphCache cache(TextureFormat::R8, Vector2i(1536), Vector2i(256), Vector2i(24));
MAGNUM_ASSERT_GL_EXTENSION_SUPPORTED(GL::Extensions::ARB::texture_rg);
GlyphCache cache(GL::TextureFormat::R8, Vector2i(1536), Vector2i(256), Vector2i(24));
cache.insert(font.glyphId(U'W'), {25, 34}, {{0, 8}, {16, 128}});
cache.insert(font.glyphId(U'e'), {25, 12}, {{16, 4}, {64, 32}});

Loading…
Cancel
Save