This project is discontinued in favor of rendy.
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:
- Allocating wrapped buffers and images using
gfx-memory
'sSmartAllocator
. Wrapper will release resource automatically on drop. Also supports manual deallocation with less overhead than automatic. - 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.
- Uploading data to buffers and images with method chosen based on memory properties.
- Report features and limits of physical device and capabilities and formats for the surface.
- Substitute
B::Device
in generic code.Factory<B>
implementsDevice<B>
.
Renderer
's functionality:
- Creating rendering targets. Currently only surfaces from
winit::Window
. But headless mode is planned. - Instantiating custom
Render
implementation for each target. Designed to be compatible withxfg
crate but not limiting to. - Kicking off rendering jobs and managing completion through fences.
This repository is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
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.
Other crates that aim to simplify usage of gfx-hal
:
gfx-memory
- memory allocators. Used ingfx-render
internally butFactory
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 ongfx-render
.