Browse Source

DebugTools: fix textureSubImage() for float textures on ES3.

By accident the returned image had zero size.
pull/324/head
Vladimír Vondruš 7 years ago
parent
commit
28d89611f3
  1. 2
      doc/changelog.dox
  2. 2
      src/Magnum/DebugTools/TextureImage.cpp

2
doc/changelog.dox

@ -137,6 +137,8 @@ See also:
@gl_extension{EXT,instanced_arrays}, @gl_extension{EXT,draw_instanced}, @gl_extension{EXT,instanced_arrays}, @gl_extension{EXT,draw_instanced},
@gl_extension{NV,instanced_arrays} and @gl_extension{NV,draw_instanced} @gl_extension{NV,instanced_arrays} and @gl_extension{NV,draw_instanced}
extensions extensions
- Reading of float textures on ES3 contexts using
@ref DebugTools::textureSubImage() returned a zero-sized image by accident
- Updated the `base-qt` bootstrap project to correctly reset state tracker - Updated the `base-qt` bootstrap project to correctly reset state tracker
when going from and back to Qt code, and to use the framebuffer provided by when going from and back to Qt code, and to use the framebuffer provided by
Qt instead of @ref GL::defaultFramebuffer (see Qt instead of @ref GL::defaultFramebuffer (see

2
src/Magnum/DebugTools/TextureImage.cpp

@ -152,7 +152,7 @@ void textureSubImage(GL::Texture2D& texture, const Int level, const Range2Di& ra
const Vector2i imageSize = image.size(); const Vector2i imageSize = image.size();
Image2D temp{image.storage(), reinterpretFormat, GL::PixelType::UnsignedInt, imageSize, image.release()}; Image2D temp{image.storage(), reinterpretFormat, GL::PixelType::UnsignedInt, imageSize, image.release()};
fb.read(range, temp); fb.read(range, temp);
image = Image2D{image.storage(), image.format(), image.formatExtra(), image.pixelSize(), imageSize, temp.release()}; image = Image2D{image.storage(), image.format(), image.formatExtra(), image.pixelSize(), range.size(), temp.release()};
return; return;
} }
#endif #endif

Loading…
Cancel
Save