Skip to content

v1.0.0

Latest

Choose a tag to compare

@mtytel mtytel released this 02 Nov 19:17

This release has a lot of graphics performance improvements, recovery from GPU device loss, better SVG support and a lot of bug fixes on every platform.

There are breaking changes from 0.1.0, listed below.

Performance

  • Less GPU work when only part of a window changes on Vulkan and D3D11
  • No hitch the first time a shader is used
  • Frames are paced off the UI thread
  • Layers are cleared with hardware clears instead of drawing fills
  • Faster batching for frames that draw a lot of shapes
  • Redrawing a lot of frames at once is faster
  • Blurs no longer re-blur every frame
  • Animated colors and gradients no longer re-upload the gradient atlas every frame
  • Moving a layered frame no longer repacks its layer
  • Vertex data is uploaded once per frame

Changes

  • Apps recover when the GPU driver restarts or the WebGL context is lost
  • Graphics shut down when the last window closes, so no driver threads are left running
  • More accurate antialiasing on filled paths
  • Strokes, dashes and gradients draw correctly at every DPI and after Canvas::setPosition()
  • Backdrop effects work like CSS backdrop filters. Added a BackdropEffects example
  • Luminance masks, and masks are drawn in onDrawMask()
  • Better SVG support: masks, markers, nested svgs, CSS selectors and a lot of other fixes
  • A lot of fixes for input, DPI, clipboard, drag and drop and windows on every platform
  • IME, dead keys and the accent menu work on macOS
  • setWindowDimensionsFromHost() for host resizes in plugins
  • Wayland support on Linux with an X11 fallback
  • VISAGE_LIVE_SHADERS option for live shader editing in the app

Breaking changes

  • Build as C++20 with CMake 3.20. On Linux install libxcb-present-dev and libfontconfig1-dev
  • Color and setColor() no longer take a float
  • removeAllChildren() is removed. Call removeChild() on a copy of children()
  • CallbackList::remove(fn) and -= are removed. Keep the id from add() or use Frame::listen()
  • setPaletteOverride() no longer takes a recursive argument
  • setMasked() is removed. Draw the mask in onDrawMask()
  • BlendMode::Composite is removed. Use BlendMode::Alpha
  • Path::rotate() takes degrees and rotates the same direction as Transform::rotation()
  • Custom shaders need to output premultiplied color (vec4(rgb * a, a)) and use GLSL math on every backend
  • DDS, KTX, PVR and EXR images no longer load
  • On macOS pass window->graphicsHandle() to Canvas::pairToWindow() instead of nativeHandle()
  • Renderer::initialize() takes a third wayland_display argument
  • bgfx:: handles are now visage::gpu:: handles. The bgfx targets and BGFX_* options are removed
Behavior changes
  • close() sends a close request and returns. The window closes when the event loop handles it. close() and hide() work without an onCloseRequested handler
  • show() on a hidden window reuses the native window
  • Debug builds assert if an ApplicationWindow or ApplicationEditor is a global or static
  • Text edges are slightly lighter
  • Strokes are no longer scaled by DPI twice, so they're thinner at DPI scales above 1
  • Gradients follow Canvas::setPosition()
  • On macOS colors are color managed. Call Renderer::instance().setColorManaged(false) before opening a window to turn it off
  • SVG shapes default to the nonzero fill rule
  • Blur radius matches the visible blur, so the same value blurs a different amount
  • MouseCursor::Drag was added before Dragging, so cursor values after it changed
  • time::milliseconds() uses a steady clock. Use time::now() for wall-clock time
  • Number formatting and parsing ignore the C locale

Fixed issues

  • #110 frames freezing when they call redraw() during their own draw
  • #100 close() and hide() doing nothing without an onCloseRequested handler
  • #99 graphics never shutting down
  • #89 Canvas::stroke not compiling with a const Path
  • #45 Dragging is a closed hand and Drag is an open hand
  • #19 no prebuilt x86 shaderc, the shader compiler builds from source

Known issues

  • #25 no install rules yet. Use FetchContent or add_subdirectory
  • #16 can't set the position of an embedded window

Getting it

include(FetchContent)
FetchContent_Declare(visage
  GIT_REPOSITORY https://github.com/VitalAudio/visage.git
  GIT_TAG v1.0.0)
FetchContent_MakeAvailable(visage)

target_link_libraries(my_app PRIVATE visage)

Requirements

  • CMake 3.20 and C++20. Targets that link Visage build as C++20
  • Windows: Direct3D 11 with MSVC or MinGW
  • macOS 10.15: Metal
  • Linux: Vulkan and X11, and Wayland when available. Needs libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxcomposite-dev libxcb1-dev libxcb-present-dev libfontconfig1-dev, and libwayland-dev libxkbcommon-dev wayland-protocols for Wayland
  • Web: Emscripten with WebGL2

Under the hood

  • Removed bgfx. Visage has its own graphics layer with Metal, D3D11, Vulkan and WebGL2 backends
  • Shaders are compiled at build time by an in-tree compiler built on glslang and SPIRV-Cross, which are fetched at configure time
  • Path fills use tile-binned analytic coverage
  • HDR layers are RGBA16F
  • Images are decoded with stb_image
  • Added a manual test app in manual_tests/

Thanks to everyone who has contributed: Alexandre Veaux, August Pemberton, Chris Lucas, Chris Randall, Dan Raffel, Daniel Walz, dimapaloskin, dp-mason, Drew Vernon, Elan Hickler, IcebreakerAudio, JWBverheesen, Paul Walker, Randy Jones, Sean Chambers, Tad Nicol and Tarnith.