wgpu
crate version -> 23.0.0glyph_brush
crate version -> 0.7.11bytemuck
crate version -> 1.19.0
TextBrush::queue()
function can now take any item which implements IntoIterator trait (i.e. static arrays)wgpu
crate version -> 22.0.0 - by @VladasZ in #38glyph_brush
crate version -> 0.7.9bytemuck
crate version -> 1.16.1log
crate version -> 0.4.22
wgpu
crate version -> 0.20.0
wgpu
crate version -> 0.19.3log
crate version -> 0.4.21bytemuck
crate version -> 1.15.0
wgpu
crate version -> 0.19.0winit
crate version in examples -> 0.29.10BrushError
now derivesClone
,Copy
,PartialEq
andEq
wgpu
crate version -> v0.18.0- changed example code according to the
wgpu
updates
- small performance improvement by adding
min_binding_size
to the matrix BindGroup wgpu
crate version -> v0.17.1- other crates versions updates
-
wgpu
crate version -> v0.17.0 -
draw()
function no longer needsself
to be mutable - by @PPakalns in #18. -
removed redundant
mut
from functionsupdate_matrix()
andresize_view()
-
BrushError
is now public
- reexported
glyph_brush
as a whole
Added a new function with_multisample()
in BrushBuilder
which specifies the wgpu::MultisampleState
for the inner pipeline - by @AndriBaal in #12.
Added a new function with_multiview()
in BrushBuilder
which specifies the multiview
attribute used by the inner pipeline.
- changed some inner (private) variable names
Removed ScissorRegion
since there are hardly any valuable cases for its use, and there are better alternatives like setting the bounds
parameter of Section
.
Amplified the draw functions according to the wgpu repository wiki. Now they need fewer arguments and have better performances since they use the borrowed render_pass
instead of creating a new one.
After amplifying the draw functions, there is no need for the set_load_op()
function.
Removed depth functions (resize_depth_view
, with_depth
) since now you have to add your depth stencil and texture to the render pass that is being borrowed to the draw functions. The only new function left is with_depth_stencil()
in the BrushBuilder
, with which you can add a depth stencil to the inner pipeline.
Removed old queue()
and process_queued()
functions. Added a new queue()
function, representing both removed functions in one. It now takes a list of Section
s. If depth is being utilized, you should pay attention to how you order Section
s (order: furthest to closest). Each will be drawn in the order they are given.
- renamed example
custom_surface
tocustom_output
- slight modifications to some examples
- removed example
scissoring.rs
- renamed the shader to
shader.wgsl
Calling any of the depth functions while depth is disabled will panic!
and crash the program. This will make sure you are using the depth function correctly.
-
Removed
draw()
,draw_custom()
and inner functiondraw_queued()
from theTextBrush
struct. -
Removed
with_depth_testing()
from theBrushBuilder
. -
Renamed
resize_depth()
toresize_depth_view()
from theTextBrush
struct.
-
Added
draw()
function toTextBrush
- draws all queued text. -
Added
draw_with_depth()
function toTextBrush
- draws all queued text with depth testing. This function willpanic!
and crash the program if depth isn't enabled. -
Added
with_depth()
function toBrushBuilder
- enables depth testing if called while creating theBrushBuilder
-
Added
set_region()
function toTextBrush
- sets a scissor region which filters out each glyph fragment that crosses the given bounds. -
Added
process_queued()
function toTextBrush
- processes all queued sections and updates the inner vertex buffer. Returns an Error if cache texture is too big. Required if you want to draw anything.
Added a single error type BrushError::TooBigCacheTexture(u32)
, which is used when glyphs are too big to fit the cache_texture
but the texture can't increase in size because of wgpu::Limits
.
Added a glyphs_iter()
function, which returns an iterator over glyphs in the provided section.
Added fonts()
function, which returns an array of all available fonts. You can then perform various glyph functions such as finding glyphs bounding box.
Added set_load_op()
function to TextBrush
to determine what operation to perform to the output attachment (texture view) at the start of a render pass.
Added a new build_custom()
function providing better support when drawing text to texture views different from the current_frame_texture
view. You can find an example using this feature in the examples folder called custom_surface.
-
Created a new file,
utils.rs
(non-example), in the examples folder for easier access to the wgpu tools. -
Added a new
custom_surface
example which shows how to render text onto textures, which are then drawn onto a quad detached from the UI.
- reduced the number of arguments for some functions.
- improved and added more docs.
- updated crates.
- fixed clippy warnings.
- reduced code density in
lib.rs
by distributing some tobrush.rs
- added additional
FontArc
implementation from ab_glyph