Crate gfx_hal

source ·
Expand description

Low-level graphics abstraction for Rust. Mostly operates on data, not types. Designed for use by libraries and higher-level abstractions only.

Re-exports

pub use self::adapter::Adapter;
pub use self::adapter::AdapterInfo;
pub use self::adapter::MemoryProperties;
pub use self::adapter::MemoryType;
pub use self::adapter::MemoryTypeId;
pub use self::adapter::PhysicalDevice;
pub use self::adapter::QueuePriority;
pub use self::device::Device;
pub use self::pool::CommandPool;
pub use self::queue::CommandQueue;
pub use self::queue::QueueGroup;
pub use self::queue::QueueFamily;
pub use self::queue::QueueType;
pub use self::queue::Submission;
pub use self::queue::Capability;
pub use self::queue::Supports;
pub use self::queue::General;
pub use self::queue::Graphics;
pub use self::queue::Compute;
pub use self::queue::Transfer;
pub use self::window::AcquireError;
pub use self::window::Backbuffer;
pub use self::window::CompositeAlpha;
pub use self::window::SwapImageIndex;
pub use self::window::FrameSync;
pub use self::window::PresentMode;
pub use self::window::Surface;
pub use self::window::SurfaceCapabilities;
pub use self::window::Swapchain;
pub use self::window::SwapchainConfig;

Modules

Physical devices and adapters.
Memory buffers.
Command buffers.
Logical device
Return values from function calls.
Universal format specification. Applicable to textures, views, and vertex buffers.
Image related structures.
Memory mapping
Types to describe the properties of memory allocated for gfx resources.
RenderPass handling.
Command pools
Raw Pipeline State Objects
Queries are commands that can be submitted to a command buffer to record statistics or other useful values as the command buffer is running. They are often intended for profiling or other introspection, providing a mechanism for the command buffer to record data about its operation as it is running.
Command queues.
Generic range type abstraction that allows ranges to be handled a little more generically.
Windowing system interoperability

Structs

Features that the device supports. These only include features of the core interface and not API extensions.
Represents a combination of a logical device and the hardware queues it provides.
Resource limits of a particular graphics device.

Enums

An enum describing the type of an index value in a slice’s index buffer
Describes the type of geometric primitives, created from vertex data.
Marks that an error occured submitting a command to a command buffer.

Traits

The Backend trait wraps together all the types needed for a graphics backend. Each backend module, such as OpenGL or Metal, will implement this trait with its own concrete types.
A descriptor pool is a collection of memory from which descriptor sets are allocated.
An instantiated backend.

Type Definitions

Slot for an attribute.
Slot for an active color buffer.
Slot for a constant buffer object.
Indirect draw calls count.
Draw number of indices.
Draw number of instances.
Number of vertices in a patch
Slot for a shader resource view.
Slot for a sampler.
Submission result for DX11 backend. Currently mostly unused.
Slot for an unordered access object.
Draw vertex count.
Draw vertex base offset.
Number of work groups.