|
|
|
@ -105,9 +105,13 @@ void AbstractFramebuffer::bind() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void AbstractFramebuffer::bindInternal(FramebufferTarget target) { |
|
|
|
void AbstractFramebuffer::bindInternal(FramebufferTarget target) { |
|
|
|
#if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
#if defined(MAGNUM_TARGET_GLES2) |
|
|
|
|
|
|
|
#if !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
(this->*Context::current().state().framebuffer->bindImplementation)(target); |
|
|
|
(this->*Context::current().state().framebuffer->bindImplementation)(target); |
|
|
|
#else |
|
|
|
#else |
|
|
|
|
|
|
|
bindImplementationSingle(); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#else |
|
|
|
bindImplementationDefault(target); |
|
|
|
bindImplementationDefault(target); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
@ -122,7 +126,7 @@ void AbstractFramebuffer::bindImplementationSingle(FramebufferTarget) { |
|
|
|
|
|
|
|
|
|
|
|
/* Binding the framebuffer finally creates it */ |
|
|
|
/* Binding the framebuffer finally creates it */ |
|
|
|
_flags |= ObjectFlag::Created; |
|
|
|
_flags |= ObjectFlag::Created; |
|
|
|
glBindFramebuffer(GL_FRAMEBUFFER, _id); |
|
|
|
glBindFramebuffer(GLenum(FramebufferTarget::Draw), _id); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
@ -146,9 +150,13 @@ void AbstractFramebuffer::bindImplementationDefault(FramebufferTarget target) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FramebufferTarget AbstractFramebuffer::bindInternal() { |
|
|
|
FramebufferTarget AbstractFramebuffer::bindInternal() { |
|
|
|
#if defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
#if defined(MAGNUM_TARGET_GLES2) |
|
|
|
|
|
|
|
#if !defined(MAGNUM_TARGET_WEBGL) |
|
|
|
return (this->*Context::current().state().framebuffer->bindInternalImplementation)(); |
|
|
|
return (this->*Context::current().state().framebuffer->bindInternalImplementation)(); |
|
|
|
#else |
|
|
|
#else |
|
|
|
|
|
|
|
return bindImplementationSingle(); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#else |
|
|
|
return bindImplementationDefault(); |
|
|
|
return bindImplementationDefault(); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
} |
|
|
|
} |
|
|
|
@ -164,10 +172,10 @@ FramebufferTarget AbstractFramebuffer::bindImplementationSingle() { |
|
|
|
|
|
|
|
|
|
|
|
/* Binding the framebuffer finally creates it */ |
|
|
|
/* Binding the framebuffer finally creates it */ |
|
|
|
_flags |= ObjectFlag::Created; |
|
|
|
_flags |= ObjectFlag::Created; |
|
|
|
glBindFramebuffer(GL_FRAMEBUFFER, _id); |
|
|
|
glBindFramebuffer(GLenum(FramebufferTarget::Draw), _id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return FramebufferTarget{}; |
|
|
|
return FramebufferTarget::Draw; |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
@ -367,8 +375,8 @@ GLenum AbstractFramebuffer::checkStatusImplementationDefault(const FramebufferTa |
|
|
|
|
|
|
|
|
|
|
|
#ifdef MAGNUM_TARGET_GLES2 |
|
|
|
#ifdef MAGNUM_TARGET_GLES2 |
|
|
|
GLenum AbstractFramebuffer::checkStatusImplementationSingle(FramebufferTarget) { |
|
|
|
GLenum AbstractFramebuffer::checkStatusImplementationSingle(FramebufferTarget) { |
|
|
|
bindInternal(FramebufferTarget{}); |
|
|
|
bindInternal(FramebufferTarget::Draw); |
|
|
|
return glCheckFramebufferStatus(GL_FRAMEBUFFER); |
|
|
|
return glCheckFramebufferStatus(GLenum(FramebufferTarget::Draw)); |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|