[−][src]Struct nvtt_rs::Compressor
The Compressor
is used to perform the texture compression.
Methods
impl Compressor
[src]
pub fn new() -> Result<Self, Error>
[src]
Create a new Compressor
. If the Compressor
cannot be created, returns
Error::Unknown
.
pub fn into_raw(self) -> *mut NvttCompressor
[src]
Returns the underlying NvttCompressor
pointer type. It is your responsibility
to call nvttDestroyCompressor
on this value to clean up the NvttCompressor
resources.
pub fn enable_cuda_acceleration<B: Into<NvttBoolean>>(
&mut self,
enable: B
) -> &mut Self
[src]
&mut self,
enable: B
) -> &mut Self
If the platform supports the cuda
api, this method can be used to enable
gpu compression. This may give different results to a pure cpu implementation,
so this is set to false
by default.
On platforms without cuda
, this function is a no-op.
pub fn is_cuda_acceleration_enabled(&self) -> bool
[src]
Returns true
if cuda acceleration has been enabled. Otherwise, returns
false.
pub fn compress(
&self,
compress_options: &CompressionOptions,
input_options: &InputOptions,
output_options: &OutputOptions
) -> Result<CompressionOutput, Error>
[src]
&self,
compress_options: &CompressionOptions,
input_options: &InputOptions,
output_options: &OutputOptions
) -> Result<CompressionOutput, Error>
Perform the compression.
pub fn estimate_size(
&self,
input_options: &InputOptions,
compression_options: &CompressionOptions
) -> usize
[src]
&self,
input_options: &InputOptions,
compression_options: &CompressionOptions
) -> usize
Estimate the final compressed size of the output texture.
Trait Implementations
impl Drop for Compressor
[src]
impl Debug for Compressor
[src]
Auto Trait Implementations
impl !Send for Compressor
impl !Sync for Compressor
impl Unpin for Compressor
impl UnwindSafe for Compressor
impl RefUnwindSafe for Compressor
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,