Browse Source

OpenGL ES 2.0 and 3.0 share the same extension list.

Until recently (or maybe not too recently) ES3 extension header was
"currently empty", now the extension header is shared with ES2. It's
nice to finally get rid of all the weird ifndefs.
pull/34/head
Vladimír Vondruš 13 years ago
parent
commit
db5618c325
  1. 6
      src/AbstractFramebuffer.cpp
  2. 2
      src/AbstractFramebuffer.h
  3. 8
      src/AbstractImage.cpp
  4. 14
      src/AbstractTexture.cpp
  5. 2
      src/AbstractTexture.h
  6. 4
      src/Buffer.cpp
  7. 10
      src/Buffer.h
  8. 8
      src/ColorFormat.cpp
  9. 8
      src/ColorFormat.h
  10. 2
      src/Context.h
  11. 2
      src/CubeMapTexture.h
  12. 2
      src/CubeMapTextureArray.h
  13. 8
      src/Implementation/RendererState.h
  14. 2
      src/OpenGL.h
  15. 2
      src/Platform/magnum-info.cpp
  16. 8
      src/Query.cpp
  17. 4
      src/Query.h
  18. 4
      src/RenderbufferFormat.h
  19. 14
      src/Renderer.cpp
  20. 12
      src/Renderer.h
  21. 4
      src/Sampler.cpp
  22. 4
      src/Sampler.h
  23. 2
      src/Test/BufferGLTest.cpp
  24. 4
      src/Test/RendererTest.cpp
  25. 2
      src/Texture.h
  26. 18
      src/TextureFormat.h

6
src/AbstractFramebuffer.cpp

@ -277,7 +277,6 @@ void AbstractFramebuffer::initializeContextBasedFunctionality(Context& context)
else readTarget = drawTarget = FramebufferTarget::ReadDraw; else readTarget = drawTarget = FramebufferTarget::ReadDraw;
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) if(context.isExtensionSupported<Extensions::GL::ARB::robustness>())
#else #else
@ -295,9 +294,6 @@ void AbstractFramebuffer::initializeContextBasedFunctionality(Context& context)
readImplementation = &AbstractFramebuffer::readImplementationRobustness; readImplementation = &AbstractFramebuffer::readImplementationRobustness;
#endif #endif
} }
#else
static_cast<void>(context);
#endif
} }
GLenum AbstractFramebuffer::checkStatusImplementationDefault(const FramebufferTarget target) { GLenum AbstractFramebuffer::checkStatusImplementationDefault(const FramebufferTarget target) {
@ -380,7 +376,6 @@ void AbstractFramebuffer::readImplementationDefault(const Vector2i& offset, cons
glReadPixels(offset.x(), offset.y(), size.x(), size.y(), GLenum(format), GLenum(type), data); glReadPixels(offset.x(), offset.y(), size.x(), size.y(), GLenum(format), GLenum(type), data);
} }
#ifndef MAGNUM_TARGET_GLES3
void AbstractFramebuffer::readImplementationRobustness(const Vector2i& offset, const Vector2i& size, const ColorFormat format, const ColorType type, const std::size_t dataSize, GLvoid* const data) { void AbstractFramebuffer::readImplementationRobustness(const Vector2i& offset, const Vector2i& size, const ColorFormat format, const ColorType type, const std::size_t dataSize, GLvoid* const data) {
/** @todo Enable when extension wrangler for ES is available */ /** @todo Enable when extension wrangler for ES is available */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -396,6 +391,5 @@ void AbstractFramebuffer::readImplementationRobustness(const Vector2i& offset, c
static_cast<void>(data); static_cast<void>(data);
#endif #endif
} }
#endif
} }

2
src/AbstractFramebuffer.h

@ -360,9 +360,7 @@ class MAGNUM_EXPORT AbstractFramebuffer {
typedef void(*ReadImplementation)(const Vector2i&, const Vector2i&, ColorFormat, ColorType, std::size_t, GLvoid*); typedef void(*ReadImplementation)(const Vector2i&, const Vector2i&, ColorFormat, ColorType, std::size_t, GLvoid*);
static void MAGNUM_LOCAL readImplementationDefault(const Vector2i& offset, const Vector2i& size, ColorFormat format, ColorType type, std::size_t dataSize, GLvoid* data); static void MAGNUM_LOCAL readImplementationDefault(const Vector2i& offset, const Vector2i& size, ColorFormat format, ColorType type, std::size_t dataSize, GLvoid* data);
#ifndef MAGNUM_TARGET_GLES3
static void MAGNUM_LOCAL readImplementationRobustness(const Vector2i& offset, const Vector2i& size, ColorFormat format, ColorType type, std::size_t dataSize, GLvoid* data); static void MAGNUM_LOCAL readImplementationRobustness(const Vector2i& offset, const Vector2i& size, ColorFormat format, ColorType type, std::size_t dataSize, GLvoid* data);
#endif
static ReadImplementation MAGNUM_LOCAL readImplementation; static ReadImplementation MAGNUM_LOCAL readImplementation;
}; };

8
src/AbstractImage.cpp

