Version 0.21.0 (May 12, 2024)
This release involved rewriting a good portion of basalt, around 60%! There has been many bugs fixed and probably a few introduced. Basalt is now approaching the point where widgets are likely to be the next big feature release. There, however, may be some more refactoring regarding input handling to make a better distinction between key location and key name.
General Changes
- BREAKING:
vulkano&vulkano-shadersupgraded to0.34 - BREAKING:
ilmenitehas been removed. - BREAKING: Imports have been rearraged to allow everything to be accessed at a single module level.
- Ex:
use basalt::interface::bin::style::BinStyle;is nowuse basalt::interface::BinStyle;.
- Ex:
- BREAKING:
miscmodule has been removed. - BREAKING:
image_viewmodule as its structBstImageViewhas been removed.- These were used by these
Atlasfor tracking image usage. In vulkano 0.34 this functionality is no longer able to be implemented. It wasn't ever correct to begin with.
- These were used by these
- BREAKING: Removed feature
built_in_font- System fonts will be used as a fallback/default instead.
winitupgraded to0.29- Added default feature
image_decodewhich allows decoding of images using theimagecrate. - Added default feature
image_downloadwhich allows downloading of images using thecurlcrate.
Changes to Basalt
- BREAKING:
initializenow takesFnMutdirectly instead ofBox'd. - BREAKING: Removed
atlas,atlas_refmethods.- The atlas has been replaced by
ImageCache. - Added methods
image_cacheandimage_cache_ref.
- The atlas has been replaced by
- BREAKING: Removed
current_extent,surface,surface_ref,window, &window_refmethods.- Now that basalt is multi-window these methods have been moved to the window/window_manager.
- Added methods
window_manager&window_mangager_ref.
- BREAKING: Removed
wait_for_exitforce_recreate_swapchain,formats_in_use,fps, &poll_eventsmethods.Renderer's will exit upon a close request.Renderer's fully control their swapchain, removing the need for external event handling.Renderer's have a configurable advance metrics which can provide stats such as fps.
- BREAKING:
BstFormatsInUse,BstEvent, &BstWinEvremoved. - BREAKING:
basalt_required_vk_featuresis now removed as it is handled internally.
Changes to BasaltOptions
- BREAKING: Renamed
BstOptionstoBasaltOptions. - BREAKING: Removed
app_loop,bin_parallel_threads,composite_alphaconservative_draw,ignore_dpi,msaascale,title,use_exclusive_fullscreen, &window_sizemethods.- With the new window system and renderer these methods have been removed.
- Some of these options can be specified at window creation or methods on the window.
- Added
render_default_consv_draw,render_default_msaa,render_default_vsync,render_default_worker_threads,window_default_scale, &window_ignore_dpimethods.
- BREAKING:
force_unix_backend_x11renamed towinit_force_x11. - BREAKING: Removed
imt_fill_quality,imt_gpu_accelerated, &imt_sample_qualitymethods.ilmeniteis no longer used so these methods are obsolete.
- BREAKING: Removed
device_ext_union,instance_ext_union,with_featuresmethods.- Added methods
prefer_device_extensions,prefer_device_features,prefer_instance_extensions,require_device_features,require_device_extensions, &require_instance_extensions. - The new methods allow features/extensions to be more configurable.
- Added methods
- BREAKING: Portability subset devices now must be allowed via the
allow_portability_subsetmethod. - Added method
add_binary_fontfor loading fonts during initialization.
Changes to Interface
- BREAKING: Methods
default_font&set_default_fontnow use theDefaultFontstruct. - BREAKING: Removed
has_fontmethod. - BREAKING: Removed
current_effective_scale,current_msaa,current_scale,decrease_msaa,increase_msaa,set_effective_scale,set_msaa, &set_scalemethods.- Now with multi-window support similar methods now exist on
Window.
- Now with multi-window support similar methods now exist on
- BREAKING:
add_fonthas been replaced byadd_binary_font. - BREAKING:
drawmethod has been removed asRenderernow does the drawing.
Changes to BinStyle
- BREAKING: Added field
child_float_mode& enumChildFloatModefor configuring float style. - BREAKING:
back_imagefield now takes anImageCacheKeyinstead of a path. - BREAKING:
back_image_url,back_image_atlas, &back_image_cachefields removed. - BREAKING:
back_image_raw&back_image_raw_coordshave been replaced byback_image_vk&back_image_coords. - BREAKING:
text_wrapfield now takesTextWrapinstead ofImtTextWrap. - BREAKING:
text_vert_alignfield now takesTextVertAligninstead ofImtVertAlign. - BREAKING:
text_hori_alignfield now takesTextHoriAligninstead ofImtHoriAlign. - BREAKING: Added fields
font_weight,font_stretch, &font_stylefor further selection of fonts. - Added support for borders with border radius.
Changes to Color
- BREAKING:
srgb_hexhas been renamed toshex. - BREAKING:
from_hexhas been renamed tohex. - BREAKING:
clamp,to_linear, &to_nonlinearmethods removed. - BREAKING:
as_arrayhas been renamed torgbaf_array. - Added many more constructor methods.
- Includes standard/linear u8/u16/f32 color formats.
- Added support for constructing from an hsl/hsla color.
- Added many more conversion methods converting to an array of various types.
- Added methods for construction of standard svg colors.
Changes to Bin
- BREAKING: Removed
add_button_fade_events. - BREAKING: Replaced
force_update,update_children, &force_recursive_updatewithtrigger_update,trigger_children_update, &trigger_recursive_update.- The methods have been rework internally and have been renamed to be match what they do.
- It should be noted however that having to use these methods generally means there is a bug in basalt.
- BREAKING:
hidden&visiblemethods have been replaced withset_hidden&is_hidden. - BREAKING:
keep_alivemethod no longer requires objects withKeepAlivetrait. - BREAKING: Removed
update_statsmethod.- Stats are now done within the
Rendererand can be configured by theWindow.
- Stats are now done within the
- Added
associate_window,associate_window_recursive, &windowmethods.- Now that
Bin's must be associated with a window these methods provide the means to do that. It is still preferred however to createBinvia theWindow.
- Now that
- Added method
children_recursive_with_self. - Added method
style_inspectwhich allows inspecting a style without cloning anArc. - Various bug fixes regarding placement, overflow, and update triggering.
Changes to BinPostUpdate
- BREAKING: Renamed
PostUpdatetoBinPostUpdate. - BREAKING: Added fields
visible&floating. - BREAKInG:
unbound_mm_y&unbound_mm_xfields have been replaced byoptimal_inner_bounds,optimal_outer_bounds,content_bounds, &optimal_content_boundsas part of the rework in overflow calculations.
Changes to Images
- BREAKING:
Atlashas been replaced byImageCache. ImageCachehas similar methods for loading images.- Images are now referenced by their
ImageCacheKeyinstead ofAtlasCoords.
Changes to Windows
- BREAKING: basalt no longer automatically creates a window upon initialization.
- BREAKING:
BasaltWindowtrait has been removed. - Added
WindowManagerwhich is responsible for creatingWindow's and handling their events.
Changes to Rendering
- BREAKING: Drawing is no longer done with the
Interface::drawmethod. - Added
Rendererwhich handles all the rendering of aWindow.