diff --git a/src/Magnum/AbstractFramebuffer.cpp b/src/Magnum/AbstractFramebuffer.cpp index 44032aef8..daa0cd845 100644 --- a/src/Magnum/AbstractFramebuffer.cpp +++ b/src/Magnum/AbstractFramebuffer.cpp @@ -105,10 +105,10 @@ void AbstractFramebuffer::bind() { } void AbstractFramebuffer::bindInternal(FramebufferTarget target) { - #ifndef MAGNUM_TARGET_GLES2 - bindImplementationDefault(target); - #else + #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) (this->*Context::current()->state().framebuffer->bindImplementation)(target); + #else + bindImplementationDefault(target); #endif } @@ -146,10 +146,10 @@ void AbstractFramebuffer::bindImplementationDefault(FramebufferTarget target) { } FramebufferTarget AbstractFramebuffer::bindInternal() { - #ifndef MAGNUM_TARGET_GLES2 - return bindImplementationDefault(); - #else + #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) return (this->*Context::current()->state().framebuffer->bindInternalImplementation)(); + #else + return bindImplementationDefault(); #endif } diff --git a/src/Magnum/Implementation/FramebufferState.h b/src/Magnum/Implementation/FramebufferState.h index a98341de6..fc78d0589 100644 --- a/src/Magnum/Implementation/FramebufferState.h +++ b/src/Magnum/Implementation/FramebufferState.h @@ -54,7 +54,7 @@ struct FramebufferState { #ifndef MAGNUM_TARGET_GLES2 void(AbstractFramebuffer::*invalidateSubImplementation)(GLsizei, const GLenum*, const Range2Di&); #endif - #ifdef MAGNUM_TARGET_GLES2 + #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) void(AbstractFramebuffer::*bindImplementation)(FramebufferTarget); FramebufferTarget(AbstractFramebuffer::*bindInternalImplementation)(); #endif