Tetra v0.6.4 Release Notes

Release Date: 2021-05-14 // almost 3 years ago
  • โž• Added

    • Stencil buffers can now be used, both with the main framebuffer and with Canvas rendering. (@tesselode in #261)
      • Stencil buffers will only be created if they are requested via ContextBuilder::stencil_buffer or CanvasBuilder::stencil_buffer.
    • window::get_physical_size has been added, making it possible to find out the size of the window in unscaled, physical pixels.
    • window::get_dpi_scale has been added, allowing the window/monitor's pixel density to be queried. (@sumibi-yakitori in #249)
    • Texture and Canvas now have a get_data method, allowing their texture data to be copied from the GPU into an ImageData.
    • ImageData now has as_bytes and into_bytes method, which allows you to access the underlying buffer.

    ๐Ÿ”„ Changed

    • Canvases are now initialized to transparent black, rather than containing unspecified data on creation.
    • ๐Ÿ‘ Multisampled canvases will now automatically lower their level of multisampling (or disable it altogether) if the hardware does not support the requested number of samples.
      • This should allow games with multisampling to gracefully degrade on older/weaker GPUs.
    • ImageData::from_rgba has been replaced with ImageData::from_rgba8, and BmFontBuilder::with_page_rgba has been replaced with BmFontBuilder::with_page_rgba8.
      • This is for consistency with existing methods (e.g. on Color).
      • The old names have been deprecated, and will be removed in 0.7.
    • โšก๏ธ Updated glow to 0.9.

    ๐Ÿ›  Fixed

    • Texture::filter_mode and Canvas::filter_mode now return the correct initial value. Previously, they would always return FilterMode::Linear until set_filter_mode was called.
    • DPI scaling should now continue to work after calling graphics::reset_canvas.
    • graphics::set_scissor is now properly aware of DPI scaling.
    • When a texture, canvas or buffer fails to be created by the GPU (e.g. due to being out of memory or going over the max size), an error will now be returned, instead of unspecified behaviour occurring.

    ๐Ÿ—„ Deprecated

    • ImageData::from_rgba and BmFontBuilder::with_page_rgba has been deprecated in favour of more consistently named functions (see above).
    • ๐Ÿ— Canvas::multisampled has been deprecated in favour of Canvas::builder.