pub struct ImmediateItem {
pub access_path: String,
pub ty: Handle<Type>,
pub offset: 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: Handle<Type>Type of the uniform. This will only ever be a scalar, vector, or matrix.
offset: u32The offset in the immediate data memory block this uniform maps to.
The size of the uniform can be derived from the type.
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