From 4c3a2199a1f35a7b178b3197461fa02f53b7fc62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 11 Apr 2025 21:23:12 +0200 Subject: [PATCH] GL: these entrypoints are never used on WebGL 1, compile them out. --- src/Magnum/GL/AbstractFramebuffer.cpp | 9 +++------ src/Magnum/GL/AbstractFramebuffer.h | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) 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&);