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

source

pub const fn to_string(self) -> &'static str

Returns the SkSL typename for this type.

source

pub const fn is_float_type(self) -> bool

Is the shading language type float (including vectors/matrices)?

source

pub const fn is_integral_type(self) -> bool

Is the shading language type integral (including vectors)?

source

pub const fn vec_length(self) -> i32

If the type represents a single value or vector return the vector length; otherwise, -1.

source

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)?

source

pub const fn is_full_precision_numeric_type(self) -> bool

Is the shading language type full precision?

source

pub const fn matrix_size(self) -> i32

If the type represents a square matrix, return its size; otherwise, -1.

source

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 Clone for SLType

source§

fn clone(&self) -> SLType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SLType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for SLType

source§

fn cmp(&self, other: &SLType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for SLType

source§

fn eq(&self, other: &SLType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for SLType

source§

fn partial_cmp(&self, other: &SLType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for SLType

source§

impl Eq for SLType

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.