From d60fa66b27567621ba9b7929331cfa6411d13a41 Mon Sep 17 00:00:00 2001 From: Sam Spilsbury Date: Sun, 7 Feb 2016 03:34:44 +0000 Subject: [PATCH] AbstractFramebuffer: Always use bindImplementationSingle for WebGL WebGL doesn't support anything else. --- src/Magnum/AbstractFramebuffer.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/Magnum/AbstractFramebuffer.cpp b/src/Magnum/AbstractFramebuffer.cpp index c6e887f5c..47e61af6e 100644 --- a/src/Magnum/AbstractFramebuffer.cpp +++ b/src/Magnum/AbstractFramebuffer.cpp @@ -105,10 +105,12 @@ void AbstractFramebuffer::bind() { } void AbstractFramebuffer::bindInternal(FramebufferTarget target) { - #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) - (this->*Context::current().state().framebuffer->bindImplementation)(target); - #else + #ifndef MAGNUM_TARGET_GLES2 bindImplementationDefault(target); + #elif defined(MAGNUM_TARGET_WEBGL) + bindImplementationSingle(); + #else + (this->*Context::current().state().framebuffer->bindImplementation)(target); #endif } @@ -146,10 +148,12 @@ void AbstractFramebuffer::bindImplementationDefault(FramebufferTarget target) { } FramebufferTarget AbstractFramebuffer::bindInternal() { - #if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) - return (this->*Context::current().state().framebuffer->bindInternalImplementation)(); - #else + #ifndef MAGNUM_TARGET_GLES2 return bindImplementationDefault(); + #elif defined(MAGNUM_TARGET_WEBGL) + return bindImplementationSingle(); + #else + return (this->*Context::current().state().framebuffer->bindInternalImplementation)(); #endif }