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
orCanvasBuilder::stencil_buffer
.
- Stencil buffers will only be created if they are requested via
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
andCanvas
now have aget_data
method, allowing their texture data to be copied from the GPU into anImageData
.ImageData
now hasas_bytes
andinto_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 withImageData::from_rgba8
, andBmFontBuilder::with_page_rgba
has been replaced withBmFontBuilder::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.
- This is for consistency with existing methods (e.g. on
- โก๏ธ Updated
glow
to 0.9.
๐ Fixed
Texture::filter_mode
andCanvas::filter_mode
now return the correct initial value. Previously, they would always returnFilterMode::Linear
untilset_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
andBmFontBuilder::with_page_rgba
has been deprecated in favour of more consistently named functions (see above).- ๐
Canvas::multisampled
has been deprecated in favour ofCanvas::builder
.
- Stencil buffers can now be used, both with the main framebuffer and with