Struct nnsdk::ui2d::Material

source ·
#[repr(C)]
pub struct Material { pub vtable: u64, pub m_colors: MaterialColor, pub m_p_mem: *mut c_void, pub m_p_shader_info: *const c_void, pub m_p_name: *const c_char, pub m_vertex_shader_constant_buffer_offset: u32, pub m_pixel_shader_constant_buffer_offset: u32, pub m_p_user_shader_constant_buffer_information: *const c_void, pub m_p_blend_state: *const c_void, pub m_packed_values: u8, pub m_flag: u8, pub m_shader_variation: u16, /* private fields */ }

Fields§

§vtable: u64§m_colors: MaterialColor§m_p_mem: *mut c_void§m_p_shader_info: *const c_void§m_p_name: *const c_char§m_vertex_shader_constant_buffer_offset: u32§m_pixel_shader_constant_buffer_offset: u32§m_p_user_shader_constant_buffer_information: *const c_void§m_p_blend_state: *const c_void§m_packed_values: u8§m_flag: u8§m_shader_variation: u16

Implementations§

source§

impl Material

source

pub fn set_color_int(&mut self, idx: usize, r: u8, g: u8, b: u8, a: u8)

source

pub fn set_color_float(&mut self, idx: usize, r: f32, g: f32, b: f32, a: f32)

source

pub fn set_color( &mut self, color_type: MaterialColorType, r: f32, g: f32, b: f32, a: f32 )

source

pub fn set_white_color(&mut self, r: f32, g: f32, b: f32, a: f32)

source

pub fn set_black_color(&mut self, r: f32, g: f32, b: f32, a: f32)

source

pub fn set_white_res_color(&mut self, white: ResColor)

source

pub fn set_black_res_color(&mut self, black: ResColor)

Trait Implementations§

source§

impl Debug for Material

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.