diff --git a/src/Magnum/GL/AbstractFramebuffer.cpp b/src/Magnum/GL/AbstractFramebuffer.cpp index ac5250a78..de1cb0d76 100644 --- a/src/Magnum/GL/AbstractFramebuffer.cpp +++ b/src/Magnum/GL/AbstractFramebuffer.cpp @@ -499,18 +499,14 @@ void AbstractFramebuffer::copySubImage(const Range2Di& rectangle, CubeMapTexture } #endif +#if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) void AbstractFramebuffer::invalidateImplementationNoOp(AbstractFramebuffer&, GLsizei, const GLenum* const) {} void AbstractFramebuffer::invalidateImplementationDefault(AbstractFramebuffer& self, const GLsizei count, const GLenum* const attachments) { #ifndef MAGNUM_TARGET_GLES2 glInvalidateFramebuffer(GLenum(self.bindInternal()), count, attachments); - #elif !defined(CORRADE_TARGET_EMSCRIPTEN) - glDiscardFramebufferEXT(GLenum(self.bindInternal()), count, attachments); #else - static_cast(self); - static_cast(count); - static_cast(attachments); - CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ + glDiscardFramebufferEXT(GLenum(self.bindInternal()), count, attachments); #endif } @@ -519,6 +515,7 @@ void AbstractFramebuffer::invalidateImplementationDSA(AbstractFramebuffer& self, glInvalidateNamedFramebufferData(self._id, count, attachments); } #endif +#endif #ifndef MAGNUM_TARGET_GLES2 void AbstractFramebuffer::invalidateImplementationNoOp(AbstractFramebuffer&, GLsizei, const GLenum*, const Range2Di&) {} diff --git a/src/Magnum/GL/AbstractFramebuffer.h b/src/Magnum/GL/AbstractFramebuffer.h index a8443baa1..be024b57c 100644 --- a/src/Magnum/GL/AbstractFramebuffer.h +++ b/src/Magnum/GL/AbstractFramebuffer.h @@ -891,11 +891,13 @@ class MAGNUM_GL_EXPORT AbstractFramebuffer { static void MAGNUM_GL_LOCAL copySub3DImplementationDSA(const Range2Di& rectangle, AbstractTexture& texture, Int level, const Vector3i& offset); #endif + #if !(defined(MAGNUM_TARGET_WEBGL) && defined(MAGNUM_TARGET_GLES2)) static void MAGNUM_GL_LOCAL invalidateImplementationNoOp(AbstractFramebuffer& self, GLsizei, const GLenum*); static void MAGNUM_GL_LOCAL invalidateImplementationDefault(AbstractFramebuffer& self, GLsizei count, const GLenum* attachments); #ifndef MAGNUM_TARGET_GLES static void MAGNUM_GL_LOCAL invalidateImplementationDSA(AbstractFramebuffer& self, GLsizei count, const GLenum* attachments); #endif + #endif #ifndef MAGNUM_TARGET_GLES2 static void MAGNUM_GL_LOCAL invalidateImplementationNoOp(AbstractFramebuffer& self, GLsizei, const GLenum*, const Range2Di&);