pub struct ConstVar {
pub name: String,
pub location: usize,
pub count: usize,
pub base_type: BaseType,
pub container: ContainerType,
}Expand description
A constant in the shader - a bit of data that doesn’t vary
Fields§
§name: StringName of this constant.
location: usizeLocation of this constant in the program. For constant buffer elements, it’s the offset in bytes.
count: usizeNumber of elements this constant represents.
base_type: BaseTypeType that this constant is composed of
container: ContainerType“Scalarness” of this constant.
Implementations§
Source§impl ConstVar
impl ConstVar
Sourcepub fn is_compatible(
&self,
value: &UniformValue,
) -> Result<(), CompatibilityError>
pub fn is_compatible( &self, value: &UniformValue, ) -> Result<(), CompatibilityError>
Whether a value is compatible with this variable. That is, whether the value can be stored in this variable.
Trait Implementations§
impl Eq for ConstVar
impl StructuralPartialEq for ConstVar
Auto Trait Implementations§
impl Freeze for ConstVar
impl RefUnwindSafe for ConstVar
impl Send for ConstVar
impl Sync for ConstVar
impl Unpin for ConstVar
impl UnwindSafe for ConstVar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more