No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit f6f9d2f Oct 25, 2018

README.md

gfx-render

This crates adds basic functionality around gfx-hal through two primary types Factory and Renderer that can be instantiated together by init function.

Factory's functionality:

  1. Allocating wrapped buffers and images using gfx-memory's SmartAllocator. Wrapper will release resource automatically on drop. Also supports manual deallocation with less overhead than automatic.
  2. Preserving deallocated buffers and images until they are not references by GPU's in-progress commands. Simply by waiting for all jobs that were recording or in-progress at the moment of deallocation to complete.
  3. Uploading data to buffers and images with method chosen based on memory properties.
  4. Report features and limits of physical device and capabilities and formats for the surface.
  5. Substitute B::Device in generic code. Factory<B> implements Device<B>.

Renderer's functionality:

  1. Creating rendering targets. Currently only surfaces from winit::Window. But headless mode is planned.
  2. Instantiating custom Render implementation for each target. Designed to be compatible with xfg crate but not limiting to.
  3. Kicking off rendering jobs and managing completion through fences.

License

This repository is licensed under either of

at your option.

Contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

What else

Other crates that aim to simplify usage of gfx-hal:

  • gfx-memory - memory allocators. Used in gfx-render internally but Factory can give access to the underlying allocator.
  • gfx-chain - automatic synchronization. Requires up front dependencies declaration.
  • gfx-mesh - create meshes from vertex and index data with easy-to-use API. Dependes on gfx-render.