Crate gfx [] [src]

An efficient, low-level, bindless graphics API for Rust. See the blog for explanations and annotated examples.

Reexports

pub use draw_state::target::*;
pub use pso::PipelineState;
pub use pso::buffer::VertexBuffer;
pub use pso::buffer::InstanceBuffer;
pub use pso::buffer::RawVertexBuffer;
pub use pso::buffer::ConstantBuffer;
pub use pso::buffer::RawConstantBuffer;
pub use pso::buffer::Global;
pub use pso::resource::ShaderResource;
pub use pso::resource::RawShaderResource;
pub use pso::resource::UnorderedAccess;
pub use pso::resource::Sampler;
pub use pso::resource::TextureSampler;
pub use pso::target::DepthStencilTarget;
pub use pso::target::DepthTarget;
pub use pso::target::StencilTarget;
pub use pso::target::RenderTarget;
pub use pso::target::RawRenderTarget;
pub use pso::target::BlendTarget;
pub use pso::target::BlendRef;
pub use pso::target::Scissor;
pub use pso::bundle::Bundle;

Modules

buffer

Memory buffers

format

Universal format specification. Applicable to textures, views, and vertex buffers.

handle

Resource handles

macros

Convenience macros Various helper macros.

mapping

Memory mapping

memory

Memory stuff

preset

State presets

pso

A typed high-level graphics pipeline interface.

shade

Shaders Shader parameter handling.

state

Fixed-function hardware state.

texture

Texture creation and modification.

traits

public re-exported traits

Macros

gfx_constant_struct
gfx_constant_struct_meta
gfx_defines

Defines vertex, constant and pipeline formats in one block

gfx_format
gfx_impl_struct
gfx_impl_struct_meta
gfx_pipeline
gfx_pipeline_base
gfx_pipeline_inner
gfx_vertex_struct
gfx_vertex_struct_meta

Structs

Bind

Bind flags

DomainShader
Encoder

Graphics Command Encoder

GeometryShader
HullShader
PixelShader
ProgramInfo

Metadata about a program.

Slice

A Slice dictates in which and in what order vertices get processed. It is required for processing a PSO.

VertexShader

Enums

CombinedError

An error from creating textures with views at the same time.

IndexBuffer

Type of index-buffer used in a Slice.

PipelineStateError

Error creating a PipelineState

Primitive

Describes what geometric primitives are created from vertex data.

ResourceViewError

Error creating either a ShaderResourceView, or UnorderedAccessView.

ShaderSet

A complete set of shaders to link a program.

TargetViewError

Error creating either a RenderTargetView, or DepthStencilView.

UniformValue

A value that can be uploaded to the device as a uniform.

UpdateError

An error occuring in buffer/texture updates.

Constants

DEPTH_STENCIL

Can serve as a depth/stencil target.

RENDER_TARGET

Can be rendered into.

SHADER_RESOURCE

Can be bound to the shader for reading.

TRANSFER_DST

Can be transfered into.

TRANSFER_SRC

Can be transfered from.

UNORDERED_ACCESS

Can be bound to the shader for writing.

Traits

CommandBuffer

An interface of the abstract command buffer. It collects commands in an efficient API-specific manner, to be ready for execution on the device.

Device

A Device is responsible for submitting CommandBuffers to the GPU.

Factory

A Factory is responsible for creating and managing resources for the context it was created with.

IntoIndexBuffer

A helper trait to create IndexBuffers from different kinds of data.

Resources

Different types of a specific API.

Type Definitions

InstanceCount

Draw number of instances

InstanceParams

Optional instance parameters: (instance count, buffer offset)

VertexCount

Draw vertex count.