Skip to content

v0.7.0

Compare
Choose a tag to compare
@ecton ecton released this 28 Dec 03:02
· 82 commits to main since this release
a44e14d

Breaking Changes

  • UnwindSafe has been removed from the bounds of WindowBehavior::Context,
    and various types may or may no longer implmement UnwindSafe. The underlying
    requirement for this has been removed from appit.
  • Texture::lazy_from_data and Texture::lazy_from_image have been refactored
    into constructors of a new type:
    LazyTexture::from_data/LazyTexture::from_image.
  • include_texture! now returns a LazyTexture instead of a Texture.
  • SharedTexture::region() has been removed. TextureRegion::new() is the
    replacement API that allows creating a region for any ShareableTexture.
  • Sprite::load_aseprite_json now accepts impl Into<ShareableTexture> instead
    of &SharedTexture. In theory, no code will break from this change due to
    trait implementations.
  • SpriteSheet::texture is now a ShareableTexture.

Added

  • app::PendingApp is a type that allows opening one or more windows before
    running an application.

  • app::App is a handle to a running application.

  • app::Window::app() returns a handle to the application of the window.

  • WindowBehavior::open[_with]() are new functions that allow opening a window
    into a reference of an App or PendingApp.

  • CanRenderTo::can_render_to() is a new trait that checks if a resource can be
    rendered in a given Kludgine instance.

    This is implemented by all types in Kludgine that utilize textures.

  • LazyTexture is a new texture type that supports being shared across
    different windows/wgpu rendering contexts by loading its data on-demand.
    LazyTexture::upgrade() loads a SharedTexture that is compatible with the
    given graphics context.

  • ShareableTexture is a texture type that can resolve to a SharedTexture.
    Currently this is either a SharedTexture or a LazyTexture.

  • RunningWindow::close is allows closing a window.

Fixed

  • Internally, text drawing now uses weak references for the glyph handles to
    prevent wgpu resources from being freed if a MeasuredText was being held.
  • Each window now has its own wgpu::Instance instead of sharing a single
    instance between windows.
  • Each Window frame now waits until it's fully rendered before yielding back
    to the windqow loop.
  • When a Window has a 0 dimension, it will no longer try to redraw. This
    presented as a panic when a window was minimized.
  • Subpixel alignment of text rendering is no longer accounted for twice. Additionally,
    TextOrigin::Center rounds the offset calculated to the nearest whole pixel.
  • A workaround has been added that caused clipping on the OpenGL backend to only
    use the final scissor rect.