Enum jiao::core::sl_type_shared::SLType
source · #[repr(u8)]pub enum SLType {
Show 41 variants
Void = 0,
Bool = 1,
Bool2 = 2,
Bool3 = 3,
Bool4 = 4,
Short = 5,
Short2 = 6,
Short3 = 7,
Short4 = 8,
UShort = 9,
UShort2 = 10,
UShort3 = 11,
UShort4 = 12,
Float = 13,
Float2 = 14,
Float3 = 15,
Float4 = 16,
Float2x2 = 17,
Float3x3 = 18,
Float4x4 = 19,
Half = 20,
Half2 = 21,
Half3 = 22,
Half4 = 23,
Half2x2 = 24,
Half3x3 = 25,
Half4x4 = 26,
Int = 27,
Int2 = 28,
Int3 = 29,
Int4 = 30,
UInt = 31,
UInt2 = 32,
UInt3 = 33,
UInt4 = 34,
Texture2DSampler = 35,
TextureExternalSampler = 36,
Texture2DRectSampler = 37,
Texture2D = 38,
Sampler = 39,
Input = 40,
}
Expand description
Types of shader-language-specific boxed variables we can create.
Variants§
Void = 0
Bool = 1
Bool2 = 2
Bool3 = 3
Bool4 = 4
Short = 5
Short2 = 6
Short3 = 7
Short4 = 8
UShort = 9
UShort2 = 10
UShort3 = 11
UShort4 = 12
Float = 13
Float2 = 14
Float3 = 15
Float4 = 16
Float2x2 = 17
Float3x3 = 18
Float4x4 = 19
Half = 20
Half2 = 21
Half3 = 22
Half4 = 23
Half2x2 = 24
Half3x3 = 25
Half4x4 = 26
Int = 27
Int2 = 28
Int3 = 29
Int4 = 30
UInt = 31
UInt2 = 32
UInt3 = 33
UInt4 = 34
Texture2DSampler = 35
TextureExternalSampler = 36
Texture2DRectSampler = 37
Texture2D = 38
Sampler = 39
Input = 40
Implementations§
source§impl SLType
impl SLType
sourcepub const fn is_float_type(self) -> bool
pub const fn is_float_type(self) -> bool
Is the shading language type float (including vectors/matrices)?
sourcepub const fn is_integral_type(self) -> bool
pub const fn is_integral_type(self) -> bool
Is the shading language type integral (including vectors)?
sourcepub const fn vec_length(self) -> i32
pub const fn vec_length(self) -> i32
If the type represents a single value or vector return the vector length; otherwise, -1.
sourcepub const fn can_be_uniform_value(self) -> bool
pub const fn can_be_uniform_value(self) -> bool
Is the shading language type supported as a uniform (ie, does it have a corresponding set
function on GrGLSLProgramDataManager
)?
sourcepub const fn is_full_precision_numeric_type(self) -> bool
pub const fn is_full_precision_numeric_type(self) -> bool
Is the shading language type full precision?
sourcepub const fn matrix_size(self) -> i32
pub const fn matrix_size(self) -> i32
If the type represents a square matrix, return its size; otherwise, -1.
sourcepub const fn is_combined_sampler_type(self) -> bool
pub const fn is_combined_sampler_type(self) -> bool
If the type represents a square matrix, return its size; otherwise, -1.
Trait Implementations§
source§impl Ord for SLType
impl Ord for SLType
source§impl PartialEq for SLType
impl PartialEq for SLType
source§impl PartialOrd for SLType
impl PartialOrd for SLType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for SLType
impl Eq for SLType
impl StructuralPartialEq for SLType
Auto Trait Implementations§
impl Freeze for SLType
impl RefUnwindSafe for SLType
impl Send for SLType
impl Sync for SLType
impl Unpin for SLType
impl UnwindSafe for SLType
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