Announcement

Collapse
No announcement yet.

GFX-RS Portability 0.7 Released With Vulkan Events, Binding Model Improvements

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • GFX-RS Portability 0.7 Released With Vulkan Events, Binding Model Improvements

    Phoronix: GFX-RS Portability 0.7 Released With Vulkan Events, Binding Model Improvements

    The GFX-RS high performance graphics API for the Rust programming language and based on Vulkan while mapping to Metal when on Apple systems is out with a new release...

    http://www.phoronix.com/scan.php?pag...S-0.7-Released

  • #2
    Is gfx-rs easy to use? If so, I wish there was gfx-c++...

    Comment


    • #3
      I've heard gfx-rs is not easy to use, it's mostly unsafe Rust. But may be it changed over time.

      Comment


      • #4
        The news is about gfx-portability – the Vulkan implementation on top of gfx-rs (and, more precisely gfx-hal – low level Rust graphics API, part of the gfx-rs project).

        Originally posted by tildearrow View Post
        Is gfx-rs easy to use? If so, I wish there was gfx-c++...
        Today gfx-rs consists basically of gfx-hal – a low-level heavily based on Vulkan library (so heavily, that some people just use the Vulkan tutorial to learn gfx-hal), so generally as easy (or as hard) to use as Vulkan is. Except that it’s in Rust, so function signatures and types encode statically more invariants that need to be upheld to use it correctly.

        I think the idea is to also have some higher-level graphics library on top of gfx-hal (and earlier versions of gfx-rs were higher-level; the wgpu-rs crate, based on WebGPU, evolved from them and is a sort-of higher-level graphics library), but the main library is just kinda a portable Rusty version of Vulkan.

        As for C++ – one could always use something like Vulkan-HPP (C++ bindings to Vulkan) and link to gfx-portability (since it provides Vulkan C API on top of gfx-hal) for portability on macOS and D3D12 environments.

        Comment


        • #5
          Originally posted by shmerl View Post
          I've heard gfx-rs is not easy to use, it's mostly unsafe Rust. But may be it changed over time.
          Can confirm. The sample code that renders a texture with the gfx-rs logo is 885 lines long and has 43 uses of unsafe. It is cross platform though

          Comment


          • #6
            Originally posted by tildearrow View Post
            Is gfx-rs easy to use? If so, I wish there was gfx-c++...
            WebGPU is your best bet. It has 2 WIP implementations on native (Dawn and wgpu-native).
            Google has a C++ wrapper, and we have a Rust wrapper (wgpu-rs) that in the future could be compatible with either Dawn or wgpu-native.
            Check out the wgpu-rs examples to get a feel of how low/high level it is.

            Comment

            Working...
            X