Skip to content

v0.8.0

Compare
Choose a tag to compare
@ecton ecton released this 12 May 15:28
· 48 commits to main since this release
841e64d

Breaking Changes

  • Frame::render_into no longer takes a Graphics parameter, but instead
    accepts the wgpu::Queue and wgpu::Device parameters directly. Using
    Graphics causes lifetime issues in some rendering workflows.

  • The render module has been renamed to drawing to match the type it
    contains. The old name was a remnant from when Drawing used to be named
    Rendering, which was incredibly confusing with Renderer types around as
    well.

  • This crate now supports wgpu 0.20.0.

  • This crate now supports cosmic-text 0.11.2.

  • This crate now supports image 0.25.1.

  • These WindowBehavior functions have had a &Self::Context parameter added
    to them, ensuring each function where Kludgine is requesting information from
    the implementor either receives an &self or an &Self::Context:

    • WindowBehavior::power_preference()
    • WindowBehavior::limits()
    • WindowBehavior::multisample_count()
  • SpriteSheet::new() now takes an additional parameter: gutter_size. Passing
    Size::ZERO will cause the returned sprite sheet to be the same as before
    this change.

    This new parameter allows using sprite sheets that have been exported with
    consistent spacing between each sprite.

  • These APIs now require exclusive references to the application:

    • WindowBehavior::open
    • WindowBehavior::open_with
  • These events have been renamed to match winit's nomenclature:

    • WindowBehavior::touchpad_magnify -> WindowBehavior::pinch_gesture
    • WindowBehavior::smart_magnify -> WindowBehavior::double_tap_gesture

Changed

  • All &Appplication bounds now are ?Sized, enabling &dyn Application
    parameters.
  • Color now exposes its inner u32 as public.

Added

  • WindowBeahvior::pan_gesture is a new event provided by winit.
  • Kludgine::id() returns the instance's unique id.
  • Kludgine::REQUIRED_FEATURES specifies the `wgpu::Features`` that Kludgine uses.
  • Kludgine::adjust_limits() adjusts wgpu::Limits to ensure Kludgine will
    function.
  • Texture::multisampled allows creating a Texture that can be used as a
    multisample render attachment.
  • Texture::copy[_rect]_to_buffer are convenience helpers for copying image
    data to a wgpu::Buffer.
  • Texture::wgpu() returns a handle to the underlying wgpu::Texture.
  • Texture::view() returns a wgpu::TextureView for the entire texture.
  • A new feature plotters enables integration with the excellent
    plotters crate. Renderer::as_plot_area() is a new function that
    returns a plotters::DrawingArea.
  • Kludgine::rebuild_font_system() is a new function that recreates the
    cosmic_text::FontSystem, which has the net effect of clearing font-database
    related caches.
  • WindowBehavior::present_mode() allows a window to pick a different
    presentation mode. The default implementation returns
    wgpu::PresentMode::AutoVsync.

Fixed

  • Drawing::render() no longer makes any assumptions about the current clipping
    rectangle when drawing is started.
  • Color correction for Srgb is now being done more accurately using the
    palette crate. This affects colors being applied to textures as tints and
    shape drawing, but the Srgb handling of textures themselves remain handled
    purely by wgpu.
  • Drawing text with an empty first line no longer panics.