1
2
3
/* automatically generated by rust-bindgen */

pub const true_ : u32 = 1 ; pub const false_ : u32 = 0 ; pub const __bool_true_false_are_defined : u32 = 1 ; pub const NVTT_VERSION : u32 = 20100 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NvttInputOptions { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NvttCompressionOptions { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NvttOutputOptions { _unused : [ u8 ; 0 ] , } # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct NvttCompressor { _unused : [ u8 ; 0 ] , } pub const NvttFormat_NVTT_Format_RGB : NvttFormat = 0 ; pub const NvttFormat_NVTT_Format_RGBA : NvttFormat = 0 ; pub const NvttFormat_NVTT_Format_DXT1 : NvttFormat = 1 ; pub const NvttFormat_NVTT_Format_DXT1a : NvttFormat = 2 ; pub const NvttFormat_NVTT_Format_DXT3 : NvttFormat = 3 ; pub const NvttFormat_NVTT_Format_DXT5 : NvttFormat = 4 ; pub const NvttFormat_NVTT_Format_DXT5n : NvttFormat = 5 ; pub const NvttFormat_NVTT_Format_BC1 : NvttFormat = 1 ; pub const NvttFormat_NVTT_Format_BC1a : NvttFormat = 2 ; pub const NvttFormat_NVTT_Format_BC2 : NvttFormat = 3 ; pub const NvttFormat_NVTT_Format_BC3 : NvttFormat = 4 ; pub const NvttFormat_NVTT_Format_BC3n : NvttFormat = 5 ; pub const NvttFormat_NVTT_Format_BC4 : NvttFormat = 6 ; pub const NvttFormat_NVTT_Format_BC5 : NvttFormat = 7 ; pub const NvttFormat_NVTT_Format_DXT1n : NvttFormat = 8 ; pub const NvttFormat_NVTT_Format_CTX1 : NvttFormat = 9 ; pub const NvttFormat_NVTT_Format_BC6 : NvttFormat = 10 ; pub const NvttFormat_NVTT_Format_BC7 : NvttFormat = 11 ; pub const NvttFormat_NVTT_Format_BC3_RGBM : NvttFormat = 12 ; pub const NvttFormat_NVTT_Format_ETC1 : NvttFormat = 13 ; pub const NvttFormat_NVTT_Format_ETC2_R : NvttFormat = 14 ; pub const NvttFormat_NVTT_Format_ETC2_RG : NvttFormat = 15 ; pub const NvttFormat_NVTT_Format_ETC2_RGB : NvttFormat = 16 ; pub const NvttFormat_NVTT_Format_ETC2_RGBA : NvttFormat = 17 ; pub const NvttFormat_NVTT_Format_ETC2_RGB_A1 : NvttFormat = 18 ; pub const NvttFormat_NVTT_Format_ETC2_RGBM : NvttFormat = 19 ; pub const NvttFormat_NVTT_Format_PVR_2BPP_RGB : NvttFormat = 20 ; pub const NvttFormat_NVTT_Format_PVR_4BPP_RGB : NvttFormat = 21 ; pub const NvttFormat_NVTT_Format_PVR_2BPP_RGBA : NvttFormat = 22 ; pub const NvttFormat_NVTT_Format_PVR_4BPP_RGBA : NvttFormat = 23 ; # [ doc = " Supported compression formats." ] pub type NvttFormat = u32 ; pub const NvttQuality_NVTT_Quality_Fastest : NvttQuality = 0 ; pub const NvttQuality_NVTT_Quality_Normal : NvttQuality = 1 ; pub const NvttQuality_NVTT_Quality_Production : NvttQuality = 2 ; pub const NvttQuality_NVTT_Quality_Highest : NvttQuality = 3 ; # [ doc = " Quality modes." ] pub type NvttQuality = u32 ; pub const NvttWrapMode_NVTT_WrapMode_Clamp : NvttWrapMode = 0 ; pub const NvttWrapMode_NVTT_WrapMode_Repeat : NvttWrapMode = 1 ; pub const NvttWrapMode_NVTT_WrapMode_Mirror : NvttWrapMode = 2 ; # [ doc = " Wrap modes." ] pub type NvttWrapMode = u32 ; pub const NvttTextureType_NVTT_TextureType_2D : NvttTextureType = 0 ; pub const NvttTextureType_NVTT_TextureType_Cube : NvttTextureType = 1 ; pub const NvttTextureType_TextureType_3D : NvttTextureType = 2 ; pub const NvttTextureType_TextureType_Array : NvttTextureType = 3 ; # [ doc = " Texture types." ] pub type NvttTextureType = u32 ; pub const NvttInputFormat_NVTT_InputFormat_BGRA_8UB : NvttInputFormat = 0 ; pub const NvttInputFormat_NVTT_InputFormat_RGBA_16F : NvttInputFormat = 1 ; pub const NvttInputFormat_NVTT_InputFormat_RGBA_32F : NvttInputFormat = 2 ; pub const NvttInputFormat_NVTT_InputFormat_R_32F : NvttInputFormat = 3 ; # [ doc = " Input formats." ] pub type NvttInputFormat = u32 ; pub const NvttMipmapFilter_NVTT_MipmapFilter_Box : NvttMipmapFilter = 0 ; pub const NvttMipmapFilter_NVTT_MipmapFilter_Triangle : NvttMipmapFilter = 1 ; pub const NvttMipmapFilter_NVTT_MipmapFilter_Kaiser : NvttMipmapFilter = 2 ; # [ doc = " Mipmap downsampling filters." ] pub type NvttMipmapFilter = u32 ; pub const NvttRoundMode_NVTT_RoundMode_None : NvttRoundMode = 0 ; pub const NvttRoundMode_NVTT_RoundMode_ToNextPowerOfTwo : NvttRoundMode = 1 ; pub const NvttRoundMode_NVTT_RoundMode_ToNearestPowerOfTwo : NvttRoundMode = 2 ; pub const NvttRoundMode_NVTT_RoundMode_ToPreviousPowerOfTwo : NvttRoundMode = 3 ; pub const NvttRoundMode_NVTT_RoundMode_ToNextMultipleOfFour : NvttRoundMode = 4 ; pub const NvttRoundMode_NVTT_RoundMode_ToNearestMultipleOfFour : NvttRoundMode = 5 ; pub const NvttRoundMode_NVTT_RoundMode_ToPreviousMultipleOfFour : NvttRoundMode = 6 ; # [ doc = " Extents rounding mode." ] pub type NvttRoundMode = u32 ; pub const NvttAlphaMode_NVTT_AlphaMode_None : NvttAlphaMode = 0 ; pub const NvttAlphaMode_NVTT_AlphaMode_Transparency : NvttAlphaMode = 1 ; pub const NvttAlphaMode_NVTT_AlphaMode_Premultiplied : NvttAlphaMode = 2 ; # [ doc = " Alpha mode." ] pub type NvttAlphaMode = u32 ; pub const NvttError_NVTT_Error_Unknown : NvttError = 0 ; pub const NvttError_NVTT_Error_InvalidInput : NvttError = 1 ; pub const NvttError_NVTT_Error_UnsupportedFeature : NvttError = 2 ; pub const NvttError_NVTT_Error_CudaError : NvttError = 3 ; pub const NvttError_NVTT_Error_FileOpen : NvttError = 4 ; pub const NvttError_NVTT_Error_FileWrite : NvttError = 5 ; pub const NvttError_NVTT_Error_UnsupportedOutputFormat : NvttError = 6 ; pub type NvttError = u32 ; pub const NvttContainer_NVTT_Container_DDS : NvttContainer = 0 ; pub const NvttContainer_NVTT_Container_DDS10 : NvttContainer = 1 ; pub const NvttContainer_NVTT_Container_KTX : NvttContainer = 2 ; pub type NvttContainer = u32 ; # [ repr ( u32 ) ] # [ derive ( Debug , Copy , Clone , PartialEq , Eq , Hash ) ] pub enum NvttBoolean { NVTT_False = 0 , NVTT_True = 1 , } pub type nvttErrorHandler = :: core :: option :: Option < unsafe extern "C" fn ( e : NvttError ) > ; pub type nvttBeginImageHandler = :: core :: option :: Option < unsafe extern "C" fn ( size : libc :: c_int , width : libc :: c_int , height : libc :: c_int , depth : libc :: c_int , face : libc :: c_int , miplevel : libc :: c_int ) > ; pub type nvttOutputHandler = :: core :: option :: Option < unsafe extern "C" fn ( data : * const libc :: c_void , size : libc :: c_int ) -> bool > ; pub type nvttEndImageHandler = :: core :: option :: Option < unsafe extern "C" fn ( ) > ; extern "C" { pub fn nvttCreateInputOptions ( ) -> * mut NvttInputOptions ; } extern "C" { pub fn nvttDestroyInputOptions ( inputOptions : * mut NvttInputOptions ) ; } extern "C" { pub fn nvttSetInputOptionsTextureLayout ( inputOptions : * mut NvttInputOptions , type_ : NvttTextureType , w : libc :: c_int , h : libc :: c_int , d : libc :: c_int , arraySize : libc :: c_int ) ; } extern "C" { pub fn nvttResetInputOptionsTextureLayout ( inputOptions : * mut NvttInputOptions ) ; } extern "C" { pub fn nvttSetInputOptionsMipmapData ( inputOptions : * mut NvttInputOptions , data : * const libc :: c_void , w : libc :: c_int , h : libc :: c_int , d : libc :: c_int , face : libc :: c_int , mipmap : libc :: c_int ) -> NvttBoolean ; } extern "C" { pub fn nvttSetInputOptionsFormat ( inputOptions : * mut NvttInputOptions , format : NvttInputFormat ) ; } extern "C" { pub fn nvttSetInputOptionsAlphaMode ( inputOptions : * mut NvttInputOptions , alphaMode : NvttAlphaMode ) ; } extern "C" { pub fn nvttSetInputOptionsGamma ( inputOptions : * mut NvttInputOptions , inputGamma : f32 , outputGamma : f32 ) ; } extern "C" { pub fn nvttSetInputOptionsWrapMode ( inputOptions : * mut NvttInputOptions , mode : NvttWrapMode ) ; } extern "C" { pub fn nvttSetInputOptionsMipmapFilter ( inputOptions : * mut NvttInputOptions , filter : NvttMipmapFilter ) ; } extern "C" { pub fn nvttSetInputOptionsMipmapGeneration ( inputOptions : * mut NvttInputOptions , enabled : NvttBoolean , maxLevel : libc :: c_int ) ; } extern "C" { pub fn nvttSetInputOptionsKaiserParameters ( inputOptions : * mut NvttInputOptions , width : f32 , alpha : f32 , stretch : f32 ) ; } extern "C" { pub fn nvttSetInputOptionsNormalMap ( inputOptions : * mut NvttInputOptions , b : NvttBoolean ) ; } extern "C" { pub fn nvttSetInputOptionsConvertToNormalMap ( inputOptions : * mut NvttInputOptions , convert : NvttBoolean ) ; } extern "C" { pub fn nvttSetInputOptionsHeightEvaluation ( inputOptions : * mut NvttInputOptions , redScale : f32 , greenScale : f32 , blueScale : f32 , alphaScale : f32 ) ; } extern "C" { pub fn nvttSetInputOptionsNormalFilter ( inputOptions : * mut NvttInputOptions , sm : f32 , medium : f32 , big : f32 , large : f32 ) ; } extern "C" { pub fn nvttSetInputOptionsNormalizeMipmaps ( inputOptions : * mut NvttInputOptions , b : NvttBoolean ) ; } extern "C" { pub fn nvttSetInputOptionsMaxExtents ( inputOptions : * mut NvttInputOptions , dim : libc :: c_int ) ; } extern "C" { pub fn nvttSetInputOptionsRoundMode ( inputOptions : * mut NvttInputOptions , mode : NvttRoundMode ) ; } extern "C" { pub fn nvttCreateCompressionOptions ( ) -> * mut NvttCompressionOptions ; } extern "C" { pub fn nvttDestroyCompressionOptions ( compressionOptions : * mut NvttCompressionOptions ) ; } extern "C" { pub fn nvttSetCompressionOptionsFormat ( compressionOptions : * mut NvttCompressionOptions , format : NvttFormat ) ; } extern "C" { pub fn nvttSetCompressionOptionsQuality ( compressionOptions : * mut NvttCompressionOptions , quality : NvttQuality ) ; } extern "C" { pub fn nvttSetCompressionOptionsColorWeights ( compressionOptions : * mut NvttCompressionOptions , red : f32 , green : f32 , blue : f32 , alpha : f32 ) ; } extern "C" { pub fn nvttSetCompressionOptionsPixelFormat ( compressionOptions : * mut NvttCompressionOptions , bitcount : libc :: c_uint , rmask : libc :: c_uint , gmask : libc :: c_uint , bmask : libc :: c_uint , amask : libc :: c_uint ) ; } extern "C" { pub fn nvttSetCompressionOptionsQuantization ( compressionOptions : * mut NvttCompressionOptions , colorDithering : NvttBoolean , alphaDithering : NvttBoolean , binaryAlpha : NvttBoolean , alphaThreshold : libc :: c_int ) ; } extern "C" { pub fn nvttCreateOutputOptions ( ) -> * mut NvttOutputOptions ; } extern "C" { pub fn nvttDestroyOutputOptions ( outputOptions : * mut NvttOutputOptions ) ; } extern "C" { pub fn nvttSetOutputOptionsFileName ( outputOptions : * mut NvttOutputOptions , fileName : * const libc :: c_char ) ; } extern "C" { pub fn nvttSetOutputOptionsOutputHeader ( outputOptions : * mut NvttOutputOptions , b : NvttBoolean ) ; } extern "C" { pub fn nvttSetOutputOptionsContainer ( outputOptions : * mut NvttOutputOptions , containerFormat : NvttContainer ) ; } extern "C" { pub fn nvttSetOutputOptionsSrgbFlag ( outputOptions : * mut NvttOutputOptions , b : NvttBoolean ) ; } extern "C" { pub fn nvttSetOutputOptionsErrorHandler ( outputOptions : * mut NvttOutputOptions , errorHandler : nvttErrorHandler ) ; } extern "C" { pub fn nvttSetOutputOptionsOutputHandler ( outputOptions : * mut NvttOutputOptions , beginImageHandler : nvttBeginImageHandler , outputHandler : nvttOutputHandler , endImageHandler : nvttEndImageHandler ) ; } extern "C" { pub fn nvttCreateCompressor ( ) -> * mut NvttCompressor ; } extern "C" { pub fn nvttDestroyCompressor ( compressor : * mut NvttCompressor ) ; } extern "C" { pub fn nvttEnableCudaAcceleration ( compressor : * mut NvttCompressor , b : NvttBoolean ) ; } extern "C" { pub fn nvttIsCudaAccelerationEnabled ( compressor : * const NvttCompressor ) -> NvttBoolean ; } extern "C" { pub fn nvttCompress ( compressor : * const NvttCompressor , inputOptions : * const NvttInputOptions , compressionOptions : * const NvttCompressionOptions , outputOptions : * const NvttOutputOptions ) -> NvttBoolean ; } extern "C" { pub fn nvttEstimateSize ( compressor : * const NvttCompressor , inputOptions : * const NvttInputOptions , compressionOptions : * const NvttCompressionOptions ) -> libc :: c_int ; } extern "C" { pub fn nvttErrorString ( e : NvttError ) -> * const libc :: c_char ; } extern "C" { pub fn nvttVersion ( ) -> libc :: c_uint ; }