Trait ShaderValue

Source
pub trait ShaderValue
where Self: Sized,
{ const UNIFORM_TYPE: ShaderUniformDataType; // Provided method unsafe fn raw_value(&self) -> *const c_void { ... } }
Expand description

Shader uniform value You shouldn’t need to implement this trait yourself.

Required Associated Constants§

Source

const UNIFORM_TYPE: ShaderUniformDataType

Uniform type assiciated with the value

Provided Methods§

Source

unsafe fn raw_value(&self) -> *const c_void

Get the value as a void*

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ShaderValue for f32

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::Float

Source§

impl ShaderValue for i32

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::Int

Source§

impl ShaderValue for Vector2<i32>

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::IVec2

Source§

impl ShaderValue for Vector3<i32>

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::IVec3

Source§

impl ShaderValue for Vector4<i32>

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::IVec4

Implementors§

Source§

impl ShaderValue for rust_raylib::math::Vector2

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::Vec2

Source§

impl ShaderValue for rust_raylib::math::Vector3

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::Vec3

Source§

impl ShaderValue for rust_raylib::math::Vector4

Source§

const UNIFORM_TYPE: ShaderUniformDataType = ShaderUniformDataType::Vec4