Skip to main content

Crate rusty_dds

Crate rusty_dds 

Source
Expand description

The main entry point for this library is the Dds type.

§Features

FeatureDefaultProvides
decodeyesDds::decode_rgba8, bcdec_rs BCn kernels
encodeyesDds::encode_from_rgba8, EncodeLayout

Container parse/compose, surfaces, content classification, and GPU upload plans are always available. Use default-features = false, features = ["decode"] for loaders / WASM that never encode.

Modules§

referencedecode
Bit-exact reference tiling using bcdec_rs directly (tests + benches).

Structs§

Caps
Caps2
DdsBase
This is the main DirectDraw Surface file structure, generic over how the payload is stored.
EncodeLayoutencode
How to lay out encoded subresources — mirrors decode matrix contexts.
FourCC
GpuFormat
Recommended GPU texture format name (stringly typed — no graphics API crate).
Header
Header10
HeaderFlags
ImageRgba8
Tightly packed RGBA8 image (row-major).
ImageRgbaF32
Tightly packed RGBA f32 pixels (HDR decode output).
MiscFlag
NewD3dParams
Parameters for Dds::new_d3d()
NewDxgiParams
Parameters for Dds::new_dxgi()
PixelFormat
PixelFormatFlags
SubresourceId
Identifies one mip / layer / face subresource inside [Dds::data].
SurfaceView
Borrowed view of one subresource’s bytes and mip dimensions.
SurfaceViewMut
Mutable borrowed view of one subresource.
UploadPlan
One mip/layer/face ready for write_texture / buffer→image copy.

Enums§

AlphaMode
CubemapFace
DirectX cubemap face order (face index 0..5).
D3D10ResourceDimension
D3DFormat
DecodeContent
Public LDR format classification (decode + encode matrix).
DxgiFormat
EncodeQualityencode
Encode effort vs speed. Default EncodeQuality::Quality is the corpus bake-off path.
Error
HdrDecodeContent
HDR (float-output) content set — separate from DecodeContent so the LDR matrix (ALL_LDR, decode_rgba8, encode) is untouched.
Rdoencode
Rate-distortion optimization strength for the BC1 and BC7 encoders.
UploadPath
How to feed one subresource to a GPU copy.

Traits§

DataFormat

Functions§

max_abs_diffencode
Max absolute per-byte error.
psnr_rgba8encode
Peak signal-to-noise ratio for two equal-length RGBA8 buffers (dB).

Type Aliases§

Dds
A DDS that owns its payload. This is what Dds::read produces, and it is what Dds has always meant.
DdsView
A DDS that borrows its payload — no copy, no allocation.