Browse Source

DebugTools: fixed compilation on GLES2.

pull/183/head^2
Vladimír Vondruš 10 years ago
parent
commit
aa721781f1
  1. 7
      src/Magnum/DebugTools/Test/TextureImageGLTest.cpp
  2. 4
      src/Magnum/DebugTools/TextureImage.cpp

7
src/Magnum/DebugTools/Test/TextureImageGLTest.cpp

@ -25,7 +25,6 @@
#include <Corrade/TestSuite/Compare/Container.h>
#include "Magnum/BufferImage.h"
#include "Magnum/CubeMapTexture.h"
#include "Magnum/Image.h"
#include "Magnum/PixelFormat.h"
@ -36,6 +35,10 @@
#include "Magnum/Math/Range.h"
#include "Magnum/Test/AbstractOpenGLTester.h"
#ifndef MAGNUM_TARGET_GLES2
#include "Magnum/BufferImage.h"
#endif
namespace Magnum { namespace DebugTools { namespace Test {
struct TextureImageGLTest: Magnum::Test::AbstractOpenGLTester {
@ -152,6 +155,7 @@ void TextureImageGLTest::subImageCubeBuffer() {
}
#endif
#ifndef MAGNUM_TARGET_GLES2
namespace {
constexpr UnsignedInt Data2DUInt[] = { 0xcafebabe,
0xdeadbeef,
@ -192,6 +196,7 @@ void TextureImageGLTest::subImage2DFloat() {
Containers::ArrayView<const Float>{Data2DFloat},
TestSuite::Compare::Container);
}
#endif
}}}

4
src/Magnum/DebugTools/TextureImage.cpp

@ -25,7 +25,9 @@
#include "TextureImage.h"
#ifndef MAGNUM_TARGET_GLES2
#include "Magnum/BufferImage.h"
#endif
#include "Magnum/Context.h"
#include "Magnum/Extensions.h"
#include "Magnum/Framebuffer.h"
@ -101,7 +103,7 @@ void textureSubImage(Texture2D& texture, const Int level, const Range2Di& range,
}
#endif
#ifdef MAGNUM_TARGET_GLES
#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2)
if(image.type() == PixelType::Float) {
const PixelFormat imageFormat = image.format();
TextureFormat textureFormat;

Loading…
Cancel
Save