v0.8.0
Breaking Changes
-
Frame::render_into
no longer takes aGraphics
parameter, but instead
accepts thewgpu::Queue
andwgpu::Device
parameters directly. Using
Graphics
causes lifetime issues in some rendering workflows. -
The
render
module has been renamed todrawing
to match the type it
contains. The old name was a remnant from whenDrawing
used to be named
Rendering
, which was incredibly confusing withRenderer
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 inneru32
as public.
Added
WindowBeahvior::pan_gesture
is a new event provided bywinit
.Kludgine::id()
returns the instance's unique id.Kludgine::REQUIRED_FEATURES
specifies the `wgpu::Features`` that Kludgine uses.Kludgine::adjust_limits()
adjustswgpu::Limits
to ensure Kludgine will
function.Texture::multisampled
allows creating aTexture
that can be used as a
multisample render attachment.Texture::copy[_rect]_to_buffer
are convenience helpers for copying image
data to awgpu::Buffer
.Texture::wgpu()
returns a handle to the underlyingwgpu::Texture
.Texture::view()
returns awgpu::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 aplotters::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.