Skip to content

v0.13.0-image-hot-reload

Latest
Compare
Choose a tag to compare
@tgfrerer tgfrerer released this 02 Feb 10:43
· 200 commits to wip since this release
25a85e4

New

This release adds a few quality-of-life improvements to dealing with images. The le_resource_manager has been rewritten so that it becomes very easy to hot-reload any images. If an image is added via the resource manager and tagged as watched, any changes to the original image will trigger a resource reload. This even works if the updated image has different file size, format, or dimensions.

le_pixels has been rewritten from the ground up - image decoders now must implement a generic interface, which means that the resource manager can interact with them in an abstract way (shout-out to Barbara Liskov) - and you can implement & register new image decoders with the resource manager at run-time and get all the benefits of resource hot-reloading for any new image format for free.

When you register an image decoder with a resource manager, you give a file extension for which to use this decoder. You can register new decoders for new filetypes, or override the defaults at runtime. The resource manager by defaults loads decoders from le_pixels for .jpg, jpeg, .png, ...

To make image loading more efficient, the renderer is now able to directly map GPU memory - this means that image decoders may read their pixels directly into GPU memory - and the new version of le_resource_manager certainly does.

What's Changed

  • b19d116 [image_decoder] add an abstract interface for image decoders, which anyone may implement
  • 243ddde [core] core only zeroes out an api on initial load, which allows you to persist pointers throughout api reload if you choose - this can be useful to hold persistent references to singleton objects for example
  • 5a6b3e1 [image decoder] update stb_image to latest version
  • d7b6d3a [renderer] implement mapping image and buffer memory directly to GPU memory
  • 90fe8ec [resource_manager] use direct memory mapping when uploading resources
  • b82da59 [cmake] output build artifacts into ./bin --- this should keep things a bit cleaner
  • 53c403e [le_resource_manager] make image import format aware - attempt to find a matching vkFormat based on image data (e.g. eR8Unorm for a grayscale image)
  • e10cb7a [beauty] add constant width grid shaders
  • ee28fca [le_imgui] make le_imgui self-contained by using pre-compiled shaders, and by embedding default font (you don't have to add any resources anymore when using le_imgui)

Fixes

  • 79cf03d [le_renderer] fix issue where re-using renderpasses would generate wrong debug .dot graphs
  • 2102510 [le_tweaks] fixes to le_tweaks - making tweaks more robust after hot-reloading
  • 12ef73a [cmake] warn if the imgui submodule is missing

Full Changelog: v0.12.0-vk-video-decode...v0.13.0-image-hot-reload