Registry / utility / glsl-layout

glsl-layout

JSON →
library0.5.0rscratesunverified

Provides data types and traits to build structures ready to upload into UBO.

# Cargo.toml [dependencies] glsl-layout = "0.5.0"
INSTALL
IMPORT
SIG · GLSL-LAYOUT
G
glsl-layout
utilityrustv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Uniform
use glsl_layout::Uniform;

Defines a uniform buffer object struct and serializes it to bytes.

use glsl_layout::Uniform; #[repr(C)] #[derive(Uniform)] struct MyUBO { color: [f32; 4], time: f32, } fn main() { let ubo = MyUBO { color: [1.0, 0.0, 0.0, 1.0], time: 0.5 }; let bytes = ubo.as_bytes(); println!("UBO size: {} bytes", bytes.len()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
glsl-layout — cargo add glsl-layout · libregistry