Skip to content

Topaz 4.0.0

Compare
Choose a tag to compare
@harrand harrand released this 09 Jul 03:16

Topaz 4.0 brings many major API breaking changes, although the least breaking changes between any major release. Unlike 1 -> 2 and 2 -> 3, this is not a complete rewrite, but a major refactor and introduction of a few new core feature.

Notable Changes

  • Coding style change: Classes and structs (i.e types) are no longer PascalCase, they are all snake_case. All public API types have been refactored accordingly. This means any project against Topaz 3.6.1 or earlier will require major refactoring fixes to move to Topaz 4.0.0. See the range of commits starting at de62eb7

Topaz Core (tz::core)

  • HDK has been removed as a submodule, and all its major features have made its way into tz::core in various ways.
  • Win32: Fixed an issue where if the mouse cursor left the window region while a button press/release was occurring, the behaviour would be erratic. 18c209d
  • Win32: Fixed an issue where tz::window()::set_dimensions(tz::vec2ui) would treat its parameter as the full window dimensions, including border. This was different to what tz::window().get_dimensions() returned - the dimensions of the client window rectangle. Now, both deal with the client rect. 4562e48
  • Added tz::delay::elapsed() which returns the time elapsed since the delay object was created. c7129ac
  • Added tz::begin_frame() and tz::end_frame(), which you are now expected to invoke at the beginning and end of your main application loop respectively.
  • tz::static_for now works as expected at compile-time. 25972b0

Topaz Graphics Library (tz::gl)

Major

  • Draw Indirect Count support has been added, allowing true GPU-driven-rendering. Notable features include:
    • TZSL input variable in::draw_id which represents the GLSL gl_DrawID built-in variable. 65e3e08
    • Added tz::gl::renderer_option::draw_indirect_count, which indicates that the draw-indirect buffer of a renderer is assumed to contain a std::uint32_t value representing the draw count at the beginning of the buffer data. The rest of the buffer data should start at the byte after that value, essentially being shifted forward 4 bytes. 330133b
  • Vulkan: The vulkan renderer has been mostly rewritten. Aswell as vastly improved performance/maintainability, Some new features include:
    • Timeline Semaphore support. c146f3b
    • Dynamic Rendering support. 63e05df
  • Added support for render graphs and render scheduling. See tz::gl::get_device().render_graph(). A render graph is composed of a timeline, representing the basic order of execution for all mainline renderers, and a set of dependencies for each renderer. If Renderer A has a dependency on Renderer B, that means a timeline semaphore will ensure that the GPU work for Renderer A does not begin until the GPU work for Renderer B is complete.

Moderate

  • Vulkan: Added support for timeline semaphores. c146f3b
  • tz::gl::renderer::render(tri_count : std::size_t) no longer exists. Instead, the tri_count can be set initially in tz::gl::renderer_info::state().graphics.tri_count, and changed at a later date using a renderer edit. d1c6540
  • You are no longer expected to invoke tz::gl::renderer::render(...). Instead, you should populate the timeline and dependency graph via tz::gl::get_device().render_graph() and then invoke a new render on the device directly, e.g tz::gl::get_device().render().

Minor

  • OpenGL: Fixed an issue where an OGL renderer would present to the screen even if its renderer output was an offscreen image. 4c88695
  • Added tz::gl::device::full_wait() and tz::gl::device::frame_wait(). A full wait blocks the current thread until all scheduled GPU work has been completed, and frame wait blocks the current thread until all scheduled GPU work from the previous thread has been completed.

Topaz Debug UI Library (tz::dbgui)

  • Added game bar, allowing applications to specify their own dbgui game bar at the bottom of the screen on debug builds. 905acc6

Topaz Window System Integration (tz::wsi)

  • Created!
  • Entirely replaces GLFW, and ships with a Win32 or X11 backend for windowing, mouse and keyboard input.
  • This work was initially made into a new Tangle repository, but ultimately the code made its way into tz::wsi instead of a submodule.

Topaz IO Library (tz::io)

  • Created!
  • Mainly right now, is for loading and importing data in various formats.
  • Supports loading images from memory or files, and retrieving the image data and dimensions. See tz::io::image in e26a4af. Note that tz::io::image only supports RGBA32_UNorm.
  • Supports loading GLTF files through the GLB binary format, using tz::io::gltf. See the commit range around 2c755c9 for more info.

Demos and Tests

  • Added tz_mesh_demo, a demo which loads in a GLTF model (GLB) and then displays it in 3d using some basic lighting and shading.
**Full Changelog**: https://github.com/harrand/Topaz/compare/3.6.1...4.0.0