[][src]Struct nvtt_rs::InputOptions

pub struct InputOptions(_);

Object which stores the input options for the texture.

Methods

impl InputOptions[src]

pub fn new() -> Result<Self, Error>[src]

Create a new InputOptions.

pub fn into_raw(self) -> *mut NvttInputOptions[src]

Returns the underlying NvttInputOptions pointer type. It is your responsibility to call nvttDestroyInputOptions on this value to clean up the NvttInputOptions resources.

pub fn set_alpha_mode(&mut self, alpha_mode: AlphaMode) -> &mut Self[src]

pub fn convert_to_normal_map(
    &mut self,
    convert_to_normal_map: impl Into<NvttBoolean>
) -> &mut Self
[src]

If this parameter is set, then nvtt will convert the image into a normal map.

pub fn set_format(&mut self, format: InputFormat) -> &mut Self[src]

Sets the InputFormat of the input data. This tells nvtt which pixel format it should interpret the byte data passed in InputOptions::set_mipmap_data as.

pub fn set_gamma(&mut self, input_gamma: f32, output_gamma: f32) -> &mut Self[src]

pub fn set_height_evaluation(
    &mut self,
    red_scale: f32,
    green_scale: f32,
    blue_scale: f32,
    alpha_scale: f32
) -> &mut Self
[src]

pub fn set_mipmap_filter(&mut self, mipmap_filter: MipmapFilter) -> &mut Self[src]

Set the MipmapFilter on the InputOptions. See the MipmapFilter type for more info.

pub fn set_mipmap_data(
    &mut self,
    data: &[u8],
    w: i32,
    h: i32,
    d: i32,
    face: i32,
    mipmap: i32
) -> Result<&mut Self, Error>
[src]

Sets the input data which should be compressed.

The data is copied into the InputOptions object.

Errors

If the dimensions of the image do not match the length of the data, then this method will fail with Error::Unknown.

pub fn reset(&mut self) -> &mut Self[src]

Resets the InputOptions back to the default state.

pub fn set_image<'a, I: Into<ValidImage<'a>>>(
    &mut self,
    image: I,
    face: i32,
    mipmap: i32
) -> Result<&mut Self, Error>
[src]

Sets the input texture data to the data contained by image.

Notes

This method requires the nvtt_image_integration feature.

pub fn set_max_extents(&mut self, max_extents: c_int) -> &mut Self[src]

Constrain the texture size to the value in max_extents.

pub fn set_normal_map(
    &mut self,
    is_normal_map: impl Into<NvttBoolean>
) -> &mut Self
[src]

pub fn set_normalize_mipmaps(
    &mut self,
    normalize_mips: impl Into<NvttBoolean>
) -> &mut Self
[src]

pub fn set_normal_filter(&mut self, filter: NormalMapFilter) -> &mut Self[src]

pub fn set_round_mode(&mut self, round_mode: RoundMode) -> &mut Self[src]

pub fn set_texture_layout(
    &mut self,
    texture_type: TextureType,
    w: c_int,
    h: c_int,
    d: c_int,
    array_size: c_int
) -> &mut Self
[src]

pub fn set_wrap_mode(&mut self, wrap_mode: WrapMode) -> &mut Self[src]

Trait Implementations

impl Drop for InputOptions[src]

impl Debug for InputOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]