pub struct ImmediateItem {
pub access_path: String,
pub ty: TypeInner,
pub offset: u32,
pub size_bytes: u32,
}Expand description
All information to bind a single uniform value to the shader.
Immediates are emulated using traditional uniforms in OpenGL.
These are composed of a set of primitives (scalar, vector, matrix) that are given names. Because they are not backed by the concept of a buffer, we must do the work of calculating the offset of each primitive in the immediate data block.
Fields§
§access_path: StringGL uniform name for the item. This name is the same as if you were to access it directly from a GLSL shader.
The with the following example, the following names will be generated, one name per GLSL uniform.
struct InnerStruct {
value: f32,
}
struct ImmediateData {
InnerStruct inner;
vec4 array[2];
}
uniform ImmediateData _immediates_binding_cs;- _immediates_binding_cs.inner.value
- _immediates_binding_cs.array[0]
- _immediates_binding_cs.array[1]ty: TypeInnerType of the uniform. This will only ever be a scalar, vector, or matrix.
Stored as a TypeInner rather than a Handle<Type> because
process_overrides may compact the module, renumbering type handles.
Leaf types don’t reference other types, so a TypeInner is self-contained.
offset: u32The offset in the immediate data memory block this uniform maps to.
size_bytes: u32Size of this uniform in bytes.
Trait Implementations§
Source§impl Clone for ImmediateItem
impl Clone for ImmediateItem
Source§fn clone(&self) -> ImmediateItem
fn clone(&self) -> ImmediateItem
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more