@ -61,13 +61,9 @@ std::size_t AbstractImage::pixelSize(ColorFormat format, ColorType type) {
case ColorType::UnsignedShort565Rev: case ColorType::UnsignedShort565Rev:
#endif #endif
case ColorType::UnsignedShort4444: case ColorType::UnsignedShort4444:
#ifndef MAGNUM_TARGET_GLES3
case ColorType::UnsignedShort4444Rev: case ColorType::UnsignedShort4444Rev:
#endif
case ColorType::UnsignedShort5551: case ColorType::UnsignedShort5551:
#ifndef MAGNUM_TARGET_GLES3
case ColorType::UnsignedShort1555Rev: case ColorType::UnsignedShort1555Rev:
#endif
return 2; return 2;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
case ColorType::UnsignedInt8888: case ColorType::UnsignedInt8888:
@ -123,9 +119,7 @@ std::size_t AbstractImage::pixelSize(ColorFormat format, ColorType type) {
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case ColorFormat::RGBAInteger: case ColorFormat::RGBAInteger:
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
case ColorFormat::BGRA: case ColorFormat::BGRA:
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
case ColorFormat::BGRAInteger: case ColorFormat::BGRAInteger:
#endif #endif
@ -133,9 +127,7 @@ std::size_t AbstractImage::pixelSize(ColorFormat format, ColorType type) {
/* Handled above */ /* Handled above */
case ColorFormat::DepthComponent: case ColorFormat::DepthComponent:
#ifndef MAGNUM_TARGET_GLES3
case ColorFormat::StencilIndex: case ColorFormat::StencilIndex:
#endif
case ColorFormat::DepthStencil: case ColorFormat::DepthStencil:
CORRADE_ASSERT_UNREACHABLE(); CORRADE_ASSERT_UNREACHABLE();
} }

14
src/AbstractTexture.cpp

@ -366,9 +366,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat::RGB5: case TextureFormat::RGB5:
#endif #endif
case TextureFormat::RGB565: case TextureFormat::RGB565:
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::RGB10: case TextureFormat::RGB10:
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
case TextureFormat::RGB12: case TextureFormat::RGB12:
#endif #endif
@ -376,9 +374,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat::R11FG11FB10F: case TextureFormat::R11FG11FB10F:
case TextureFormat::RGB9E5: case TextureFormat::RGB9E5:
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::SRGB: case TextureFormat::SRGB:
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case TextureFormat::SRGB8: case TextureFormat::SRGB8:
#endif #endif
@ -421,9 +417,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
case TextureFormat::RGBA12: case TextureFormat::RGBA12:
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::SRGBAlpha: case TextureFormat::SRGBAlpha:
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case TextureFormat::SRGB8Alpha8: case TextureFormat::SRGB8Alpha8:
#endif #endif
@ -455,9 +449,7 @@ ColorFormat AbstractTexture::imageFormatForInternalFormat(const TextureFormat in
case TextureFormat::DepthComponent: case TextureFormat::DepthComponent:
case TextureFormat::DepthComponent16: case TextureFormat::DepthComponent16:
case TextureFormat::DepthComponent24: case TextureFormat::DepthComponent24:
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::DepthComponent32: case TextureFormat::DepthComponent32:
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case TextureFormat::DepthComponent32F: case TextureFormat::DepthComponent32F:
#endif #endif
@ -501,10 +493,8 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat::Luminance: case TextureFormat::Luminance:
case TextureFormat::LuminanceAlpha: case TextureFormat::LuminanceAlpha:
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::SRGB: case TextureFormat::SRGB:
case TextureFormat::SRGBAlpha: case TextureFormat::SRGBAlpha:
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case TextureFormat::SRGB8: case TextureFormat::SRGB8:
case TextureFormat::SRGB8Alpha8: case TextureFormat::SRGB8Alpha8:
@ -619,9 +609,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat::RGB565: case TextureFormat::RGB565:
return ColorType::UnsignedShort565; return ColorType::UnsignedShort565;
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::RGB10: case TextureFormat::RGB10:
#endif
case TextureFormat::RGB10A2: case TextureFormat::RGB10A2:
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
case TextureFormat::RGB10A2UI: case TextureFormat::RGB10A2UI:
@ -640,9 +628,7 @@ ColorType AbstractTexture::imageTypeForInternalFormat(const TextureFormat intern
case TextureFormat::DepthComponent: case TextureFormat::DepthComponent:
case TextureFormat::DepthComponent24: case TextureFormat::DepthComponent24:
#ifndef MAGNUM_TARGET_GLES3
case TextureFormat::DepthComponent32: case TextureFormat::DepthComponent32:
#endif
return ColorType::UnsignedInt; return ColorType::UnsignedInt;
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2

2
src/AbstractTexture.h

@ -217,7 +217,6 @@ class MAGNUM_EXPORT AbstractTexture {
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Set border color * @brief Set border color
* @return Reference to self (for method chaining) * @return Reference to self (for method chaining)
@ -259,7 +258,6 @@ class MAGNUM_EXPORT AbstractTexture {
(this->*parameterfImplementation)(GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropy); (this->*parameterfImplementation)(GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropy);
return *this; return *this;
} }
#endif
/** /**
* @brief Invalidate texture image * @brief Invalidate texture image

4
src/Buffer.cpp

@ -44,9 +44,7 @@ Buffer::DataImplementation Buffer::dataImplementation = &Buffer::dataImplementat
Buffer::SubDataImplementation Buffer::subDataImplementation = &Buffer::subDataImplementationDefault; Buffer::SubDataImplementation Buffer::subDataImplementation = &Buffer::subDataImplementationDefault;
Buffer::InvalidateImplementation Buffer::invalidateImplementation = &Buffer::invalidateImplementationNoOp; Buffer::InvalidateImplementation Buffer::invalidateImplementation = &Buffer::invalidateImplementationNoOp;
Buffer::InvalidateSubImplementation Buffer::invalidateSubImplementation = &Buffer::invalidateSubImplementationNoOp; Buffer::InvalidateSubImplementation Buffer::invalidateSubImplementation = &Buffer::invalidateSubImplementationNoOp;
#ifndef MAGNUM_TARGET_GLES3
Buffer::MapImplementation Buffer::mapImplementation = &Buffer::mapImplementationDefault; Buffer::MapImplementation Buffer::mapImplementation = &Buffer::mapImplementationDefault;
#endif
Buffer::MapRangeImplementation Buffer::mapRangeImplementation = &Buffer::mapRangeImplementationDefault; Buffer::MapRangeImplementation Buffer::mapRangeImplementation = &Buffer::mapRangeImplementationDefault;
Buffer::FlushMappedRangeImplementation Buffer::flushMappedRangeImplementation = &Buffer::flushMappedRangeImplementationDefault; Buffer::FlushMappedRangeImplementation Buffer::flushMappedRangeImplementation = &Buffer::flushMappedRangeImplementationDefault;
Buffer::UnmapImplementation Buffer::unmapImplementation = &Buffer::unmapImplementationDefault; Buffer::UnmapImplementation Buffer::unmapImplementation = &Buffer::unmapImplementationDefault;
@ -294,7 +292,6 @@ void Buffer::invalidateSubImplementationARB(GLintptr offset, GLsizeiptr length)
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
void* Buffer::mapImplementationDefault(MapAccess access) { void* Buffer::mapImplementationDefault(MapAccess access) {
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -310,7 +307,6 @@ void* Buffer::mapImplementationDSA(MapAccess access) {
return glMapNamedBufferEXT(_id, GLenum(access)); return glMapNamedBufferEXT(_id, GLenum(access));
} }
#endif #endif
#endif
void* Buffer::mapRangeImplementationDefault(GLintptr offset, GLsizeiptr length, MapFlags access) { void* Buffer::mapRangeImplementationDefault(GLintptr offset, GLsizeiptr length, MapFlags access) {
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */

10
src/Buffer.h

@ -314,7 +314,6 @@ class MAGNUM_EXPORT Buffer {
typedef BufferUsage Usage; typedef BufferUsage Usage;
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Memory mapping access * @brief Memory mapping access
* *
@ -322,9 +321,7 @@ class MAGNUM_EXPORT Buffer {
* instead, as it has more complete set of features. * instead, as it has more complete set of features.
* @see map(MapAccess), mapSub() * @see map(MapAccess), mapSub()
* @requires_es_extension %Extension @es_extension{OES,mapbuffer} or * @requires_es_extension %Extension @es_extension{OES,mapbuffer} or
* @es_extension{CHROMIUM,map_sub} in OpenGL ES 2.0, use * @es_extension{CHROMIUM,map_sub}
* @ref Magnum::Buffer::map(GLintptr, GLsizeiptr, MapFlags) "map(GLintptr, GLsizeiptr, MapFlags)"
* in OpenGL ES 3.0 instead.
*/ */
enum class MapAccess: GLenum { enum class MapAccess: GLenum {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -352,7 +349,6 @@ class MAGNUM_EXPORT Buffer {
ReadWrite = GL_READ_WRITE ReadWrite = GL_READ_WRITE
#endif #endif
}; };
#endif
/** /**
* @brief Memory mapping flag * @brief Memory mapping flag
@ -763,7 +759,6 @@ class MAGNUM_EXPORT Buffer {
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Map buffer to client memory * @brief Map buffer to client memory
* @param access Access * @param access Access
@ -784,7 +779,6 @@ class MAGNUM_EXPORT Buffer {
void* map(MapAccess access) { void* map(MapAccess access) {
return (this->*mapImplementation)(access); return (this->*mapImplementation)(access);
} }
#endif
#if defined(MAGNUM_TARGET_GLES2) || defined(DOXYGEN_GENERATING_OUTPUT) #if defined(MAGNUM_TARGET_GLES2) || defined(DOXYGEN_GENERATING_OUTPUT)
/** /**
@ -941,14 +935,12 @@ class MAGNUM_EXPORT Buffer {
#endif #endif
static InvalidateSubImplementation invalidateSubImplementation; static InvalidateSubImplementation invalidateSubImplementation;
#ifndef MAGNUM_TARGET_GLES3
typedef void*(Buffer::*MapImplementation)(MapAccess); typedef void*(Buffer::*MapImplementation)(MapAccess);
void MAGNUM_LOCAL * mapImplementationDefault(MapAccess access); void MAGNUM_LOCAL * mapImplementationDefault(MapAccess access);
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
void MAGNUM_LOCAL * mapImplementationDSA(MapAccess access); void MAGNUM_LOCAL * mapImplementationDSA(MapAccess access);
#endif #endif
static MapImplementation mapImplementation; static MapImplementation mapImplementation;
#endif
typedef void*(Buffer::*MapRangeImplementation)(GLintptr, GLsizeiptr, MapFlags); typedef void*(Buffer::*MapRangeImplementation)(GLintptr, GLsizeiptr, MapFlags);
void MAGNUM_LOCAL * mapRangeImplementationDefault(GLintptr offset, GLsizeiptr length, MapFlags access); void MAGNUM_LOCAL * mapRangeImplementationDefault(GLintptr offset, GLsizeiptr length, MapFlags access);

8
src/ColorFormat.cpp

@ -49,9 +49,7 @@ Debug operator<<(Debug debug, const ColorFormat value) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
_c(BGR) _c(BGR)
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
_c(BGRA) _c(BGRA)
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
_c(RedInteger) _c(RedInteger)
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -67,9 +65,7 @@ Debug operator<<(Debug debug, const ColorFormat value) {
#endif #endif
#endif #endif
_c(DepthComponent) _c(DepthComponent)
#ifndef MAGNUM_TARGET_GLES3
_c(StencilIndex) _c(StencilIndex)
#endif
_c(DepthStencil) _c(DepthStencil)
#undef _c #undef _c
} }
@ -103,13 +99,9 @@ Debug operator<<(Debug debug, const ColorType value) {
_c(UnsignedShort565Rev) _c(UnsignedShort565Rev)
#endif #endif
_c(UnsignedShort4444) _c(UnsignedShort4444)
#ifndef MAGNUM_TARGET_GLES3
_c(UnsignedShort4444Rev) _c(UnsignedShort4444Rev)
#endif
_c(UnsignedShort5551) _c(UnsignedShort5551)
#ifndef MAGNUM_TARGET_GLES3
_c(UnsignedShort1555Rev) _c(UnsignedShort1555Rev)
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
_c(UnsignedInt8888) _c(UnsignedInt8888)
_c(UnsignedInt8888Rev) _c(UnsignedInt8888Rev)

8
src/ColorFormat.h

@ -123,7 +123,6 @@ enum class ColorFormat: GLenum {
BGR = GL_BGR, BGR = GL_BGR,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Floating-point BGRA. * Floating-point BGRA.
* @requires_es_extension %Extension @es_extension{EXT,read_format_bgra} * @requires_es_extension %Extension @es_extension{EXT,read_format_bgra}
@ -135,7 +134,6 @@ enum class ColorFormat: GLenum {
#else #else
BGRA = GL_BGRA_EXT, BGRA = GL_BGRA_EXT,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -221,7 +219,6 @@ enum class ColorFormat: GLenum {
*/ */
DepthComponent = GL_DEPTH_COMPONENT, DepthComponent = GL_DEPTH_COMPONENT,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Stencil index. * Stencil index.
* @requires_gl44 %Extension @extension{ARB,texture_stencil8} for texture * @requires_gl44 %Extension @extension{ARB,texture_stencil8} for texture
@ -235,7 +232,6 @@ enum class ColorFormat: GLenum {
#else #else
StencilIndex = 0x1901, StencilIndex = 0x1901,
#endif #endif
#endif
/** /**
* Depth and stencil. * Depth and stencil.
@ -361,7 +357,6 @@ enum class ColorType: GLenum {
*/ */
UnsignedShort4444 = GL_UNSIGNED_SHORT_4_4_4_4, UnsignedShort4444 = GL_UNSIGNED_SHORT_4_4_4_4,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* ABGR, unsigned short, each component 4bit. * ABGR, unsigned short, each component 4bit.
* @requires_es_extension For framebuffer reading only, extension * @requires_es_extension For framebuffer reading only, extension
@ -372,7 +367,6 @@ enum class ColorType: GLenum {
#else #else
UnsignedShort4444Rev = GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT, UnsignedShort4444Rev = GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT,
#endif #endif
#endif
/** /**
* RGBA, unsigned short, each RGB component 5bit, alpha component 1bit. * RGBA, unsigned short, each RGB component 5bit, alpha component 1bit.
@ -380,7 +374,6 @@ enum class ColorType: GLenum {
*/ */
UnsignedShort5551 = GL_UNSIGNED_SHORT_5_5_5_1, UnsignedShort5551 = GL_UNSIGNED_SHORT_5_5_5_1,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* ABGR, unsigned short, each RGB component 5bit, alpha component 1bit. * ABGR, unsigned short, each RGB component 5bit, alpha component 1bit.
* @requires_es_extension For framebuffer reading only, extension * @requires_es_extension For framebuffer reading only, extension
@ -391,7 +384,6 @@ enum class ColorType: GLenum {
#else #else
UnsignedShort1555Rev = GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT, UnsignedShort1555Rev = GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**

2
src/Context.h

@ -154,7 +154,6 @@ class MAGNUM_EXPORT Context {
* @see Flags, flags() * @see Flags, flags()
*/ */
enum class Flag: GLint { enum class Flag: GLint {
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Debug context * Debug context
* @requires_gl43 %Extension @es_extension{KHR,debug} * @requires_gl43 %Extension @es_extension{KHR,debug}
@ -165,7 +164,6 @@ class MAGNUM_EXPORT Context {
#else #else
Debug = GL_CONTEXT_FLAG_DEBUG_BIT_KHR, Debug = GL_CONTEXT_FLAG_DEBUG_BIT_KHR,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**

2
src/CubeMapTexture.h

@ -232,7 +232,6 @@ class CubeMapTexture: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES3
CubeMapTexture& setBorderColor(const Color4& color) { CubeMapTexture& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return *this; return *this;
@ -241,7 +240,6 @@ class CubeMapTexture: public AbstractTexture {
AbstractTexture::setMaxAnisotropy(anisotropy); AbstractTexture::setMaxAnisotropy(anisotropy);
return *this; return *this;
} }
#endif
CubeMapTexture& generateMipmap() { CubeMapTexture& generateMipmap() {
AbstractTexture::generateMipmap(); AbstractTexture::generateMipmap();
return *this; return *this;

2
src/CubeMapTextureArray.h

@ -242,7 +242,6 @@ class CubeMapTextureArray: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES3
CubeMapTextureArray& setBorderColor(const Color4& color) { CubeMapTextureArray& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return *this; return *this;
@ -251,7 +250,6 @@ class CubeMapTextureArray: public AbstractTexture {
AbstractTexture::setMaxAnisotropy(anisotropy); AbstractTexture::setMaxAnisotropy(anisotropy);
return *this; return *this;
} }
#endif
CubeMapTextureArray& generateMipmap() { CubeMapTextureArray& generateMipmap() {
AbstractTexture::generateMipmap(); AbstractTexture::generateMipmap();
return *this; return *this;

8
src/Implementation/RendererState.h

@ -29,15 +29,9 @@
namespace Magnum { namespace Implementation { namespace Magnum { namespace Implementation {
struct RendererState { struct RendererState {
constexpr RendererState() constexpr RendererState(): resetNotificationStrategy() {}
#ifndef MAGNUM_TARGET_GLES3
: resetNotificationStrategy()
#endif
{}
#ifndef MAGNUM_TARGET_GLES3
Renderer::ResetNotificationStrategy resetNotificationStrategy; Renderer::ResetNotificationStrategy resetNotificationStrategy;
#endif
}; };
}} }}

2
src/OpenGL.h

@ -56,8 +56,8 @@
#else #else
#include <OpenGL/GLES2/gl2platform.h> #include <OpenGL/GLES2/gl2platform.h>
#include <OpenGL/GLES2/gl2.h> #include <OpenGL/GLES2/gl2.h>
#include <OpenGL/GLES2/gl2ext.h>
#endif #endif
#include <OpenGL/GLES2/gl2ext.h>
#endif #endif
#endif #endif

2
src/Platform/magnum-info.cpp

@ -344,13 +344,11 @@ MagnumInfo::MagnumInfo(const Arguments& arguments): Platform::WindowlessApplicat
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
if(c->isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) { if(c->isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) {
_h(EXT::texture_filter_anisotropic) _h(EXT::texture_filter_anisotropic)
_l(Sampler::maxAnisotropy()) _l(Sampler::maxAnisotropy())
} }
#endif
#undef _l #undef _l
#undef _h #undef _h

8
src/Query.cpp

@ -91,13 +91,12 @@ template<> UnsignedInt AbstractQuery::result<UnsignedInt>() {
return result; return result;
} }
#ifndef MAGNUM_TARGET_GLES3
template<> Int AbstractQuery::result<Int>() { template<> Int AbstractQuery::result<Int>() {
CORRADE_ASSERT(!target, "AbstractQuery::result(): the query is currently running", {}); CORRADE_ASSERT(!target, "AbstractQuery::result(): the query is currently running", {});
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */
Int result; Int result;
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result); glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result);
#else #else
CORRADE_INTERNAL_ASSERT(false); CORRADE_INTERNAL_ASSERT(false);
@ -111,7 +110,7 @@ template<> UnsignedLong AbstractQuery::result<UnsignedLong>() {
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */
UnsignedLong result; UnsignedLong result;
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
glGetQueryObjectui64v(_id, GL_QUERY_RESULT, &result); glGetQueryObjectui64v(_id, GL_QUERY_RESULT, &result);
#else #else
CORRADE_INTERNAL_ASSERT(false); CORRADE_INTERNAL_ASSERT(false);
@ -125,7 +124,7 @@ template<> Long AbstractQuery::result<Long>() {
/** @todo Re-enable when extension wrangler is available for ES */ /** @todo Re-enable when extension wrangler is available for ES */
Long result; Long result;
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
glGetQueryObjecti64v(_id, GL_QUERY_RESULT, &result); glGetQueryObjecti64v(_id, GL_QUERY_RESULT, &result);
#else #else
CORRADE_INTERNAL_ASSERT(false); CORRADE_INTERNAL_ASSERT(false);
@ -134,7 +133,6 @@ template<> Long AbstractQuery::result<Long>() {
return result; return result;
} }
#endif #endif
#endif
void AbstractQuery::begin(GLenum target) { void AbstractQuery::begin(GLenum target) {
CORRADE_ASSERT(!this->target, "AbstractQuery::begin(): the query is already running", ); CORRADE_ASSERT(!this->target, "AbstractQuery::begin(): the query is already running", );

4
src/Query.h

@ -110,12 +110,10 @@ class MAGNUM_EXPORT AbstractQuery {
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
template<> bool MAGNUM_EXPORT AbstractQuery::result<bool>(); template<> bool MAGNUM_EXPORT AbstractQuery::result<bool>();
template<> UnsignedInt MAGNUM_EXPORT AbstractQuery::result<UnsignedInt>(); template<> UnsignedInt MAGNUM_EXPORT AbstractQuery::result<UnsignedInt>();
#ifndef MAGNUM_TARGET_GLES3
template<> Int MAGNUM_EXPORT AbstractQuery::result<Int>(); template<> Int MAGNUM_EXPORT AbstractQuery::result<Int>();
template<> UnsignedLong MAGNUM_EXPORT AbstractQuery::result<UnsignedLong>(); template<> UnsignedLong MAGNUM_EXPORT AbstractQuery::result<UnsignedLong>();
template<> Long MAGNUM_EXPORT AbstractQuery::result<Long>(); template<> Long MAGNUM_EXPORT AbstractQuery::result<Long>();
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -307,7 +305,6 @@ class SampleQuery: public AbstractQuery {
#endif #endif
}; };
#ifndef MAGNUM_TARGET_GLES3
/** /**
@brief Query for elapsed time @brief Query for elapsed time
@ -374,7 +371,6 @@ class TimeQuery: public AbstractQuery {
AbstractQuery::begin(GLenum(target)); AbstractQuery::begin(GLenum(target));
} }
}; };
#endif
} }

4
src/RenderbufferFormat.h

@ -403,7 +403,6 @@ enum class RenderbufferFormat: GLenum {
DepthComponent24 = GL_DEPTH_COMPONENT24_OES, DepthComponent24 = GL_DEPTH_COMPONENT24_OES,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Depth component, 32bit. * Depth component, 32bit.
* @requires_es_extension %Extension @es_extension{OES,depth32} * @requires_es_extension %Extension @es_extension{OES,depth32}
@ -413,7 +412,6 @@ enum class RenderbufferFormat: GLenum {
#else #else
DepthComponent32 = GL_DEPTH_COMPONENT32_OES, DepthComponent32 = GL_DEPTH_COMPONENT32_OES,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -435,7 +433,6 @@ enum class RenderbufferFormat: GLenum {
StencilIndex = GL_STENCIL_INDEX, StencilIndex = GL_STENCIL_INDEX,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* 1-bit stencil index. * 1-bit stencil index.
* @requires_es_extension %Extension @es_extension{OES,stencil1} * @requires_es_extension %Extension @es_extension{OES,stencil1}
@ -455,7 +452,6 @@ enum class RenderbufferFormat: GLenum {
#else #else
StencilIndex4 = GL_STENCIL_INDEX4_OES, StencilIndex4 = GL_STENCIL_INDEX4_OES,
#endif #endif
#endif
/** 8-bit stencil index. */ /** 8-bit stencil index. */
StencilIndex8 = GL_STENCIL_INDEX8, StencilIndex8 = GL_STENCIL_INDEX8,

14
src/Renderer.cpp

@ -38,9 +38,7 @@ Renderer::ClearDepthfImplementation Renderer::clearDepthfImplementation = &Rende
#else #else
Renderer::ClearDepthfImplementation Renderer::clearDepthfImplementation = &Renderer::clearDepthfImplementationES; Renderer::ClearDepthfImplementation Renderer::clearDepthfImplementation = &Renderer::clearDepthfImplementationES;
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
Renderer::GraphicsResetStatusImplementation Renderer::graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationDefault; Renderer::GraphicsResetStatusImplementation Renderer::graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationDefault;
#endif
void Renderer::setFeature(const Feature feature, const bool enabled) { void Renderer::setFeature(const Feature feature, const bool enabled) {
enabled ? glEnable(GLenum(feature)) : glDisable(GLenum(feature)); enabled ? glEnable(GLenum(feature)) : glDisable(GLenum(feature));
@ -162,7 +160,6 @@ void Renderer::setLogicOperation(const LogicOperation operation) {
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() { Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() {
ResetNotificationStrategy& strategy = Context::current()->state().renderer->resetNotificationStrategy; ResetNotificationStrategy& strategy = Context::current()->state().renderer->resetNotificationStrategy;
@ -176,7 +173,6 @@ Renderer::ResetNotificationStrategy Renderer::resetNotificationStrategy() {
return strategy; return strategy;
} }
#endif
void Renderer::initializeContextBasedFunctionality(Context& context) { void Renderer::initializeContextBasedFunctionality(Context& context) {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
@ -187,7 +183,6 @@ void Renderer::initializeContextBasedFunctionality(Context& context) {
} }
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
if(context.isExtensionSupported<Extensions::GL::ARB::robustness>()) if(context.isExtensionSupported<Extensions::GL::ARB::robustness>())
#else #else
@ -202,9 +197,6 @@ void Renderer::initializeContextBasedFunctionality(Context& context) {
graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationRobustness; graphicsResetStatusImplementation = &Renderer::graphicsResetStatusImplementationRobustness;
} }
#else
static_cast<void>(context);
#endif
/* Set some "corporate identity" */ /* Set some "corporate identity" */
setClearColor(Color3(0.125f)); setClearColor(Color3(0.125f));
@ -220,7 +212,6 @@ void Renderer::clearDepthfImplementationES(const GLfloat depth) {
glClearDepthf(depth); glClearDepthf(depth);
} }
#ifndef MAGNUM_TARGET_GLES3
Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationDefault() { Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationDefault() {
return GraphicsResetStatus::NoError; return GraphicsResetStatus::NoError;
} }
@ -234,7 +225,6 @@ Renderer::GraphicsResetStatus Renderer::graphicsResetStatusImplementationRobustn
CORRADE_INTERNAL_ASSERT(false); CORRADE_INTERNAL_ASSERT(false);
#endif #endif
} }
#endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Renderer::Error value) { Debug operator<<(Debug debug, const Renderer::Error value) {
@ -246,17 +236,14 @@ Debug operator<<(Debug debug, const Renderer::Error value) {
_c(InvalidOperation) _c(InvalidOperation)
_c(InvalidFramebufferOperation) _c(InvalidFramebufferOperation)
_c(OutOfMemory) _c(OutOfMemory)
#ifndef MAGNUM_TARGET_GLES3
_c(StackUnderflow) _c(StackUnderflow)
_c(StackOverflow) _c(StackOverflow)
#endif
#undef _c #undef _c
} }
return debug << "Renderer::Error::(invalid)"; return debug << "Renderer::Error::(invalid)";
} }
#ifndef MAGNUM_TARGET_GLES3
Debug operator<<(Debug debug, const Renderer::ResetNotificationStrategy value) { Debug operator<<(Debug debug, const Renderer::ResetNotificationStrategy value) {
switch(value) { switch(value) {
#define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "Renderer::ResetNotificationStrategy::" #value; #define _c(value) case Renderer::ResetNotificationStrategy::value: return debug << "Renderer::ResetNotificationStrategy::" #value;
@ -281,6 +268,5 @@ Debug operator<<(Debug debug, const Renderer::GraphicsResetStatus value) {
return debug << "Renderer::ResetNotificationStrategy::(invalid)"; return debug << "Renderer::ResetNotificationStrategy::(invalid)";
} }
#endif #endif
#endif
} }

12
src/Renderer.h

@ -895,13 +895,12 @@ class MAGNUM_EXPORT Renderer {
/** There is not enough memory left to execute the command. */ /** There is not enough memory left to execute the command. */
OutOfMemory = GL_OUT_OF_MEMORY, OutOfMemory = GL_OUT_OF_MEMORY,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Given operation would cause an internal stack to underflow. * Given operation would cause an internal stack to underflow.
* @requires_gl43 %Extension @extension{KHR,debug} * @requires_gl43 %Extension @extension{KHR,debug}
* @requires_es_extension %Extension @es_extension2{KHR,debug,debug} * @requires_es_extension %Extension @es_extension2{KHR,debug,debug}
*/ */
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
StackUnderflow = GL_STACK_UNDERFLOW, StackUnderflow = GL_STACK_UNDERFLOW,
#else #else
StackUnderflow = GL_STACK_UNDERFLOW_KHR, StackUnderflow = GL_STACK_UNDERFLOW_KHR,
@ -912,12 +911,11 @@ class MAGNUM_EXPORT Renderer {
* @requires_gl43 %Extension @extension{KHR,debug} * @requires_gl43 %Extension @extension{KHR,debug}
* @requires_es_extension %Extension @es_extension2{KHR,debug,debug} * @requires_es_extension %Extension @es_extension2{KHR,debug,debug}
*/ */
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
StackOverflow = GL_STACK_OVERFLOW StackOverflow = GL_STACK_OVERFLOW
#else #else
StackOverflow = GL_STACK_OVERFLOW_KHR StackOverflow = GL_STACK_OVERFLOW_KHR
#endif #endif
#endif
}; };
/** /**
@ -930,7 +928,6 @@ class MAGNUM_EXPORT Renderer {
*/ */
static Error error() { return static_cast<Error>(glGetError()); } static Error error() { return static_cast<Error>(glGetError()); }
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Graphics reset notification strategy * @brief Graphics reset notification strategy
* *
@ -1016,7 +1013,6 @@ class MAGNUM_EXPORT Renderer {
static GraphicsResetStatus graphicsResetStatus() { static GraphicsResetStatus graphicsResetStatus() {
return graphicsResetStatusImplementation(); return graphicsResetStatusImplementation();
} }
#endif
/*@}*/ /*@}*/
@ -1030,24 +1026,20 @@ class MAGNUM_EXPORT Renderer {
static void MAGNUM_LOCAL clearDepthfImplementationES(GLfloat depth); static void MAGNUM_LOCAL clearDepthfImplementationES(GLfloat depth);
static ClearDepthfImplementation clearDepthfImplementation; static ClearDepthfImplementation clearDepthfImplementation;
#ifndef MAGNUM_TARGET_GLES3
typedef GraphicsResetStatus(*GraphicsResetStatusImplementation)(); typedef GraphicsResetStatus(*GraphicsResetStatusImplementation)();
static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationDefault(); static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationDefault();
static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationRobustness(); static GraphicsResetStatus MAGNUM_LOCAL graphicsResetStatusImplementationRobustness();
static GraphicsResetStatusImplementation graphicsResetStatusImplementation; static GraphicsResetStatusImplementation graphicsResetStatusImplementation;
#endif
}; };
/** @debugoperator{Renderer} */ /** @debugoperator{Renderer} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::Error value); Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::Error value);
#ifndef MAGNUM_TARGET_GLES3
/** @debugoperator{Renderer} */ /** @debugoperator{Renderer} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::ResetNotificationStrategy value); Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::ResetNotificationStrategy value);
/** @debugoperator{Renderer} */ /** @debugoperator{Renderer} */
Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::GraphicsResetStatus value); Debug MAGNUM_EXPORT operator<<(Debug debug, Renderer::GraphicsResetStatus value);
#endif
} }

4
src/Sampler.cpp

@ -45,7 +45,6 @@ static_assert((filter_or(Nearest, Base) == GL_NEAREST) &&
"Unsupported constants for GL texture filtering"); "Unsupported constants for GL texture filtering");
#undef filter_or #undef filter_or
#ifndef MAGNUM_TARGET_GLES3
Float Sampler::maxAnisotropy() { Float Sampler::maxAnisotropy() {
GLfloat& value = Context::current()->state().texture->maxAnisotropy; GLfloat& value = Context::current()->state().texture->maxAnisotropy;
@ -58,7 +57,6 @@ Float Sampler::maxAnisotropy() {
return value; return value;
} }
#endif
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
Debug operator<<(Debug debug, const Sampler::Filter value) { Debug operator<<(Debug debug, const Sampler::Filter value) {
@ -90,9 +88,7 @@ Debug operator<<(Debug debug, const Sampler::Wrapping value) {
_c(Repeat) _c(Repeat)
_c(MirroredRepeat) _c(MirroredRepeat)
_c(ClampToEdge) _c(ClampToEdge)
#ifndef MAGNUM_TARGET_GLES3
_c(ClampToBorder) _c(ClampToBorder)
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
_c(MirrorClampToEdge) _c(MirrorClampToEdge)
#endif #endif

4
src/Sampler.h

@ -107,7 +107,6 @@ class MAGNUM_EXPORT Sampler {
*/ */
ClampToEdge = GL_CLAMP_TO_EDGE, ClampToEdge = GL_CLAMP_TO_EDGE,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Clamp to border color. Coordinates out of range will be clamped * Clamp to border color. Coordinates out of range will be clamped
* to border color (set with setBorderColor()). * to border color (set with setBorderColor()).
@ -118,7 +117,6 @@ class MAGNUM_EXPORT Sampler {
#else #else
ClampToBorder = GL_CLAMP_TO_BORDER_NV, ClampToBorder = GL_CLAMP_TO_BORDER_NV,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
@ -134,7 +132,6 @@ class MAGNUM_EXPORT Sampler {
#endif #endif
}; };
#ifndef MAGNUM_TARGET_GLES3
/** /**
* @brief Max supported anisotropy * @brief Max supported anisotropy
* *
@ -154,7 +151,6 @@ class MAGNUM_EXPORT Sampler {
*/ */
static Float maxSupportedAnisotropy() { return maxAnisotropy(); } static Float maxSupportedAnisotropy() { return maxAnisotropy(); }
#endif #endif
#endif
}; };
/** @debugoperator{Magnum::Sampler} */ /** @debugoperator{Magnum::Sampler} */

2
src/Test/BufferGLTest.cpp

@ -143,7 +143,6 @@ void BufferGLTest::data() {
#endif #endif
} }
#ifndef MAGNUM_TARGET_GLES3
void BufferGLTest::map() { void BufferGLTest::map() {
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
if(!Context::current()->isExtensionSupported<Extensions::GL::OES::mapbuffer>()) if(!Context::current()->isExtensionSupported<Extensions::GL::OES::mapbuffer>())
@ -177,7 +176,6 @@ void BufferGLTest::map() {
CORRADE_COMPARE(changedContents[3], 107); CORRADE_COMPARE(changedContents[3], 107);
#endif #endif
} }
#endif
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
void BufferGLTest::mapSub() { void BufferGLTest::mapSub() {

4
src/Test/RendererTest.cpp

@ -34,10 +34,8 @@ class RendererTest: public TestSuite::Tester {
explicit RendererTest(); explicit RendererTest();
void debugError(); void debugError();
#ifndef MAGNUM_TARGET_GLES3
void debugResetNotificationStrategy(); void debugResetNotificationStrategy();
void debugGraphicsResetStatus(); void debugGraphicsResetStatus();
#endif
}; };
RendererTest::RendererTest() { RendererTest::RendererTest() {
@ -51,7 +49,6 @@ void RendererTest::debugError() {
CORRADE_COMPARE(out.str(), "Renderer::Error::InvalidOperation\n"); CORRADE_COMPARE(out.str(), "Renderer::Error::InvalidOperation\n");
} }
#ifndef MAGNUM_TARGET_GLES3
void RendererTest::debugResetNotificationStrategy() { void RendererTest::debugResetNotificationStrategy() {
std::ostringstream out; std::ostringstream out;
@ -65,7 +62,6 @@ void RendererTest::debugGraphicsResetStatus() {
Debug(&out) << Renderer::GraphicsResetStatus::GuiltyContextReset; Debug(&out) << Renderer::GraphicsResetStatus::GuiltyContextReset;
CORRADE_COMPARE(out.str(), "Renderer::GraphicsResetStatus::GuiltyContextReset\n"); CORRADE_COMPARE(out.str(), "Renderer::GraphicsResetStatus::GuiltyContextReset\n");
} }
#endif
}} }}

2
src/Texture.h

@ -428,7 +428,6 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
AbstractTexture::setMagnificationFilter(filter); AbstractTexture::setMagnificationFilter(filter);
return *this; return *this;
} }
#ifndef MAGNUM_TARGET_GLES3
Texture<Dimensions>& setBorderColor(const Color4& color) { Texture<Dimensions>& setBorderColor(const Color4& color) {
AbstractTexture::setBorderColor(color); AbstractTexture::setBorderColor(color);
return *this; return *this;
@ -437,7 +436,6 @@ template<UnsignedInt dimensions> class Texture: public AbstractTexture {
AbstractTexture::setMaxAnisotropy(anisotropy); AbstractTexture::setMaxAnisotropy(anisotropy);
return *this; return *this;
} }
#endif
Texture<Dimensions>& generateMipmap() { Texture<Dimensions>& generateMipmap() {
AbstractTexture::generateMipmap(); AbstractTexture::generateMipmap();
return *this; return *this;

18
src/TextureFormat.h

@ -521,7 +521,6 @@ enum class TextureFormat: GLenum {
*/ */
RGB565 = GL_RGB565, RGB565 = GL_RGB565,
#ifndef MAGNUM_TARGET_GLES3
/** /**
* RGB, each component normalized unsigned 10bit. * RGB, each component normalized unsigned 10bit.
* @requires_es_extension %Extension @es_extension{OES,required_internalformat} * @requires_es_extension %Extension @es_extension{OES,required_internalformat}
@ -532,7 +531,6 @@ enum class TextureFormat: GLenum {
#else #else
RGB10 = GL_RGB10_EXT, RGB10 = GL_RGB10_EXT,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**
@ -560,22 +558,18 @@ enum class TextureFormat: GLenum {
RGB9E5 = GL_RGB9_E5, RGB9E5 = GL_RGB9_E5,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* sRGB, normalized unsigned, size implementation-dependent. * sRGB, normalized unsigned, size implementation-dependent.
* @todo is this allowed in core? * @todo is this allowed in core?
* @deprecated_gl Prefer to use the exactly specified version of this * @deprecated_gl Prefer to use the exactly specified version of this
* format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8". * format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8".
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES * @requires_es_extension %Extension @es_extension{EXT,sRGB}
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8" in
* OpenGL ES 3.0 instead.
*/ */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
SRGB = GL_SRGB, SRGB = GL_SRGB,
#else #else
SRGB = GL_SRGB_EXT, SRGB = GL_SRGB_EXT,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -635,22 +629,18 @@ enum class TextureFormat: GLenum {
RGBA12 = GL_RGBA12, RGBA12 = GL_RGBA12,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* sRGBA, normalized unsigned, size implementation-dependent. * sRGBA, normalized unsigned, size implementation-dependent.
* @todo is this allowed in core? * @todo is this allowed in core?
* @deprecated_gl Prefer to use the exactly specified version of this * @deprecated_gl Prefer to use the exactly specified version of this
* format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8". * format, i.e. @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8".
* @requires_es_extension %Extension @es_extension{EXT,sRGB} in OpenGL ES * @requires_es_extension %Extension @es_extension{EXT,sRGB}
* 2.0, use @ref Magnum::TextureFormat "TextureFormat::SRGB8Alpha8" in
* OpenGL ES 3.0 instead.
*/ */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
SRGBAlpha = GL_SRGB_ALPHA, SRGBAlpha = GL_SRGB_ALPHA,
#else #else
SRGBAlpha = GL_SRGB_ALPHA_EXT, SRGBAlpha = GL_SRGB_ALPHA_EXT,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**
@ -777,19 +767,17 @@ enum class TextureFormat: GLenum {
DepthComponent24 = GL_DEPTH_COMPONENT24_OES, DepthComponent24 = GL_DEPTH_COMPONENT24_OES,
#endif #endif
#ifndef MAGNUM_TARGET_GLES3
/** /**
* Depth component, 32bit. * Depth component, 32bit.
* @requires_es_extension %Extension (@es_extension{OES,required_internalformat}, * @requires_es_extension %Extension (@es_extension{OES,required_internalformat},
* @es_extension{OES,depth_texture} and @es_extension{OES,depth32}) or * @es_extension{OES,depth_texture} and @es_extension{OES,depth32}) or
* (@es_extension{EXT,texture_storage} and @es_extension{ANGLE,depth_texture}) * (@es_extension{EXT,texture_storage} and @es_extension{ANGLE,depth_texture})
*/ */
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES
DepthComponent32 = GL_DEPTH_COMPONENT32, DepthComponent32 = GL_DEPTH_COMPONENT32,
#else #else
DepthComponent32 = GL_DEPTH_COMPONENT32_OES, DepthComponent32 = GL_DEPTH_COMPONENT32_OES,
#endif #endif
#endif
#ifndef MAGNUM_TARGET_GLES2 #ifndef MAGNUM_TARGET_GLES2
/** /**

Loading…
Cancel
Save