Browse Source

GL: these entrypoints are never used on WebGL 1, compile them out.

pull/674/head
Vladimír Vondruš 1 year ago
parent
commit
4c3a2199a1
  1. 9
      src/Magnum/GL/AbstractFramebuffer.cpp
  2. 2
      src/Magnum/GL/AbstractFramebuffer.h

9
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<void>(self);
static_cast<void>(count);
static_cast<void>(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&) {}

2
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&);

Loading…
Cancel
Save