[−][src]Struct nvtt_rs::CompressionOptions
Object which stores the compression options for the texture. This provides a
safer interface for the NvttCompressionOptions
type.
Implementations
impl CompressionOptions
[src]
pub fn new() -> Result<Self, Error>
[src]
Create a new CompressionOptions
.
pub fn into_raw(self) -> *mut NvttCompressionOptions
[src]
Returns the underlying NvttCompressionOptions
pointer type. It is your
responsibility to call nvttDestroyCompressionOptions
on this value to
clean up the NvttCompressionOptions
resources.
pub fn set_color_weights(&mut self, r: f32, g: f32, b: f32, a: f32) -> &mut Self
[src]
pub fn set_format(&mut self, format: Format) -> &mut Self
[src]
Set the output format of the compressed image.
pub fn set_pixel_format(
&mut self,
bitcount: c_uint,
rmask: c_uint,
gmask: c_uint,
bmask: c_uint,
amask: c_uint
) -> &mut Self
[src]
&mut self,
bitcount: c_uint,
rmask: c_uint,
gmask: c_uint,
bmask: c_uint,
amask: c_uint
) -> &mut Self
pub fn set_quality(&mut self, quality: Quality) -> &mut Self
[src]
Set the Quality
of the output image.
pub fn set_quanitzation(
&mut self,
color_dithering: impl Into<NvttBoolean>,
alpha_dithering: impl Into<NvttBoolean>,
binary_alpha: impl Into<NvttBoolean>,
alpha_threshold: i32
) -> &mut Self
[src]
&mut self,
color_dithering: impl Into<NvttBoolean>,
alpha_dithering: impl Into<NvttBoolean>,
binary_alpha: impl Into<NvttBoolean>,
alpha_threshold: i32
) -> &mut Self
Set quantization settings on the CompressionOptions
.
- If
color_dithering
istrue
, then dithering will be applied to the color channel. - If
alpha_dithering
istrue
, then dithering will be applied to the alpha channel. - If
binary_alpha
istrue
, Then only one bit will be used to encode alpha information. alpha_threshold
is used to determine if a pixel's alpha channel is high enough to be transparent. This parameter is ignored ifbinary_alpha
is set to false.
Trait Implementations
impl Debug for CompressionOptions
[src]
impl Drop for CompressionOptions
[src]
impl Send for CompressionOptions
[src]
impl Sync for CompressionOptions
[src]
Auto Trait Implementations
impl RefUnwindSafe for CompressionOptions
impl Unpin for CompressionOptions
impl UnwindSafe for CompressionOptions
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,