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, InstanceBuffer, ConstantBuffer, Global};
pub use pso::resource::{ShaderResource, UnorderedAccess, Sampler, TextureSampler};
pub use pso::target::{DepthStencilTarget, DepthTarget, StencilTarget, RenderTarget, BlendTarget, BlendRef, Scissor};

Modules

core
format

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

handle

Device resource handles

macros

Convenience macros Various helper macros.

preset

State presets

pso

Pipeline states Pipeline State Objects - typed higher-level version.

shade

Shaders Shader parameter handling.

state

Fixed-function hardware state.

tex

Texture creation and modification.

traits

public re-exported traits

Macros

gfx_constant_struct!
gfx_format!
gfx_impl_struct!
gfx_pipeline!
gfx_pipeline_base!
gfx_pipeline_inner!
gfx_vertex_struct!

Structs

Bind

Bind flags

BufferInfo

An information block that is immutable and associated with each buffer.

DomainShader
Encoder

Graphics commands encoder.

GeometryShader
HullShader
PixelShader
ProgramInfo

Metadata about a program.

Slice

Description of a subset of Mesh data to render.

VertexShader

Enums

BufferError

Error creating a buffer.

BufferRole

Role of the memory buffer. GLES doesn't allow chaning bind points for buffers.

BufferUpdateError

An error happening on buffer updates.

CombinedError

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

MapAccess

Specifies the access allowed to a buffer mapping.

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.

SliceKind

Source of vertex ordering for a slice

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.

Usage

A hint as to how this buffer/texture will be used.

Constants

DEPTH_STENCIL

The resource can serve as a depth/stencil target.

RENDER_TARGET

The resource can be rendered into.

SHADER_RESOURCE

The resource can be bound to the shader for reading.

UNORDERED_ACCESS

The resource 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

An interface for performing draw calls using a specific graphics API

Factory
Resources

Resources pertaining to a specific API.

ToIndexSlice

A helper trait to build index slices from data.

Functions

cast_slice

Cast a slice from one POD type to another.

Type Definitions

InstanceCount
InstanceOption
VertexCount