Browse Source

Fix Framebuffer::checkStatus() on WebGL 1.

pull/205/head
Vladimír Vondruš 8 years ago
parent
commit
6b3a2fb975
  1. 2
      doc/changelog.dox
  2. 4
      src/Magnum/Implementation/FramebufferState.cpp

2
doc/changelog.dox

@ -82,6 +82,8 @@ See also:
strings. See the @cpp "emscripten-pthreads-broken-unicode-shader-sources" @ce strings. See the @cpp "emscripten-pthreads-broken-unicode-shader-sources" @ce
workaround description for details. workaround description for details.
- @ref Attribute::DataType::HalfFloat was not available on WebGL 2 by mistake - @ref Attribute::DataType::HalfFloat was not available on WebGL 2 by mistake
- A wrong code path for @ref Framebuffer::checkStatus() was selected on WebGL
1 by mistake
@subsection changelog-latest-deprecated Deprecated APIs @subsection changelog-latest-deprecated Deprecated APIs

4
src/Magnum/Implementation/FramebufferState.cpp

@ -185,10 +185,8 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL
bindImplementation = &Framebuffer::bindImplementationDefault; bindImplementation = &Framebuffer::bindImplementationDefault;
bindInternalImplementation = &Framebuffer::bindImplementationDefault; bindInternalImplementation = &Framebuffer::bindImplementationDefault;
#endif
checkStatusImplementation = &Framebuffer::checkStatusImplementationDefault; checkStatusImplementation = &Framebuffer::checkStatusImplementationDefault;
#ifndef MAGNUM_TARGET_WEBGL
if(context.isExtensionSupported<Extensions::GL::ANGLE::framebuffer_blit>()) { if(context.isExtensionSupported<Extensions::GL::ANGLE::framebuffer_blit>()) {
extensions.push_back(Extensions::GL::ANGLE::framebuffer_blit::string()); extensions.push_back(Extensions::GL::ANGLE::framebuffer_blit::string());
@ -211,6 +209,8 @@ FramebufferState::FramebufferState(Context& context, std::vector<std::string>& e
bindInternalImplementation = &Framebuffer::bindImplementationSingle; bindInternalImplementation = &Framebuffer::bindImplementationSingle;
checkStatusImplementation = &Framebuffer::checkStatusImplementationSingle; checkStatusImplementation = &Framebuffer::checkStatusImplementationSingle;
} }
#else
checkStatusImplementation = &Framebuffer::checkStatusImplementationSingle;
#endif #endif
#ifndef MAGNUM_TARGET_WEBGL #ifndef MAGNUM_TARGET_WEBGL

Loading…
Cancel
Save