libktx_rs_sys/
ffi.rs

1/* automatically generated by rust-bindgen 0.58.1 */
2
3pub type ktx_size_t = usize;
4#[cfg(target_os = "windows")]
5pub type ktx_off_t = i64;
6#[cfg(not(target_os = "windows"))]
7pub type ktx_off_t = isize;
8
9#[repr(C)]
10pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
11impl<T> __BindgenUnionField<T> {
12    #[inline]
13    pub const fn new() -> Self {
14        __BindgenUnionField(::std::marker::PhantomData)
15    }
16    #[inline]
17    pub unsafe fn as_ref(&self) -> &T {
18        ::std::mem::transmute(self)
19    }
20    #[inline]
21    pub unsafe fn as_mut(&mut self) -> &mut T {
22        ::std::mem::transmute(self)
23    }
24}
25impl<T> ::std::default::Default for __BindgenUnionField<T> {
26    #[inline]
27    fn default() -> Self {
28        Self::new()
29    }
30}
31impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
32    #[inline]
33    fn clone(&self) -> Self {
34        Self::new()
35    }
36}
37impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
38impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
39    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
40        fmt.write_str("__BindgenUnionField")
41    }
42}
43impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
44    fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
45}
46impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
47    fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
48        true
49    }
50}
51impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
52pub const KTX_ANIMDATA_KEY: &'static [u8; 12usize] = b"KTXanimData\0";
53pub const KTX_ORIENTATION_KEY: &'static [u8; 15usize] = b"KTXorientation\0";
54pub const KTX_SWIZZLE_KEY: &'static [u8; 11usize] = b"KTXswizzle\0";
55pub const KTX_WRITER_KEY: &'static [u8; 10usize] = b"KTXwriter\0";
56pub const KTX_WRITER_SCPARAMS_KEY: &'static [u8; 18usize] = b"KTXwriterScParams\0";
57pub const KTX_ORIENTATION1_FMT: &'static [u8; 5usize] = b"S=%c\0";
58pub const KTX_ORIENTATION2_FMT: &'static [u8; 10usize] = b"S=%c,T=%c\0";
59pub const KTX_ORIENTATION3_FMT: &'static [u8; 15usize] = b"S=%c,T=%c,R=%c\0";
60pub const KTX_GL_UNPACK_ALIGNMENT: u32 = 4;
61pub const KTX_TRUE: u32 = 1;
62pub const KTX_FALSE: u32 = 0;
63pub const KTX_ENDIAN_REF: u32 = 67305985;
64pub const KTX_ENDIAN_REF_REV: u32 = 16909060;
65pub const KTX_HEADER_SIZE: u32 = 64;
66pub type size_t = ::std::os::raw::c_ulong;
67pub type __int16_t = ::std::os::raw::c_short;
68pub type __uint16_t = ::std::os::raw::c_ushort;
69pub type __int32_t = ::std::os::raw::c_int;
70pub type __uint32_t = ::std::os::raw::c_uint;
71pub type __int64_t = ::std::os::raw::c_long;
72pub type __uint64_t = ::std::os::raw::c_ulong;
73pub type __off_t = ::std::os::raw::c_long;
74pub type FILE = [u64; 27usize];
75pub type off_t = __off_t;
76#[doc = " To avoid including <KHR/khrplatform.h> define our own types."]
77pub type ktx_uint8_t = ::std::os::raw::c_uchar;
78pub type ktx_bool_t = bool;
79pub type ktx_uint16_t = u16;
80pub type ktx_int16_t = i16;
81pub type ktx_uint32_t = u32;
82pub type ktx_int32_t = i32;
83pub type ktx_uint64_t = u64;
84pub type ktx_int64_t = i64;
85#[doc = " This will cause compilation to fail if size of uint32 != 4."]
86pub type ktx_uint32_t_SIZE_ASSERT = [::std::os::raw::c_uchar; 1usize];
87pub type GLenum = ::std::os::raw::c_uint;
88pub type GLuint = ::std::os::raw::c_uint;
89#[doc = "< Operation was successful."]
90pub const ktx_error_code_e_KTX_SUCCESS: ktx_error_code_e = 0;
91#[doc = "< The data in the file is inconsistent with the spec."]
92pub const ktx_error_code_e_KTX_FILE_DATA_ERROR: ktx_error_code_e = 1;
93#[doc = "< The file is a pipe or named pipe."]
94pub const ktx_error_code_e_KTX_FILE_ISPIPE: ktx_error_code_e = 2;
95#[doc = "< The target file could not be opened."]
96pub const ktx_error_code_e_KTX_FILE_OPEN_FAILED: ktx_error_code_e = 3;
97#[doc = "< The operation would exceed the max file size."]
98pub const ktx_error_code_e_KTX_FILE_OVERFLOW: ktx_error_code_e = 4;
99#[doc = "< An error occurred while reading from the file."]
100pub const ktx_error_code_e_KTX_FILE_READ_ERROR: ktx_error_code_e = 5;
101#[doc = "< An error occurred while seeking in the file."]
102pub const ktx_error_code_e_KTX_FILE_SEEK_ERROR: ktx_error_code_e = 6;
103#[doc = "< File does not have enough data to satisfy request."]
104pub const ktx_error_code_e_KTX_FILE_UNEXPECTED_EOF: ktx_error_code_e = 7;
105#[doc = "< An error occurred while writing to the file."]
106pub const ktx_error_code_e_KTX_FILE_WRITE_ERROR: ktx_error_code_e = 8;
107#[doc = "< GL operations resulted in an error."]
108pub const ktx_error_code_e_KTX_GL_ERROR: ktx_error_code_e = 9;
109#[doc = "< The operation is not allowed in the current state."]
110pub const ktx_error_code_e_KTX_INVALID_OPERATION: ktx_error_code_e = 10;
111#[doc = "< A parameter value was not valid"]
112pub const ktx_error_code_e_KTX_INVALID_VALUE: ktx_error_code_e = 11;
113#[doc = "< Requested key was not found"]
114pub const ktx_error_code_e_KTX_NOT_FOUND: ktx_error_code_e = 12;
115#[doc = "< Not enough memory to complete the operation."]
116pub const ktx_error_code_e_KTX_OUT_OF_MEMORY: ktx_error_code_e = 13;
117#[doc = "< Transcoding of block compressed texture failed."]
118pub const ktx_error_code_e_KTX_TRANSCODE_FAILED: ktx_error_code_e = 14;
119#[doc = "< The file not a KTX file"]
120pub const ktx_error_code_e_KTX_UNKNOWN_FILE_FORMAT: ktx_error_code_e = 15;
121#[doc = "< The KTX file specifies an unsupported texture type."]
122pub const ktx_error_code_e_KTX_UNSUPPORTED_TEXTURE_TYPE: ktx_error_code_e = 16;
123#[doc = "< Feature not included in in-use library or not yet implemented."]
124pub const ktx_error_code_e_KTX_UNSUPPORTED_FEATURE: ktx_error_code_e = 17;
125#[doc = "< Library dependency (OpenGL or Vulkan) not linked into application."]
126pub const ktx_error_code_e_KTX_LIBRARY_NOT_LINKED: ktx_error_code_e = 18;
127#[doc = "< For safety checks."]
128pub const ktx_error_code_e_KTX_ERROR_MAX_ENUM: ktx_error_code_e = 18;
129#[doc = " @~English"]
130#[doc = " @brief Error codes returned by library functions."]
131pub type ktx_error_code_e = ::std::os::raw::c_uint;
132#[doc = " @~English"]
133#[doc = " @brief Result codes returned by library functions."]
134pub use self::ktx_error_code_e as ktxResult;
135#[repr(C)]
136#[derive(Debug, Copy, Clone)]
137pub struct ktxKVListEntry {
138    _unused: [u8; 0],
139}
140#[doc = " @class ktxHashList"]
141#[doc = " @~English"]
142#[doc = " @brief Opaque handle to a ktxHashList."]
143pub type ktxHashList = *mut ktxKVListEntry;
144#[doc = " @class ktxHashListEntry"]
145#[doc = " @~English"]
146#[doc = " @brief Opaque handle to an entry in a @ref ktxHashList."]
147pub type ktxHashListEntry = ktxKVListEntry;
148pub const ktxOrientationX_KTX_ORIENT_X_LEFT: ktxOrientationX = 108;
149pub const ktxOrientationX_KTX_ORIENT_X_RIGHT: ktxOrientationX = 114;
150pub type ktxOrientationX = ::std::os::raw::c_uint;
151pub const ktxOrientationY_KTX_ORIENT_Y_UP: ktxOrientationY = 117;
152pub const ktxOrientationY_KTX_ORIENT_Y_DOWN: ktxOrientationY = 100;
153pub type ktxOrientationY = ::std::os::raw::c_uint;
154pub const ktxOrientationZ_KTX_ORIENT_Z_IN: ktxOrientationZ = 105;
155pub const ktxOrientationZ_KTX_ORIENT_Z_OUT: ktxOrientationZ = 111;
156pub type ktxOrientationZ = ::std::os::raw::c_uint;
157pub const class_id_ktxTexture1_c: class_id = 1;
158pub const class_id_ktxTexture2_c: class_id = 2;
159pub type class_id = ::std::os::raw::c_uint;
160#[doc = " @~English"]
161#[doc = " @brief Struct describing the logical orientation of an image."]
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct ktxOrientation {
165    #[doc = "< Orientation in X"]
166    pub x: ktxOrientationX,
167    #[doc = "< Orientation in Y"]
168    pub y: ktxOrientationY,
169    #[doc = "< Orientation in Z"]
170    pub z: ktxOrientationZ,
171}
172#[test]
173fn bindgen_test_layout_ktxOrientation() {
174    assert_eq!(
175        ::std::mem::size_of::<ktxOrientation>(),
176        12usize,
177        concat!("Size of: ", stringify!(ktxOrientation))
178    );
179    assert_eq!(
180        ::std::mem::align_of::<ktxOrientation>(),
181        4usize,
182        concat!("Alignment of ", stringify!(ktxOrientation))
183    );
184    assert_eq!(
185        unsafe { &(*(::std::ptr::null::<ktxOrientation>())).x as *const _ as usize },
186        0usize,
187        concat!(
188            "Offset of field: ",
189            stringify!(ktxOrientation),
190            "::",
191            stringify!(x)
192        )
193    );
194    assert_eq!(
195        unsafe { &(*(::std::ptr::null::<ktxOrientation>())).y as *const _ as usize },
196        4usize,
197        concat!(
198            "Offset of field: ",
199            stringify!(ktxOrientation),
200            "::",
201            stringify!(y)
202        )
203    );
204    assert_eq!(
205        unsafe { &(*(::std::ptr::null::<ktxOrientation>())).z as *const _ as usize },
206        8usize,
207        concat!(
208            "Offset of field: ",
209            stringify!(ktxOrientation),
210            "::",
211            stringify!(z)
212        )
213    );
214}
215#[doc = " @class ktxTexture"]
216#[doc = " @~English"]
217#[doc = " @brief Base class representing a texture."]
218#[doc = ""]
219#[doc = " ktxTextures should be created only by one of the provided"]
220#[doc = " functions and these fields should be considered read-only."]
221#[repr(C)]
222pub struct ktxTexture {
223    pub classId: class_id,
224    pub vtbl: *mut ktxTexture_vtbl,
225    pub vvtbl: *mut ktxTexture_vvtbl,
226    pub _protected: *mut ktxTexture_protected,
227    pub isArray: ktx_bool_t,
228    pub isCubemap: ktx_bool_t,
229    pub isCompressed: ktx_bool_t,
230    pub generateMipmaps: ktx_bool_t,
231    pub baseWidth: ktx_uint32_t,
232    pub baseHeight: ktx_uint32_t,
233    pub baseDepth: ktx_uint32_t,
234    pub numDimensions: ktx_uint32_t,
235    pub numLevels: ktx_uint32_t,
236    pub numLayers: ktx_uint32_t,
237    pub numFaces: ktx_uint32_t,
238    pub orientation: ktxOrientation,
239    pub kvDataHead: ktxHashList,
240    pub kvDataLen: ktx_uint32_t,
241    pub kvData: *mut ktx_uint8_t,
242    pub dataSize: ktx_size_t,
243    pub pData: *mut ktx_uint8_t,
244}
245#[test]
246fn bindgen_test_layout_ktxTexture() {
247    assert_eq!(
248        ::std::mem::size_of::<ktxTexture>(),
249        120usize,
250        concat!("Size of: ", stringify!(ktxTexture))
251    );
252    assert_eq!(
253        ::std::mem::align_of::<ktxTexture>(),
254        8usize,
255        concat!("Alignment of ", stringify!(ktxTexture))
256    );
257    assert_eq!(
258        unsafe { &(*(::std::ptr::null::<ktxTexture>())).classId as *const _ as usize },
259        0usize,
260        concat!(
261            "Offset of field: ",
262            stringify!(ktxTexture),
263            "::",
264            stringify!(classId)
265        )
266    );
267    assert_eq!(
268        unsafe { &(*(::std::ptr::null::<ktxTexture>())).vtbl as *const _ as usize },
269        8usize,
270        concat!(
271            "Offset of field: ",
272            stringify!(ktxTexture),
273            "::",
274            stringify!(vtbl)
275        )
276    );
277    assert_eq!(
278        unsafe { &(*(::std::ptr::null::<ktxTexture>())).vvtbl as *const _ as usize },
279        16usize,
280        concat!(
281            "Offset of field: ",
282            stringify!(ktxTexture),
283            "::",
284            stringify!(vvtbl)
285        )
286    );
287    assert_eq!(
288        unsafe { &(*(::std::ptr::null::<ktxTexture>()))._protected as *const _ as usize },
289        24usize,
290        concat!(
291            "Offset of field: ",
292            stringify!(ktxTexture),
293            "::",
294            stringify!(_protected)
295        )
296    );
297    assert_eq!(
298        unsafe { &(*(::std::ptr::null::<ktxTexture>())).isArray as *const _ as usize },
299        32usize,
300        concat!(
301            "Offset of field: ",
302            stringify!(ktxTexture),
303            "::",
304            stringify!(isArray)
305        )
306    );
307    assert_eq!(
308        unsafe { &(*(::std::ptr::null::<ktxTexture>())).isCubemap as *const _ as usize },
309        33usize,
310        concat!(
311            "Offset of field: ",
312            stringify!(ktxTexture),
313            "::",
314            stringify!(isCubemap)
315        )
316    );
317    assert_eq!(
318        unsafe { &(*(::std::ptr::null::<ktxTexture>())).isCompressed as *const _ as usize },
319        34usize,
320        concat!(
321            "Offset of field: ",
322            stringify!(ktxTexture),
323            "::",
324            stringify!(isCompressed)
325        )
326    );
327    assert_eq!(
328        unsafe { &(*(::std::ptr::null::<ktxTexture>())).generateMipmaps as *const _ as usize },
329        35usize,
330        concat!(
331            "Offset of field: ",
332            stringify!(ktxTexture),
333            "::",
334            stringify!(generateMipmaps)
335        )
336    );
337    assert_eq!(
338        unsafe { &(*(::std::ptr::null::<ktxTexture>())).baseWidth as *const _ as usize },
339        36usize,
340        concat!(
341            "Offset of field: ",
342            stringify!(ktxTexture),
343            "::",
344            stringify!(baseWidth)
345        )
346    );
347    assert_eq!(
348        unsafe { &(*(::std::ptr::null::<ktxTexture>())).baseHeight as *const _ as usize },
349        40usize,
350        concat!(
351            "Offset of field: ",
352            stringify!(ktxTexture),
353            "::",
354            stringify!(baseHeight)
355        )
356    );
357    assert_eq!(
358        unsafe { &(*(::std::ptr::null::<ktxTexture>())).baseDepth as *const _ as usize },
359        44usize,
360        concat!(
361            "Offset of field: ",
362            stringify!(ktxTexture),
363            "::",
364            stringify!(baseDepth)
365        )
366    );
367    assert_eq!(
368        unsafe { &(*(::std::ptr::null::<ktxTexture>())).numDimensions as *const _ as usize },
369        48usize,
370        concat!(
371            "Offset of field: ",
372            stringify!(ktxTexture),
373            "::",
374            stringify!(numDimensions)
375        )
376    );
377    assert_eq!(
378        unsafe { &(*(::std::ptr::null::<ktxTexture>())).numLevels as *const _ as usize },
379        52usize,
380        concat!(
381            "Offset of field: ",
382            stringify!(ktxTexture),
383            "::",
384            stringify!(numLevels)
385        )
386    );
387    assert_eq!(
388        unsafe { &(*(::std::ptr::null::<ktxTexture>())).numLayers as *const _ as usize },
389        56usize,
390        concat!(
391            "Offset of field: ",
392            stringify!(ktxTexture),
393            "::",
394            stringify!(numLayers)
395        )
396    );
397    assert_eq!(
398        unsafe { &(*(::std::ptr::null::<ktxTexture>())).numFaces as *const _ as usize },
399        60usize,
400        concat!(
401            "Offset of field: ",
402            stringify!(ktxTexture),
403            "::",
404            stringify!(numFaces)
405        )
406    );
407    assert_eq!(
408        unsafe { &(*(::std::ptr::null::<ktxTexture>())).orientation as *const _ as usize },
409        64usize,
410        concat!(
411            "Offset of field: ",
412            stringify!(ktxTexture),
413            "::",
414            stringify!(orientation)
415        )
416    );
417    assert_eq!(
418        unsafe { &(*(::std::ptr::null::<ktxTexture>())).kvDataHead as *const _ as usize },
419        80usize,
420        concat!(
421            "Offset of field: ",
422            stringify!(ktxTexture),
423            "::",
424            stringify!(kvDataHead)
425        )
426    );
427    assert_eq!(
428        unsafe { &(*(::std::ptr::null::<ktxTexture>())).kvDataLen as *const _ as usize },
429        88usize,
430        concat!(
431            "Offset of field: ",
432            stringify!(ktxTexture),
433            "::",
434            stringify!(kvDataLen)
435        )
436    );
437    assert_eq!(
438        unsafe { &(*(::std::ptr::null::<ktxTexture>())).kvData as *const _ as usize },
439        96usize,
440        concat!(
441            "Offset of field: ",
442            stringify!(ktxTexture),
443            "::",
444            stringify!(kvData)
445        )
446    );
447    assert_eq!(
448        unsafe { &(*(::std::ptr::null::<ktxTexture>())).dataSize as *const _ as usize },
449        104usize,
450        concat!(
451            "Offset of field: ",
452            stringify!(ktxTexture),
453            "::",
454            stringify!(dataSize)
455        )
456    );
457    assert_eq!(
458        unsafe { &(*(::std::ptr::null::<ktxTexture>())).pData as *const _ as usize },
459        112usize,
460        concat!(
461            "Offset of field: ",
462            stringify!(ktxTexture),
463            "::",
464            stringify!(pData)
465        )
466    );
467}
468#[doc = " @memberof ktxTexture"]
469#[doc = " @~English"]
470#[doc = " @brief Signature of function called by the <tt>ktxTexture_Iterate*</tt>"]
471#[doc = "        functions to receive image data."]
472#[doc = ""]
473#[doc = " The function parameters are used to pass values which change for each image."]
474#[doc = " Obtain values which are uniform across all images from the @c ktxTexture"]
475#[doc = " object."]
476#[doc = ""]
477#[doc = " @param [in] miplevel        MIP level from 0 to the max level which is"]
478#[doc = "                             dependent on the texture size."]
479#[doc = " @param [in] face            usually 0; for cube maps, one of the 6 cube"]
480#[doc = "                             faces in the order +X, -X, +Y, -Y, +Z, -Z,"]
481#[doc = "                             0 to 5."]
482#[doc = " @param [in] width           width of the image."]
483#[doc = " @param [in] height          height of the image or, for 1D textures"]
484#[doc = "                             textures, 1."]
485#[doc = " @param [in] depth           depth of the image or, for 1D & 2D"]
486#[doc = "                             textures, 1."]
487#[doc = " @param [in] faceLodSize     number of bytes of data pointed at by"]
488#[doc = "                             @p pixels."]
489#[doc = " @param [in] pixels          pointer to the image data."]
490#[doc = " @param [in,out] userdata    pointer for the application to pass data to and"]
491#[doc = "                             from the callback function."]
492pub type PFNKTXITERCB = ::std::option::Option<
493    unsafe extern "C" fn(
494        miplevel: ::std::os::raw::c_int,
495        face: ::std::os::raw::c_int,
496        width: ::std::os::raw::c_int,
497        height: ::std::os::raw::c_int,
498        depth: ::std::os::raw::c_int,
499        faceLodSize: ktx_uint64_t,
500        pixels: *mut ::std::os::raw::c_void,
501        userdata: *mut ::std::os::raw::c_void,
502    ) -> ktx_error_code_e,
503>;
504#[doc = " Don't use KTX_APIENTRYP to avoid a Doxygen bug."]
505pub type PFNKTEXDESTROY = ::std::option::Option<unsafe extern "C" fn(This: *mut ktxTexture)>;
506pub type PFNKTEXGETIMAGEOFFSET = ::std::option::Option<
507    unsafe extern "C" fn(
508        This: *mut ktxTexture,
509        level: ktx_uint32_t,
510        layer: ktx_uint32_t,
511        faceSlice: ktx_uint32_t,
512        pOffset: *mut ktx_size_t,
513    ) -> ktx_error_code_e,
514>;
515pub type PFNKTEXGETDATASIZEUNCOMPRESSED =
516    ::std::option::Option<unsafe extern "C" fn(This: *mut ktxTexture) -> ktx_size_t>;
517pub type PFNKTEXGETIMAGESIZE = ::std::option::Option<
518    unsafe extern "C" fn(This: *mut ktxTexture, level: ktx_uint32_t) -> ktx_size_t,
519>;
520pub type PFNKTEXITERATELEVELS = ::std::option::Option<
521    unsafe extern "C" fn(
522        This: *mut ktxTexture,
523        iterCb: PFNKTXITERCB,
524        userdata: *mut ::std::os::raw::c_void,
525    ) -> ktx_error_code_e,
526>;
527pub type PFNKTEXITERATELOADLEVELFACES = ::std::option::Option<
528    unsafe extern "C" fn(
529        This: *mut ktxTexture,
530        iterCb: PFNKTXITERCB,
531        userdata: *mut ::std::os::raw::c_void,
532    ) -> ktx_error_code_e,
533>;
534pub type PFNKTEXLOADIMAGEDATA = ::std::option::Option<
535    unsafe extern "C" fn(
536        This: *mut ktxTexture,
537        pBuffer: *mut ktx_uint8_t,
538        bufSize: ktx_size_t,
539    ) -> ktx_error_code_e,
540>;
541pub type PFNKTEXNEEDSTRANSCODING =
542    ::std::option::Option<unsafe extern "C" fn(This: *mut ktxTexture) -> ktx_bool_t>;
543pub type PFNKTEXSETIMAGEFROMMEMORY = ::std::option::Option<
544    unsafe extern "C" fn(
545        This: *mut ktxTexture,
546        level: ktx_uint32_t,
547        layer: ktx_uint32_t,
548        faceSlice: ktx_uint32_t,
549        src: *const ktx_uint8_t,
550        srcSize: ktx_size_t,
551    ) -> ktx_error_code_e,
552>;
553pub type PFNKTEXSETIMAGEFROMSTDIOSTREAM = ::std::option::Option<
554    unsafe extern "C" fn(
555        This: *mut ktxTexture,
556        level: ktx_uint32_t,
557        layer: ktx_uint32_t,
558        faceSlice: ktx_uint32_t,
559        src: *mut FILE,
560        srcSize: ktx_size_t,
561    ) -> ktx_error_code_e,
562>;
563pub type PFNKTEXWRITETOSTDIOSTREAM = ::std::option::Option<
564    unsafe extern "C" fn(This: *mut ktxTexture, dstsstr: *mut FILE) -> ktx_error_code_e,
565>;
566pub type PFNKTEXWRITETONAMEDFILE = ::std::option::Option<
567    unsafe extern "C" fn(
568        This: *mut ktxTexture,
569        dstname: *const ::std::os::raw::c_char,
570    ) -> ktx_error_code_e,
571>;
572pub type PFNKTEXWRITETOMEMORY = ::std::option::Option<
573    unsafe extern "C" fn(
574        This: *mut ktxTexture,
575        bytes: *mut *mut ktx_uint8_t,
576        size: *mut ktx_size_t,
577    ) -> ktx_error_code_e,
578>;
579pub type PFNKTEXWRITETOSTREAM = ::std::option::Option<
580    unsafe extern "C" fn(This: *mut ktxTexture, dststr: *mut ktxStream) -> ktx_error_code_e,
581>;
582#[doc = " @memberof ktxTexture"]
583#[doc = " @~English"]
584#[doc = " @brief Table of virtual ktxTexture methods."]
585#[repr(C)]
586#[derive(Debug, Copy, Clone)]
587pub struct ktxTexture_vtbl {
588    pub Destroy: PFNKTEXDESTROY,
589    pub GetImageOffset: PFNKTEXGETIMAGEOFFSET,
590    pub GetDataSizeUncompressed: PFNKTEXGETDATASIZEUNCOMPRESSED,
591    pub GetImageSize: PFNKTEXGETIMAGESIZE,
592    pub IterateLevels: PFNKTEXITERATELEVELS,
593    pub IterateLoadLevelFaces: PFNKTEXITERATELOADLEVELFACES,
594    pub NeedsTranscoding: PFNKTEXNEEDSTRANSCODING,
595    pub LoadImageData: PFNKTEXLOADIMAGEDATA,
596    pub SetImageFromMemory: PFNKTEXSETIMAGEFROMMEMORY,
597    pub SetImageFromStdioStream: PFNKTEXSETIMAGEFROMSTDIOSTREAM,
598    pub WriteToStdioStream: PFNKTEXWRITETOSTDIOSTREAM,
599    pub WriteToNamedFile: PFNKTEXWRITETONAMEDFILE,
600    pub WriteToMemory: PFNKTEXWRITETOMEMORY,
601    pub WriteToStream: PFNKTEXWRITETOSTREAM,
602}
603#[test]
604fn bindgen_test_layout_ktxTexture_vtbl() {
605    assert_eq!(
606        ::std::mem::size_of::<ktxTexture_vtbl>(),
607        112usize,
608        concat!("Size of: ", stringify!(ktxTexture_vtbl))
609    );
610    assert_eq!(
611        ::std::mem::align_of::<ktxTexture_vtbl>(),
612        8usize,
613        concat!("Alignment of ", stringify!(ktxTexture_vtbl))
614    );
615    assert_eq!(
616        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).Destroy as *const _ as usize },
617        0usize,
618        concat!(
619            "Offset of field: ",
620            stringify!(ktxTexture_vtbl),
621            "::",
622            stringify!(Destroy)
623        )
624    );
625    assert_eq!(
626        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).GetImageOffset as *const _ as usize },
627        8usize,
628        concat!(
629            "Offset of field: ",
630            stringify!(ktxTexture_vtbl),
631            "::",
632            stringify!(GetImageOffset)
633        )
634    );
635    assert_eq!(
636        unsafe {
637            &(*(::std::ptr::null::<ktxTexture_vtbl>())).GetDataSizeUncompressed as *const _ as usize
638        },
639        16usize,
640        concat!(
641            "Offset of field: ",
642            stringify!(ktxTexture_vtbl),
643            "::",
644            stringify!(GetDataSizeUncompressed)
645        )
646    );
647    assert_eq!(
648        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).GetImageSize as *const _ as usize },
649        24usize,
650        concat!(
651            "Offset of field: ",
652            stringify!(ktxTexture_vtbl),
653            "::",
654            stringify!(GetImageSize)
655        )
656    );
657    assert_eq!(
658        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).IterateLevels as *const _ as usize },
659        32usize,
660        concat!(
661            "Offset of field: ",
662            stringify!(ktxTexture_vtbl),
663            "::",
664            stringify!(IterateLevels)
665        )
666    );
667    assert_eq!(
668        unsafe {
669            &(*(::std::ptr::null::<ktxTexture_vtbl>())).IterateLoadLevelFaces as *const _ as usize
670        },
671        40usize,
672        concat!(
673            "Offset of field: ",
674            stringify!(ktxTexture_vtbl),
675            "::",
676            stringify!(IterateLoadLevelFaces)
677        )
678    );
679    assert_eq!(
680        unsafe {
681            &(*(::std::ptr::null::<ktxTexture_vtbl>())).NeedsTranscoding as *const _ as usize
682        },
683        48usize,
684        concat!(
685            "Offset of field: ",
686            stringify!(ktxTexture_vtbl),
687            "::",
688            stringify!(NeedsTranscoding)
689        )
690    );
691    assert_eq!(
692        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).LoadImageData as *const _ as usize },
693        56usize,
694        concat!(
695            "Offset of field: ",
696            stringify!(ktxTexture_vtbl),
697            "::",
698            stringify!(LoadImageData)
699        )
700    );
701    assert_eq!(
702        unsafe {
703            &(*(::std::ptr::null::<ktxTexture_vtbl>())).SetImageFromMemory as *const _ as usize
704        },
705        64usize,
706        concat!(
707            "Offset of field: ",
708            stringify!(ktxTexture_vtbl),
709            "::",
710            stringify!(SetImageFromMemory)
711        )
712    );
713    assert_eq!(
714        unsafe {
715            &(*(::std::ptr::null::<ktxTexture_vtbl>())).SetImageFromStdioStream as *const _ as usize
716        },
717        72usize,
718        concat!(
719            "Offset of field: ",
720            stringify!(ktxTexture_vtbl),
721            "::",
722            stringify!(SetImageFromStdioStream)
723        )
724    );
725    assert_eq!(
726        unsafe {
727            &(*(::std::ptr::null::<ktxTexture_vtbl>())).WriteToStdioStream as *const _ as usize
728        },
729        80usize,
730        concat!(
731            "Offset of field: ",
732            stringify!(ktxTexture_vtbl),
733            "::",
734            stringify!(WriteToStdioStream)
735        )
736    );
737    assert_eq!(
738        unsafe {
739            &(*(::std::ptr::null::<ktxTexture_vtbl>())).WriteToNamedFile as *const _ as usize
740        },
741        88usize,
742        concat!(
743            "Offset of field: ",
744            stringify!(ktxTexture_vtbl),
745            "::",
746            stringify!(WriteToNamedFile)
747        )
748    );
749    assert_eq!(
750        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).WriteToMemory as *const _ as usize },
751        96usize,
752        concat!(
753            "Offset of field: ",
754            stringify!(ktxTexture_vtbl),
755            "::",
756            stringify!(WriteToMemory)
757        )
758    );
759    assert_eq!(
760        unsafe { &(*(::std::ptr::null::<ktxTexture_vtbl>())).WriteToStream as *const _ as usize },
761        104usize,
762        concat!(
763            "Offset of field: ",
764            stringify!(ktxTexture_vtbl),
765            "::",
766            stringify!(WriteToStream)
767        )
768    );
769}
770#[doc = " @class ktxTexture1"]
771#[doc = " @~English"]
772#[doc = " @brief Class representing a KTX version 1 format texture."]
773#[doc = ""]
774#[doc = " ktxTextures should be created only by one of the ktxTexture_Create*"]
775#[doc = " functions and these fields should be considered read-only."]
776#[repr(C)]
777pub struct ktxTexture1 {
778    pub classId: class_id,
779    pub vtbl: *mut ktxTexture_vtbl,
780    pub vvtbl: *mut ktxTexture_vvtbl,
781    pub _protected: *mut ktxTexture_protected,
782    pub isArray: ktx_bool_t,
783    pub isCubemap: ktx_bool_t,
784    pub isCompressed: ktx_bool_t,
785    pub generateMipmaps: ktx_bool_t,
786    pub baseWidth: ktx_uint32_t,
787    pub baseHeight: ktx_uint32_t,
788    pub baseDepth: ktx_uint32_t,
789    pub numDimensions: ktx_uint32_t,
790    pub numLevels: ktx_uint32_t,
791    pub numLayers: ktx_uint32_t,
792    pub numFaces: ktx_uint32_t,
793    pub orientation: ktxOrientation,
794    pub kvDataHead: ktxHashList,
795    pub kvDataLen: ktx_uint32_t,
796    pub kvData: *mut ktx_uint8_t,
797    pub dataSize: ktx_size_t,
798    pub pData: *mut ktx_uint8_t,
799    #[doc = "< Format of the texture data, e.g., GL_RGB."]
800    pub glFormat: ktx_uint32_t,
801    #[doc = "< Internal format of the texture data,"]
802    #[doc = "e.g., GL_RGB8."]
803    pub glInternalformat: ktx_uint32_t,
804    #[doc = "< Base format of the texture data,"]
805    #[doc = "e.g., GL_RGB."]
806    pub glBaseInternalformat: ktx_uint32_t,
807    #[doc = "< Type of the texture data, e.g, GL_UNSIGNED_BYTE."]
808    pub glType: ktx_uint32_t,
809    #[doc = "< Private data."]
810    pub _private: *mut ktxTexture1_private,
811}
812#[test]
813fn bindgen_test_layout_ktxTexture1() {
814    assert_eq!(
815        ::std::mem::size_of::<ktxTexture1>(),
816        144usize,
817        concat!("Size of: ", stringify!(ktxTexture1))
818    );
819    assert_eq!(
820        ::std::mem::align_of::<ktxTexture1>(),
821        8usize,
822        concat!("Alignment of ", stringify!(ktxTexture1))
823    );
824    assert_eq!(
825        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).classId as *const _ as usize },
826        0usize,
827        concat!(
828            "Offset of field: ",
829            stringify!(ktxTexture1),
830            "::",
831            stringify!(classId)
832        )
833    );
834    assert_eq!(
835        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).vtbl as *const _ as usize },
836        8usize,
837        concat!(
838            "Offset of field: ",
839            stringify!(ktxTexture1),
840            "::",
841            stringify!(vtbl)
842        )
843    );
844    assert_eq!(
845        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).vvtbl as *const _ as usize },
846        16usize,
847        concat!(
848            "Offset of field: ",
849            stringify!(ktxTexture1),
850            "::",
851            stringify!(vvtbl)
852        )
853    );
854    assert_eq!(
855        unsafe { &(*(::std::ptr::null::<ktxTexture1>()))._protected as *const _ as usize },
856        24usize,
857        concat!(
858            "Offset of field: ",
859            stringify!(ktxTexture1),
860            "::",
861            stringify!(_protected)
862        )
863    );
864    assert_eq!(
865        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).isArray as *const _ as usize },
866        32usize,
867        concat!(
868            "Offset of field: ",
869            stringify!(ktxTexture1),
870            "::",
871            stringify!(isArray)
872        )
873    );
874    assert_eq!(
875        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).isCubemap as *const _ as usize },
876        33usize,
877        concat!(
878            "Offset of field: ",
879            stringify!(ktxTexture1),
880            "::",
881            stringify!(isCubemap)
882        )
883    );
884    assert_eq!(
885        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).isCompressed as *const _ as usize },
886        34usize,
887        concat!(
888            "Offset of field: ",
889            stringify!(ktxTexture1),
890            "::",
891            stringify!(isCompressed)
892        )
893    );
894    assert_eq!(
895        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).generateMipmaps as *const _ as usize },
896        35usize,
897        concat!(
898            "Offset of field: ",
899            stringify!(ktxTexture1),
900            "::",
901            stringify!(generateMipmaps)
902        )
903    );
904    assert_eq!(
905        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).baseWidth as *const _ as usize },
906        36usize,
907        concat!(
908            "Offset of field: ",
909            stringify!(ktxTexture1),
910            "::",
911            stringify!(baseWidth)
912        )
913    );
914    assert_eq!(
915        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).baseHeight as *const _ as usize },
916        40usize,
917        concat!(
918            "Offset of field: ",
919            stringify!(ktxTexture1),
920            "::",
921            stringify!(baseHeight)
922        )
923    );
924    assert_eq!(
925        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).baseDepth as *const _ as usize },
926        44usize,
927        concat!(
928            "Offset of field: ",
929            stringify!(ktxTexture1),
930            "::",
931            stringify!(baseDepth)
932        )
933    );
934    assert_eq!(
935        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).numDimensions as *const _ as usize },
936        48usize,
937        concat!(
938            "Offset of field: ",
939            stringify!(ktxTexture1),
940            "::",
941            stringify!(numDimensions)
942        )
943    );
944    assert_eq!(
945        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).numLevels as *const _ as usize },
946        52usize,
947        concat!(
948            "Offset of field: ",
949            stringify!(ktxTexture1),
950            "::",
951            stringify!(numLevels)
952        )
953    );
954    assert_eq!(
955        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).numLayers as *const _ as usize },
956        56usize,
957        concat!(
958            "Offset of field: ",
959            stringify!(ktxTexture1),
960            "::",
961            stringify!(numLayers)
962        )
963    );
964    assert_eq!(
965        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).numFaces as *const _ as usize },
966        60usize,
967        concat!(
968            "Offset of field: ",
969            stringify!(ktxTexture1),
970            "::",
971            stringify!(numFaces)
972        )
973    );
974    assert_eq!(
975        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).orientation as *const _ as usize },
976        64usize,
977        concat!(
978            "Offset of field: ",
979            stringify!(ktxTexture1),
980            "::",
981            stringify!(orientation)
982        )
983    );
984    assert_eq!(
985        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).kvDataHead as *const _ as usize },
986        80usize,
987        concat!(
988            "Offset of field: ",
989            stringify!(ktxTexture1),
990            "::",
991            stringify!(kvDataHead)
992        )
993    );
994    assert_eq!(
995        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).kvDataLen as *const _ as usize },
996        88usize,
997        concat!(
998            "Offset of field: ",
999            stringify!(ktxTexture1),
1000            "::",
1001            stringify!(kvDataLen)
1002        )
1003    );
1004    assert_eq!(
1005        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).kvData as *const _ as usize },
1006        96usize,
1007        concat!(
1008            "Offset of field: ",
1009            stringify!(ktxTexture1),
1010            "::",
1011            stringify!(kvData)
1012        )
1013    );
1014    assert_eq!(
1015        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).dataSize as *const _ as usize },
1016        104usize,
1017        concat!(
1018            "Offset of field: ",
1019            stringify!(ktxTexture1),
1020            "::",
1021            stringify!(dataSize)
1022        )
1023    );
1024    assert_eq!(
1025        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).pData as *const _ as usize },
1026        112usize,
1027        concat!(
1028            "Offset of field: ",
1029            stringify!(ktxTexture1),
1030            "::",
1031            stringify!(pData)
1032        )
1033    );
1034    assert_eq!(
1035        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).glFormat as *const _ as usize },
1036        120usize,
1037        concat!(
1038            "Offset of field: ",
1039            stringify!(ktxTexture1),
1040            "::",
1041            stringify!(glFormat)
1042        )
1043    );
1044    assert_eq!(
1045        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).glInternalformat as *const _ as usize },
1046        124usize,
1047        concat!(
1048            "Offset of field: ",
1049            stringify!(ktxTexture1),
1050            "::",
1051            stringify!(glInternalformat)
1052        )
1053    );
1054    assert_eq!(
1055        unsafe {
1056            &(*(::std::ptr::null::<ktxTexture1>())).glBaseInternalformat as *const _ as usize
1057        },
1058        128usize,
1059        concat!(
1060            "Offset of field: ",
1061            stringify!(ktxTexture1),
1062            "::",
1063            stringify!(glBaseInternalformat)
1064        )
1065    );
1066    assert_eq!(
1067        unsafe { &(*(::std::ptr::null::<ktxTexture1>())).glType as *const _ as usize },
1068        132usize,
1069        concat!(
1070            "Offset of field: ",
1071            stringify!(ktxTexture1),
1072            "::",
1073            stringify!(glType)
1074        )
1075    );
1076    assert_eq!(
1077        unsafe { &(*(::std::ptr::null::<ktxTexture1>()))._private as *const _ as usize },
1078        136usize,
1079        concat!(
1080            "Offset of field: ",
1081            stringify!(ktxTexture1),
1082            "::",
1083            stringify!(_private)
1084        )
1085    );
1086}
1087#[doc = "< No supercompression."]
1088pub const ktxSupercmpScheme_KTX_SS_NONE: ktxSupercmpScheme = 0;
1089#[doc = "< Basis LZ supercompression."]
1090pub const ktxSupercmpScheme_KTX_SS_BASIS_LZ: ktxSupercmpScheme = 1;
1091#[doc = "< ZStd supercompression."]
1092pub const ktxSupercmpScheme_KTX_SS_ZSTD: ktxSupercmpScheme = 2;
1093pub const ktxSupercmpScheme_KTX_SS_BEGIN_RANGE: ktxSupercmpScheme = 0;
1094pub const ktxSupercmpScheme_KTX_SS_END_RANGE: ktxSupercmpScheme = 2;
1095pub const ktxSupercmpScheme_KTX_SS_BEGIN_VENDOR_RANGE: ktxSupercmpScheme = 65536;
1096pub const ktxSupercmpScheme_KTX_SS_END_VENDOR_RANGE: ktxSupercmpScheme = 131071;
1097pub const ktxSupercmpScheme_KTX_SS_BEGIN_RESERVED: ktxSupercmpScheme = 131072;
1098pub const ktxSupercmpScheme_KTX_SUPERCOMPRESSION_BASIS: ktxSupercmpScheme = 1;
1099pub const ktxSupercmpScheme_KTX_SUPERCOMPRESSION_ZSTD: ktxSupercmpScheme = 2;
1100#[doc = " @~English"]
1101#[doc = " @brief Enumerators identifying the supercompression scheme."]
1102pub type ktxSupercmpScheme = ::std::os::raw::c_uint;
1103#[doc = " @class ktxTexture2"]
1104#[doc = " @~English"]
1105#[doc = " @brief Class representing a KTX version 2 format texture."]
1106#[doc = ""]
1107#[doc = " ktxTextures should be created only by one of the ktxTexture_Create*"]
1108#[doc = " functions and these fields should be considered read-only."]
1109#[repr(C)]
1110pub struct ktxTexture2 {
1111    pub classId: class_id,
1112    pub vtbl: *mut ktxTexture_vtbl,
1113    pub vvtbl: *mut ktxTexture_vvtbl,
1114    pub _protected: *mut ktxTexture_protected,
1115    pub isArray: ktx_bool_t,
1116    pub isCubemap: ktx_bool_t,
1117    pub isCompressed: ktx_bool_t,
1118    pub generateMipmaps: ktx_bool_t,
1119    pub baseWidth: ktx_uint32_t,
1120    pub baseHeight: ktx_uint32_t,
1121    pub baseDepth: ktx_uint32_t,
1122    pub numDimensions: ktx_uint32_t,
1123    pub numLevels: ktx_uint32_t,
1124    pub numLayers: ktx_uint32_t,
1125    pub numFaces: ktx_uint32_t,
1126    pub orientation: ktxOrientation,
1127    pub kvDataHead: ktxHashList,
1128    pub kvDataLen: ktx_uint32_t,
1129    pub kvData: *mut ktx_uint8_t,
1130    pub dataSize: ktx_size_t,
1131    pub pData: *mut ktx_uint8_t,
1132    pub vkFormat: ktx_uint32_t,
1133    pub pDfd: *mut ktx_uint32_t,
1134    pub supercompressionScheme: ktxSupercmpScheme,
1135    pub isVideo: ktx_bool_t,
1136    pub duration: ktx_uint32_t,
1137    pub timescale: ktx_uint32_t,
1138    pub loopcount: ktx_uint32_t,
1139    #[doc = "< Private data."]
1140    pub _private: *mut ktxTexture2_private,
1141}
1142#[test]
1143fn bindgen_test_layout_ktxTexture2() {
1144    assert_eq!(
1145        ::std::mem::size_of::<ktxTexture2>(),
1146        168usize,
1147        concat!("Size of: ", stringify!(ktxTexture2))
1148    );
1149    assert_eq!(
1150        ::std::mem::align_of::<ktxTexture2>(),
1151        8usize,
1152        concat!("Alignment of ", stringify!(ktxTexture2))
1153    );
1154    assert_eq!(
1155        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).classId as *const _ as usize },
1156        0usize,
1157        concat!(
1158            "Offset of field: ",
1159            stringify!(ktxTexture2),
1160            "::",
1161            stringify!(classId)
1162        )
1163    );
1164    assert_eq!(
1165        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).vtbl as *const _ as usize },
1166        8usize,
1167        concat!(
1168            "Offset of field: ",
1169            stringify!(ktxTexture2),
1170            "::",
1171            stringify!(vtbl)
1172        )
1173    );
1174    assert_eq!(
1175        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).vvtbl as *const _ as usize },
1176        16usize,
1177        concat!(
1178            "Offset of field: ",
1179            stringify!(ktxTexture2),
1180            "::",
1181            stringify!(vvtbl)
1182        )
1183    );
1184    assert_eq!(
1185        unsafe { &(*(::std::ptr::null::<ktxTexture2>()))._protected as *const _ as usize },
1186        24usize,
1187        concat!(
1188            "Offset of field: ",
1189            stringify!(ktxTexture2),
1190            "::",
1191            stringify!(_protected)
1192        )
1193    );
1194    assert_eq!(
1195        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).isArray as *const _ as usize },
1196        32usize,
1197        concat!(
1198            "Offset of field: ",
1199            stringify!(ktxTexture2),
1200            "::",
1201            stringify!(isArray)
1202        )
1203    );
1204    assert_eq!(
1205        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).isCubemap as *const _ as usize },
1206        33usize,
1207        concat!(
1208            "Offset of field: ",
1209            stringify!(ktxTexture2),
1210            "::",
1211            stringify!(isCubemap)
1212        )
1213    );
1214    assert_eq!(
1215        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).isCompressed as *const _ as usize },
1216        34usize,
1217        concat!(
1218            "Offset of field: ",
1219            stringify!(ktxTexture2),
1220            "::",
1221            stringify!(isCompressed)
1222        )
1223    );
1224    assert_eq!(
1225        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).generateMipmaps as *const _ as usize },
1226        35usize,
1227        concat!(
1228            "Offset of field: ",
1229            stringify!(ktxTexture2),
1230            "::",
1231            stringify!(generateMipmaps)
1232        )
1233    );
1234    assert_eq!(
1235        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).baseWidth as *const _ as usize },
1236        36usize,
1237        concat!(
1238            "Offset of field: ",
1239            stringify!(ktxTexture2),
1240            "::",
1241            stringify!(baseWidth)
1242        )
1243    );
1244    assert_eq!(
1245        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).baseHeight as *const _ as usize },
1246        40usize,
1247        concat!(
1248            "Offset of field: ",
1249            stringify!(ktxTexture2),
1250            "::",
1251            stringify!(baseHeight)
1252        )
1253    );
1254    assert_eq!(
1255        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).baseDepth as *const _ as usize },
1256        44usize,
1257        concat!(
1258            "Offset of field: ",
1259            stringify!(ktxTexture2),
1260            "::",
1261            stringify!(baseDepth)
1262        )
1263    );
1264    assert_eq!(
1265        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).numDimensions as *const _ as usize },
1266        48usize,
1267        concat!(
1268            "Offset of field: ",
1269            stringify!(ktxTexture2),
1270            "::",
1271            stringify!(numDimensions)
1272        )
1273    );
1274    assert_eq!(
1275        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).numLevels as *const _ as usize },
1276        52usize,
1277        concat!(
1278            "Offset of field: ",
1279            stringify!(ktxTexture2),
1280            "::",
1281            stringify!(numLevels)
1282        )
1283    );
1284    assert_eq!(
1285        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).numLayers as *const _ as usize },
1286        56usize,
1287        concat!(
1288            "Offset of field: ",
1289            stringify!(ktxTexture2),
1290            "::",
1291            stringify!(numLayers)
1292        )
1293    );
1294    assert_eq!(
1295        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).numFaces as *const _ as usize },
1296        60usize,
1297        concat!(
1298            "Offset of field: ",
1299            stringify!(ktxTexture2),
1300            "::",
1301            stringify!(numFaces)
1302        )
1303    );
1304    assert_eq!(
1305        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).orientation as *const _ as usize },
1306        64usize,
1307        concat!(
1308            "Offset of field: ",
1309            stringify!(ktxTexture2),
1310            "::",
1311            stringify!(orientation)
1312        )
1313    );
1314    assert_eq!(
1315        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).kvDataHead as *const _ as usize },
1316        80usize,
1317        concat!(
1318            "Offset of field: ",
1319            stringify!(ktxTexture2),
1320            "::",
1321            stringify!(kvDataHead)
1322        )
1323    );
1324    assert_eq!(
1325        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).kvDataLen as *const _ as usize },
1326        88usize,
1327        concat!(
1328            "Offset of field: ",
1329            stringify!(ktxTexture2),
1330            "::",
1331            stringify!(kvDataLen)
1332        )
1333    );
1334    assert_eq!(
1335        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).kvData as *const _ as usize },
1336        96usize,
1337        concat!(
1338            "Offset of field: ",
1339            stringify!(ktxTexture2),
1340            "::",
1341            stringify!(kvData)
1342        )
1343    );
1344    assert_eq!(
1345        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).dataSize as *const _ as usize },
1346        104usize,
1347        concat!(
1348            "Offset of field: ",
1349            stringify!(ktxTexture2),
1350            "::",
1351            stringify!(dataSize)
1352        )
1353    );
1354    assert_eq!(
1355        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).pData as *const _ as usize },
1356        112usize,
1357        concat!(
1358            "Offset of field: ",
1359            stringify!(ktxTexture2),
1360            "::",
1361            stringify!(pData)
1362        )
1363    );
1364    assert_eq!(
1365        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).vkFormat as *const _ as usize },
1366        120usize,
1367        concat!(
1368            "Offset of field: ",
1369            stringify!(ktxTexture2),
1370            "::",
1371            stringify!(vkFormat)
1372        )
1373    );
1374    assert_eq!(
1375        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).pDfd as *const _ as usize },
1376        128usize,
1377        concat!(
1378            "Offset of field: ",
1379            stringify!(ktxTexture2),
1380            "::",
1381            stringify!(pDfd)
1382        )
1383    );
1384    assert_eq!(
1385        unsafe {
1386            &(*(::std::ptr::null::<ktxTexture2>())).supercompressionScheme as *const _ as usize
1387        },
1388        136usize,
1389        concat!(
1390            "Offset of field: ",
1391            stringify!(ktxTexture2),
1392            "::",
1393            stringify!(supercompressionScheme)
1394        )
1395    );
1396    assert_eq!(
1397        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).isVideo as *const _ as usize },
1398        140usize,
1399        concat!(
1400            "Offset of field: ",
1401            stringify!(ktxTexture2),
1402            "::",
1403            stringify!(isVideo)
1404        )
1405    );
1406    assert_eq!(
1407        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).duration as *const _ as usize },
1408        144usize,
1409        concat!(
1410            "Offset of field: ",
1411            stringify!(ktxTexture2),
1412            "::",
1413            stringify!(duration)
1414        )
1415    );
1416    assert_eq!(
1417        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).timescale as *const _ as usize },
1418        148usize,
1419        concat!(
1420            "Offset of field: ",
1421            stringify!(ktxTexture2),
1422            "::",
1423            stringify!(timescale)
1424        )
1425    );
1426    assert_eq!(
1427        unsafe { &(*(::std::ptr::null::<ktxTexture2>())).loopcount as *const _ as usize },
1428        152usize,
1429        concat!(
1430            "Offset of field: ",
1431            stringify!(ktxTexture2),
1432            "::",
1433            stringify!(loopcount)
1434        )
1435    );
1436    assert_eq!(
1437        unsafe { &(*(::std::ptr::null::<ktxTexture2>()))._private as *const _ as usize },
1438        160usize,
1439        concat!(
1440            "Offset of field: ",
1441            stringify!(ktxTexture2),
1442            "::",
1443            stringify!(_private)
1444        )
1445    );
1446}
1447#[doc = " @memberof ktxTexture"]
1448#[doc = " @~English"]
1449#[doc = " @brief Structure for passing texture information to ktxTexture[12]_Create()."]
1450#[doc = ""]
1451#[doc = " @sa ktxTexture_Create()"]
1452#[repr(C)]
1453#[derive(Debug, Copy, Clone)]
1454pub struct ktxTextureCreateInfo {
1455    #[doc = "< Internal format for the texture, e.g.,"]
1456    #[doc = "GL_RGB8. Ignored when creating a"]
1457    #[doc = "ktxTexture2."]
1458    pub glInternalformat: ktx_uint32_t,
1459    #[doc = "< VkFormat for texture. Ignored when creating a"]
1460    #[doc = "ktxTexture1."]
1461    pub vkFormat: ktx_uint32_t,
1462    #[doc = "< Pointer to DFD. Used only when creating a"]
1463    #[doc = "ktxTexture2 and only if vkFormat is"]
1464    #[doc = "VK_FORMAT_UNDEFINED."]
1465    pub pDfd: *mut ktx_uint32_t,
1466    #[doc = "< Width of the base level of the texture."]
1467    pub baseWidth: ktx_uint32_t,
1468    #[doc = "< Height of the base level of the texture."]
1469    pub baseHeight: ktx_uint32_t,
1470    #[doc = "< Depth of the base level of the texture."]
1471    pub baseDepth: ktx_uint32_t,
1472    #[doc = "< Number of dimensions in the texture, 1, 2"]
1473    #[doc = "or 3."]
1474    pub numDimensions: ktx_uint32_t,
1475    #[doc = "< Number of mip levels in the texture. Should be"]
1476    #[doc = "1 if @c generateMipmaps is KTX_TRUE;"]
1477    pub numLevels: ktx_uint32_t,
1478    #[doc = "< Number of array layers in the texture."]
1479    pub numLayers: ktx_uint32_t,
1480    #[doc = "< Number of faces: 6 for cube maps, 1 otherwise."]
1481    pub numFaces: ktx_uint32_t,
1482    #[doc = "< Set to KTX_TRUE if the texture is to be an"]
1483    #[doc = "array texture. Means OpenGL will use a"]
1484    #[doc = "GL_TEXTURE_*_ARRAY target."]
1485    pub isArray: ktx_bool_t,
1486    #[doc = "< Set to KTX_TRUE if mipmaps should be"]
1487    #[doc = "generated for the texture when loading"]
1488    #[doc = "into a 3D API."]
1489    pub generateMipmaps: ktx_bool_t,
1490}
1491#[test]
1492fn bindgen_test_layout_ktxTextureCreateInfo() {
1493    assert_eq!(
1494        ::std::mem::size_of::<ktxTextureCreateInfo>(),
1495        48usize,
1496        concat!("Size of: ", stringify!(ktxTextureCreateInfo))
1497    );
1498    assert_eq!(
1499        ::std::mem::align_of::<ktxTextureCreateInfo>(),
1500        8usize,
1501        concat!("Alignment of ", stringify!(ktxTextureCreateInfo))
1502    );
1503    assert_eq!(
1504        unsafe {
1505            &(*(::std::ptr::null::<ktxTextureCreateInfo>())).glInternalformat as *const _ as usize
1506        },
1507        0usize,
1508        concat!(
1509            "Offset of field: ",
1510            stringify!(ktxTextureCreateInfo),
1511            "::",
1512            stringify!(glInternalformat)
1513        )
1514    );
1515    assert_eq!(
1516        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).vkFormat as *const _ as usize },
1517        4usize,
1518        concat!(
1519            "Offset of field: ",
1520            stringify!(ktxTextureCreateInfo),
1521            "::",
1522            stringify!(vkFormat)
1523        )
1524    );
1525    assert_eq!(
1526        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).pDfd as *const _ as usize },
1527        8usize,
1528        concat!(
1529            "Offset of field: ",
1530            stringify!(ktxTextureCreateInfo),
1531            "::",
1532            stringify!(pDfd)
1533        )
1534    );
1535    assert_eq!(
1536        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).baseWidth as *const _ as usize },
1537        16usize,
1538        concat!(
1539            "Offset of field: ",
1540            stringify!(ktxTextureCreateInfo),
1541            "::",
1542            stringify!(baseWidth)
1543        )
1544    );
1545    assert_eq!(
1546        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).baseHeight as *const _ as usize },
1547        20usize,
1548        concat!(
1549            "Offset of field: ",
1550            stringify!(ktxTextureCreateInfo),
1551            "::",
1552            stringify!(baseHeight)
1553        )
1554    );
1555    assert_eq!(
1556        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).baseDepth as *const _ as usize },
1557        24usize,
1558        concat!(
1559            "Offset of field: ",
1560            stringify!(ktxTextureCreateInfo),
1561            "::",
1562            stringify!(baseDepth)
1563        )
1564    );
1565    assert_eq!(
1566        unsafe {
1567            &(*(::std::ptr::null::<ktxTextureCreateInfo>())).numDimensions as *const _ as usize
1568        },
1569        28usize,
1570        concat!(
1571            "Offset of field: ",
1572            stringify!(ktxTextureCreateInfo),
1573            "::",
1574            stringify!(numDimensions)
1575        )
1576    );
1577    assert_eq!(
1578        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).numLevels as *const _ as usize },
1579        32usize,
1580        concat!(
1581            "Offset of field: ",
1582            stringify!(ktxTextureCreateInfo),
1583            "::",
1584            stringify!(numLevels)
1585        )
1586    );
1587    assert_eq!(
1588        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).numLayers as *const _ as usize },
1589        36usize,
1590        concat!(
1591            "Offset of field: ",
1592            stringify!(ktxTextureCreateInfo),
1593            "::",
1594            stringify!(numLayers)
1595        )
1596    );
1597    assert_eq!(
1598        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).numFaces as *const _ as usize },
1599        40usize,
1600        concat!(
1601            "Offset of field: ",
1602            stringify!(ktxTextureCreateInfo),
1603            "::",
1604            stringify!(numFaces)
1605        )
1606    );
1607    assert_eq!(
1608        unsafe { &(*(::std::ptr::null::<ktxTextureCreateInfo>())).isArray as *const _ as usize },
1609        44usize,
1610        concat!(
1611            "Offset of field: ",
1612            stringify!(ktxTextureCreateInfo),
1613            "::",
1614            stringify!(isArray)
1615        )
1616    );
1617    assert_eq!(
1618        unsafe {
1619            &(*(::std::ptr::null::<ktxTextureCreateInfo>())).generateMipmaps as *const _ as usize
1620        },
1621        45usize,
1622        concat!(
1623            "Offset of field: ",
1624            stringify!(ktxTextureCreateInfo),
1625            "::",
1626            stringify!(generateMipmaps)
1627        )
1628    );
1629}
1630#[doc = "< Don't allocate any image storage."]
1631pub const ktxTextureCreateStorageEnum_KTX_TEXTURE_CREATE_NO_STORAGE: ktxTextureCreateStorageEnum =
1632    0;
1633#[doc = "< Allocate image storage."]
1634pub const ktxTextureCreateStorageEnum_KTX_TEXTURE_CREATE_ALLOC_STORAGE:
1635    ktxTextureCreateStorageEnum = 1;
1636#[doc = " @memberof ktxTexture"]
1637#[doc = " @~English"]
1638#[doc = " @brief Enum for requesting, or not, allocation of storage for images."]
1639#[doc = ""]
1640#[doc = " @sa ktxTexture_Create()"]
1641pub type ktxTextureCreateStorageEnum = ::std::os::raw::c_uint;
1642pub const ktxTextureCreateFlagBits_KTX_TEXTURE_CREATE_NO_FLAGS: ktxTextureCreateFlagBits = 0;
1643pub const ktxTextureCreateFlagBits_KTX_TEXTURE_CREATE_LOAD_IMAGE_DATA_BIT:
1644    ktxTextureCreateFlagBits = 1;
1645pub const ktxTextureCreateFlagBits_KTX_TEXTURE_CREATE_RAW_KVDATA_BIT: ktxTextureCreateFlagBits = 2;
1646pub const ktxTextureCreateFlagBits_KTX_TEXTURE_CREATE_SKIP_KVDATA_BIT: ktxTextureCreateFlagBits = 4;
1647#[doc = " @memberof ktxTexture"]
1648#[doc = " @~English"]
1649#[doc = " @brief Flags for requesting services during creation."]
1650#[doc = ""]
1651#[doc = " @sa ktxTexture_CreateFrom*"]
1652pub type ktxTextureCreateFlagBits = ::std::os::raw::c_uint;
1653#[doc = " @memberof ktxTexture"]
1654#[doc = " @~English"]
1655#[doc = " @brief Type for TextureCreateFlags parameters."]
1656#[doc = ""]
1657#[doc = " @sa ktxTexture_CreateFrom*()"]
1658pub type ktxTextureCreateFlags = ktx_uint32_t;
1659#[repr(C)]
1660#[derive(Debug, Copy, Clone)]
1661pub struct ktxMem {
1662    _unused: [u8; 0],
1663}
1664pub const streamType_eStreamTypeFile: streamType = 1;
1665pub const streamType_eStreamTypeMemory: streamType = 2;
1666pub const streamType_eStreamTypeCustom: streamType = 3;
1667pub type streamType = ::std::os::raw::c_uint;
1668#[doc = " @~English"]
1669#[doc = " @brief type for a pointer to a stream reading function"]
1670pub type ktxStream_read = ::std::option::Option<
1671    unsafe extern "C" fn(
1672        str_: *mut ktxStream,
1673        dst: *mut ::std::os::raw::c_void,
1674        count: ktx_size_t,
1675    ) -> ktx_error_code_e,
1676>;
1677#[doc = " @~English"]
1678#[doc = " @brief type for a pointer to a stream skipping function"]
1679pub type ktxStream_skip = ::std::option::Option<
1680    unsafe extern "C" fn(str_: *mut ktxStream, count: ktx_size_t) -> ktx_error_code_e,
1681>;
1682#[doc = " @~English"]
1683#[doc = " @brief type for a pointer to a stream reading function"]
1684pub type ktxStream_write = ::std::option::Option<
1685    unsafe extern "C" fn(
1686        str_: *mut ktxStream,
1687        src: *const ::std::os::raw::c_void,
1688        size: ktx_size_t,
1689        count: ktx_size_t,
1690    ) -> ktx_error_code_e,
1691>;
1692#[doc = " @~English"]
1693#[doc = " @brief type for a pointer to a stream position query function"]
1694pub type ktxStream_getpos = ::std::option::Option<
1695    unsafe extern "C" fn(str_: *mut ktxStream, offset: *mut ktx_off_t) -> ktx_error_code_e,
1696>;
1697#[doc = " @~English"]
1698#[doc = " @brief type for a pointer to a stream position query function"]
1699pub type ktxStream_setpos = ::std::option::Option<
1700    unsafe extern "C" fn(str_: *mut ktxStream, offset: ktx_off_t) -> ktx_error_code_e,
1701>;
1702#[doc = " @~English"]
1703#[doc = " @brief type for a pointer to a stream size query function"]
1704pub type ktxStream_getsize = ::std::option::Option<
1705    unsafe extern "C" fn(str_: *mut ktxStream, size: *mut ktx_size_t) -> ktx_error_code_e,
1706>;
1707#[doc = " @~English"]
1708#[doc = " @brief Destruct a stream"]
1709pub type ktxStream_destruct = ::std::option::Option<unsafe extern "C" fn(str_: *mut ktxStream)>;
1710#[doc = " @~English"]
1711#[doc = ""]
1712#[doc = " @brief Interface of ktxStream."]
1713#[doc = ""]
1714#[doc = " @author Maksim Kolesin"]
1715#[doc = " @author Georg Kolling, Imagination Technology"]
1716#[doc = " @author Mark Callow, HI Corporation"]
1717#[repr(C)]
1718pub struct ktxStream {
1719    #[doc = "< @internal pointer to function for reading bytes."]
1720    pub read: ktxStream_read,
1721    #[doc = "< @internal pointer to function for skipping bytes."]
1722    pub skip: ktxStream_skip,
1723    #[doc = "< @internal pointer to function for writing bytes."]
1724    pub write: ktxStream_write,
1725    #[doc = "< @internal pointer to function for getting current position in stream."]
1726    pub getpos: ktxStream_getpos,
1727    #[doc = "< @internal pointer to function for setting current position in stream."]
1728    pub setpos: ktxStream_setpos,
1729    #[doc = "< @internal pointer to function for querying size."]
1730    pub getsize: ktxStream_getsize,
1731    #[doc = "< @internal destruct the stream."]
1732    pub destruct: ktxStream_destruct,
1733    pub type_: streamType,
1734    #[doc = "< @internal pointer to the stream data."]
1735    pub data: ktxStream__bindgen_ty_1,
1736    #[doc = "< @internal used by FileStream for stdin."]
1737    pub readpos: ktx_off_t,
1738    #[doc = "< @internal Close FILE* or dispose of memory on destruct."]
1739    pub closeOnDestruct: ktx_bool_t,
1740}
1741#[repr(C)]
1742pub struct ktxStream__bindgen_ty_1 {
1743    pub file: __BindgenUnionField<*mut FILE>,
1744    pub mem: __BindgenUnionField<*mut ktxMem>,
1745    pub custom_ptr: __BindgenUnionField<ktxStream__bindgen_ty_1__bindgen_ty_1>,
1746    pub bindgen_union_field: [u64; 3usize],
1747}
1748#[repr(C)]
1749pub struct ktxStream__bindgen_ty_1__bindgen_ty_1 {
1750    pub address: *mut ::std::os::raw::c_void,
1751    pub allocatorAddress: *mut ::std::os::raw::c_void,
1752    pub size: ktx_size_t,
1753}
1754#[test]
1755fn bindgen_test_layout_ktxStream__bindgen_ty_1__bindgen_ty_1() {
1756    assert_eq!(
1757        ::std::mem::size_of::<ktxStream__bindgen_ty_1__bindgen_ty_1>(),
1758        24usize,
1759        concat!(
1760            "Size of: ",
1761            stringify!(ktxStream__bindgen_ty_1__bindgen_ty_1)
1762        )
1763    );
1764    assert_eq!(
1765        ::std::mem::align_of::<ktxStream__bindgen_ty_1__bindgen_ty_1>(),
1766        8usize,
1767        concat!(
1768            "Alignment of ",
1769            stringify!(ktxStream__bindgen_ty_1__bindgen_ty_1)
1770        )
1771    );
1772    assert_eq!(
1773        unsafe {
1774            &(*(::std::ptr::null::<ktxStream__bindgen_ty_1__bindgen_ty_1>())).address as *const _
1775                as usize
1776        },
1777        0usize,
1778        concat!(
1779            "Offset of field: ",
1780            stringify!(ktxStream__bindgen_ty_1__bindgen_ty_1),
1781            "::",
1782            stringify!(address)
1783        )
1784    );
1785    assert_eq!(
1786        unsafe {
1787            &(*(::std::ptr::null::<ktxStream__bindgen_ty_1__bindgen_ty_1>())).allocatorAddress
1788                as *const _ as usize
1789        },
1790        8usize,
1791        concat!(
1792            "Offset of field: ",
1793            stringify!(ktxStream__bindgen_ty_1__bindgen_ty_1),
1794            "::",
1795            stringify!(allocatorAddress)
1796        )
1797    );
1798    assert_eq!(
1799        unsafe {
1800            &(*(::std::ptr::null::<ktxStream__bindgen_ty_1__bindgen_ty_1>())).size as *const _
1801                as usize
1802        },
1803        16usize,
1804        concat!(
1805            "Offset of field: ",
1806            stringify!(ktxStream__bindgen_ty_1__bindgen_ty_1),
1807            "::",
1808            stringify!(size)
1809        )
1810    );
1811}
1812#[test]
1813fn bindgen_test_layout_ktxStream__bindgen_ty_1() {
1814    assert_eq!(
1815        ::std::mem::size_of::<ktxStream__bindgen_ty_1>(),
1816        24usize,
1817        concat!("Size of: ", stringify!(ktxStream__bindgen_ty_1))
1818    );
1819    assert_eq!(
1820        ::std::mem::align_of::<ktxStream__bindgen_ty_1>(),
1821        8usize,
1822        concat!("Alignment of ", stringify!(ktxStream__bindgen_ty_1))
1823    );
1824    assert_eq!(
1825        unsafe { &(*(::std::ptr::null::<ktxStream__bindgen_ty_1>())).file as *const _ as usize },
1826        0usize,
1827        concat!(
1828            "Offset of field: ",
1829            stringify!(ktxStream__bindgen_ty_1),
1830            "::",
1831            stringify!(file)
1832        )
1833    );
1834    assert_eq!(
1835        unsafe { &(*(::std::ptr::null::<ktxStream__bindgen_ty_1>())).mem as *const _ as usize },
1836        0usize,
1837        concat!(
1838            "Offset of field: ",
1839            stringify!(ktxStream__bindgen_ty_1),
1840            "::",
1841            stringify!(mem)
1842        )
1843    );
1844    assert_eq!(
1845        unsafe {
1846            &(*(::std::ptr::null::<ktxStream__bindgen_ty_1>())).custom_ptr as *const _ as usize
1847        },
1848        0usize,
1849        concat!(
1850            "Offset of field: ",
1851            stringify!(ktxStream__bindgen_ty_1),
1852            "::",
1853            stringify!(custom_ptr)
1854        )
1855    );
1856}
1857#[test]
1858fn bindgen_test_layout_ktxStream() {
1859    assert_eq!(
1860        ::std::mem::size_of::<ktxStream>(),
1861        104usize,
1862        concat!("Size of: ", stringify!(ktxStream))
1863    );
1864    assert_eq!(
1865        ::std::mem::align_of::<ktxStream>(),
1866        8usize,
1867        concat!("Alignment of ", stringify!(ktxStream))
1868    );
1869    assert_eq!(
1870        unsafe { &(*(::std::ptr::null::<ktxStream>())).read as *const _ as usize },
1871        0usize,
1872        concat!(
1873            "Offset of field: ",
1874            stringify!(ktxStream),
1875            "::",
1876            stringify!(read)
1877        )
1878    );
1879    assert_eq!(
1880        unsafe { &(*(::std::ptr::null::<ktxStream>())).skip as *const _ as usize },
1881        8usize,
1882        concat!(
1883            "Offset of field: ",
1884            stringify!(ktxStream),
1885            "::",
1886            stringify!(skip)
1887        )
1888    );
1889    assert_eq!(
1890        unsafe { &(*(::std::ptr::null::<ktxStream>())).write as *const _ as usize },
1891        16usize,
1892        concat!(
1893            "Offset of field: ",
1894            stringify!(ktxStream),
1895            "::",
1896            stringify!(write)
1897        )
1898    );
1899    assert_eq!(
1900        unsafe { &(*(::std::ptr::null::<ktxStream>())).getpos as *const _ as usize },
1901        24usize,
1902        concat!(
1903            "Offset of field: ",
1904            stringify!(ktxStream),
1905            "::",
1906            stringify!(getpos)
1907        )
1908    );
1909    assert_eq!(
1910        unsafe { &(*(::std::ptr::null::<ktxStream>())).setpos as *const _ as usize },
1911        32usize,
1912        concat!(
1913            "Offset of field: ",
1914            stringify!(ktxStream),
1915            "::",
1916            stringify!(setpos)
1917        )
1918    );
1919    assert_eq!(
1920        unsafe { &(*(::std::ptr::null::<ktxStream>())).getsize as *const _ as usize },
1921        40usize,
1922        concat!(
1923            "Offset of field: ",
1924            stringify!(ktxStream),
1925            "::",
1926            stringify!(getsize)
1927        )
1928    );
1929    assert_eq!(
1930        unsafe { &(*(::std::ptr::null::<ktxStream>())).destruct as *const _ as usize },
1931        48usize,
1932        concat!(
1933            "Offset of field: ",
1934            stringify!(ktxStream),
1935            "::",
1936            stringify!(destruct)
1937        )
1938    );
1939    assert_eq!(
1940        unsafe { &(*(::std::ptr::null::<ktxStream>())).type_ as *const _ as usize },
1941        56usize,
1942        concat!(
1943            "Offset of field: ",
1944            stringify!(ktxStream),
1945            "::",
1946            stringify!(type_)
1947        )
1948    );
1949    assert_eq!(
1950        unsafe { &(*(::std::ptr::null::<ktxStream>())).data as *const _ as usize },
1951        64usize,
1952        concat!(
1953            "Offset of field: ",
1954            stringify!(ktxStream),
1955            "::",
1956            stringify!(data)
1957        )
1958    );
1959    assert_eq!(
1960        unsafe { &(*(::std::ptr::null::<ktxStream>())).readpos as *const _ as usize },
1961        88usize,
1962        concat!(
1963            "Offset of field: ",
1964            stringify!(ktxStream),
1965            "::",
1966            stringify!(readpos)
1967        )
1968    );
1969    assert_eq!(
1970        unsafe { &(*(::std::ptr::null::<ktxStream>())).closeOnDestruct as *const _ as usize },
1971        96usize,
1972        concat!(
1973            "Offset of field: ",
1974            stringify!(ktxStream),
1975            "::",
1976            stringify!(closeOnDestruct)
1977        )
1978    );
1979}
1980extern "C" {
1981    #[doc = " These four create a ktxTexture1 or ktxTexture2 according to the data"]
1982    #[doc = " header, and return a pointer to the base ktxTexture class."]
1983    pub fn ktxTexture_CreateFromStdioStream(
1984        stdioStream: *mut FILE,
1985        createFlags: ktxTextureCreateFlags,
1986        newTex: *mut *mut ktxTexture,
1987    ) -> ktx_error_code_e;
1988}
1989extern "C" {
1990    pub fn ktxTexture_CreateFromNamedFile(
1991        filename: *const ::std::os::raw::c_char,
1992        createFlags: ktxTextureCreateFlags,
1993        newTex: *mut *mut ktxTexture,
1994    ) -> ktx_error_code_e;
1995}
1996extern "C" {
1997    pub fn ktxTexture_CreateFromMemory(
1998        bytes: *const ktx_uint8_t,
1999        size: ktx_size_t,
2000        createFlags: ktxTextureCreateFlags,
2001        newTex: *mut *mut ktxTexture,
2002    ) -> ktx_error_code_e;
2003}
2004extern "C" {
2005    pub fn ktxTexture_CreateFromStream(
2006        stream: *mut ktxStream,
2007        createFlags: ktxTextureCreateFlags,
2008        newTex: *mut *mut ktxTexture,
2009    ) -> ktx_error_code_e;
2010}
2011extern "C" {
2012    #[doc = " Returns a pointer to the image data of a ktxTexture object."]
2013    pub fn ktxTexture_GetData(This: *mut ktxTexture) -> *mut ktx_uint8_t;
2014}
2015extern "C" {
2016    #[doc = " Returns the pitch of a row of an image at the specified level."]
2017    #[doc = " Similar to the rowPitch in a VkSubResourceLayout."]
2018    pub fn ktxTexture_GetRowPitch(This: *mut ktxTexture, level: ktx_uint32_t) -> ktx_uint32_t;
2019}
2020extern "C" {
2021    #[doc = " Return the element size of the texture's images."]
2022    pub fn ktxTexture_GetElementSize(This: *mut ktxTexture) -> ktx_uint32_t;
2023}
2024extern "C" {
2025    #[doc = " Returns the size of all the image data of a ktxTexture object in bytes."]
2026    pub fn ktxTexture_GetDataSize(This: *mut ktxTexture) -> ktx_size_t;
2027}
2028extern "C" {
2029    #[doc = " Uploads a texture to OpenGL {,ES}."]
2030    pub fn ktxTexture_GLUpload(
2031        This: *mut ktxTexture,
2032        pTexture: *mut GLuint,
2033        pTarget: *mut GLenum,
2034        pGlerror: *mut GLenum,
2035    ) -> ktx_error_code_e;
2036}
2037extern "C" {
2038    #[doc = " Iterate over the levels or faces in a ktxTexture object."]
2039    pub fn ktxTexture_IterateLevelFaces(
2040        This: *mut ktxTexture,
2041        iterCb: PFNKTXITERCB,
2042        userdata: *mut ::std::os::raw::c_void,
2043    ) -> ktx_error_code_e;
2044}
2045extern "C" {
2046    #[doc = " Create a new ktxTexture1."]
2047    pub fn ktxTexture1_Create(
2048        createInfo: *mut ktxTextureCreateInfo,
2049        storageAllocation: ktxTextureCreateStorageEnum,
2050        newTex: *mut *mut ktxTexture1,
2051    ) -> ktx_error_code_e;
2052}
2053extern "C" {
2054    #[doc = " These four create a ktxTexture1 provided the data is in KTX format."]
2055    pub fn ktxTexture1_CreateFromStdioStream(
2056        stdioStream: *mut FILE,
2057        createFlags: ktxTextureCreateFlags,
2058        newTex: *mut *mut ktxTexture1,
2059    ) -> ktx_error_code_e;
2060}
2061extern "C" {
2062    pub fn ktxTexture1_CreateFromNamedFile(
2063        filename: *const ::std::os::raw::c_char,
2064        createFlags: ktxTextureCreateFlags,
2065        newTex: *mut *mut ktxTexture1,
2066    ) -> ktx_error_code_e;
2067}
2068extern "C" {
2069    pub fn ktxTexture1_CreateFromMemory(
2070        bytes: *const ktx_uint8_t,
2071        size: ktx_size_t,
2072        createFlags: ktxTextureCreateFlags,
2073        newTex: *mut *mut ktxTexture1,
2074    ) -> ktx_error_code_e;
2075}
2076extern "C" {
2077    pub fn ktxTexture1_CreateFromStream(
2078        stream: *mut ktxStream,
2079        createFlags: ktxTextureCreateFlags,
2080        newTex: *mut *mut ktxTexture1,
2081    ) -> ktx_error_code_e;
2082}
2083extern "C" {
2084    pub fn ktxTexture1_NeedsTranscoding(This: *mut ktxTexture1) -> ktx_bool_t;
2085}
2086extern "C" {
2087    #[doc = " Write a ktxTexture object to a stdio stream in KTX format."]
2088    pub fn ktxTexture1_WriteKTX2ToStdioStream(
2089        This: *mut ktxTexture1,
2090        dstsstr: *mut FILE,
2091    ) -> ktx_error_code_e;
2092}
2093extern "C" {
2094    #[doc = " Write a ktxTexture object to a named file in KTX format."]
2095    pub fn ktxTexture1_WriteKTX2ToNamedFile(
2096        This: *mut ktxTexture1,
2097        dstname: *const ::std::os::raw::c_char,
2098    ) -> ktx_error_code_e;
2099}
2100extern "C" {
2101    #[doc = " Write a ktxTexture object to a block of memory in KTX format."]
2102    pub fn ktxTexture1_WriteKTX2ToMemory(
2103        This: *mut ktxTexture1,
2104        bytes: *mut *mut ktx_uint8_t,
2105        size: *mut ktx_size_t,
2106    ) -> ktx_error_code_e;
2107}
2108extern "C" {
2109    #[doc = " Write a ktxTexture object to a ktxStream in KTX format."]
2110    pub fn ktxTexture1_WriteKTX2ToStream(
2111        This: *mut ktxTexture1,
2112        dststr: *mut ktxStream,
2113    ) -> ktx_error_code_e;
2114}
2115extern "C" {
2116    #[doc = " Create a new ktxTexture2."]
2117    pub fn ktxTexture2_Create(
2118        createInfo: *mut ktxTextureCreateInfo,
2119        storageAllocation: ktxTextureCreateStorageEnum,
2120        newTex: *mut *mut ktxTexture2,
2121    ) -> ktx_error_code_e;
2122}
2123extern "C" {
2124    #[doc = " Create a new ktxTexture2 as a copy of an existing texture."]
2125    pub fn ktxTexture2_CreateCopy(
2126        orig: *mut ktxTexture2,
2127        newTex: *mut *mut ktxTexture2,
2128    ) -> ktx_error_code_e;
2129}
2130extern "C" {
2131    #[doc = " These four create a ktxTexture2 provided the data is in KTX2 format."]
2132    pub fn ktxTexture2_CreateFromStdioStream(
2133        stdioStream: *mut FILE,
2134        createFlags: ktxTextureCreateFlags,
2135        newTex: *mut *mut ktxTexture2,
2136    ) -> ktx_error_code_e;
2137}
2138extern "C" {
2139    pub fn ktxTexture2_CreateFromNamedFile(
2140        filename: *const ::std::os::raw::c_char,
2141        createFlags: ktxTextureCreateFlags,
2142        newTex: *mut *mut ktxTexture2,
2143    ) -> ktx_error_code_e;
2144}
2145extern "C" {
2146    pub fn ktxTexture2_CreateFromMemory(
2147        bytes: *const ktx_uint8_t,
2148        size: ktx_size_t,
2149        createFlags: ktxTextureCreateFlags,
2150        newTex: *mut *mut ktxTexture2,
2151    ) -> ktx_error_code_e;
2152}
2153extern "C" {
2154    pub fn ktxTexture2_CreateFromStream(
2155        stream: *mut ktxStream,
2156        createFlags: ktxTextureCreateFlags,
2157        newTex: *mut *mut ktxTexture2,
2158    ) -> ktx_error_code_e;
2159}
2160extern "C" {
2161    pub fn ktxTexture2_CompressBasis(
2162        This: *mut ktxTexture2,
2163        quality: ktx_uint32_t,
2164    ) -> ktx_error_code_e;
2165}
2166extern "C" {
2167    pub fn ktxTexture2_DeflateZstd(This: *mut ktxTexture2, level: ktx_uint32_t)
2168        -> ktx_error_code_e;
2169}
2170extern "C" {
2171    pub fn ktxTexture2_GetComponentInfo(
2172        This: *mut ktxTexture2,
2173        numComponents: *mut ktx_uint32_t,
2174        componentByteLength: *mut ktx_uint32_t,
2175    );
2176}
2177extern "C" {
2178    pub fn ktxTexture2_GetNumComponents(This: *mut ktxTexture2) -> ktx_uint32_t;
2179}
2180extern "C" {
2181    pub fn ktxTexture2_GetOETF(This: *mut ktxTexture2) -> ktx_uint32_t;
2182}
2183extern "C" {
2184    pub fn ktxTexture2_GetPremultipliedAlpha(This: *mut ktxTexture2) -> ktx_bool_t;
2185}
2186extern "C" {
2187    pub fn ktxTexture2_NeedsTranscoding(This: *mut ktxTexture2) -> ktx_bool_t;
2188}
2189pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_FASTEST: ktx_pack_uastc_flag_bits_e = 0;
2190pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_FASTER: ktx_pack_uastc_flag_bits_e = 1;
2191pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_DEFAULT: ktx_pack_uastc_flag_bits_e = 2;
2192pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_SLOWER: ktx_pack_uastc_flag_bits_e = 3;
2193pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_VERYSLOW: ktx_pack_uastc_flag_bits_e = 4;
2194pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_MAX_LEVEL: ktx_pack_uastc_flag_bits_e = 4;
2195pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_LEVEL_MASK: ktx_pack_uastc_flag_bits_e = 15;
2196pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_FAVOR_UASTC_ERROR: ktx_pack_uastc_flag_bits_e =
2197    8;
2198pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_FAVOR_BC7_ERROR: ktx_pack_uastc_flag_bits_e =
2199    16;
2200pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_ETC1_FASTER_HINTS: ktx_pack_uastc_flag_bits_e =
2201    64;
2202pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC_ETC1_FASTEST_HINTS: ktx_pack_uastc_flag_bits_e =
2203    128;
2204pub const ktx_pack_uastc_flag_bits_e_KTX_PACK_UASTC__ETC1_DISABLE_FLIP_AND_INDIVIDUAL:
2205    ktx_pack_uastc_flag_bits_e = 256;
2206#[doc = " @~English"]
2207#[doc = " @brief Flags specifiying UASTC encoding options."]
2208pub type ktx_pack_uastc_flag_bits_e = ::std::os::raw::c_uint;
2209pub type ktx_pack_uastc_flags = ktx_uint32_t;
2210pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_FASTEST:
2211    ktx_pack_astc_quality_levels_e = 0;
2212pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_FAST:
2213    ktx_pack_astc_quality_levels_e = 10;
2214pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_MEDIUM:
2215    ktx_pack_astc_quality_levels_e = 60;
2216pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_THOROUGH:
2217    ktx_pack_astc_quality_levels_e = 98;
2218pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_EXHAUSTIVE:
2219    ktx_pack_astc_quality_levels_e = 100;
2220pub const ktx_pack_astc_quality_levels_e_KTX_PACK_ASTC_QUALITY_LEVEL_MAX:
2221    ktx_pack_astc_quality_levels_e = 100;
2222#[doc = " @~English"]
2223#[doc = " @brief Options specifiying ASTC encoding quality levels."]
2224pub type ktx_pack_astc_quality_levels_e = ::std::os::raw::c_uint;
2225#[doc = ": 8.00 bpp"]
2226pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_4x4:
2227    ktx_pack_astc_block_dimension_e = 0;
2228#[doc = ": 6.40 bpp"]
2229pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_5x4:
2230    ktx_pack_astc_block_dimension_e = 1;
2231#[doc = ": 5.12 bpp"]
2232pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_5x5:
2233    ktx_pack_astc_block_dimension_e = 2;
2234#[doc = ": 4.27 bpp"]
2235pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_6x5:
2236    ktx_pack_astc_block_dimension_e = 3;
2237#[doc = ": 3.56 bpp"]
2238pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_6x6:
2239    ktx_pack_astc_block_dimension_e = 4;
2240#[doc = ": 3.20 bpp"]
2241pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_8x5:
2242    ktx_pack_astc_block_dimension_e = 5;
2243#[doc = ": 2.67 bpp"]
2244pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_8x6:
2245    ktx_pack_astc_block_dimension_e = 6;
2246#[doc = ": 2.56 bpp"]
2247pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_10x5:
2248    ktx_pack_astc_block_dimension_e = 7;
2249#[doc = ": 2.13 bpp"]
2250pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_10x6:
2251    ktx_pack_astc_block_dimension_e = 8;
2252#[doc = ": 2.00 bpp"]
2253pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_8x8:
2254    ktx_pack_astc_block_dimension_e = 9;
2255#[doc = ": 1.60 bpp"]
2256pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_10x8:
2257    ktx_pack_astc_block_dimension_e = 10;
2258#[doc = ": 1.28 bpp"]
2259pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_10x10:
2260    ktx_pack_astc_block_dimension_e = 11;
2261#[doc = ": 1.07 bpp"]
2262pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_12x10:
2263    ktx_pack_astc_block_dimension_e = 12;
2264#[doc = ": 0.89 bpp"]
2265pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_12x12:
2266    ktx_pack_astc_block_dimension_e = 13;
2267#[doc = ": 4.74 bpp"]
2268pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_3x3x3:
2269    ktx_pack_astc_block_dimension_e = 14;
2270#[doc = ": 3.56 bpp"]
2271pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_4x3x3:
2272    ktx_pack_astc_block_dimension_e = 15;
2273#[doc = ": 2.67 bpp"]
2274pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_4x4x3:
2275    ktx_pack_astc_block_dimension_e = 16;
2276#[doc = ": 2.00 bpp"]
2277pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_4x4x4:
2278    ktx_pack_astc_block_dimension_e = 17;
2279#[doc = ": 1.60 bpp"]
2280pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_5x4x4:
2281    ktx_pack_astc_block_dimension_e = 18;
2282#[doc = ": 1.28 bpp"]
2283pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_5x5x4:
2284    ktx_pack_astc_block_dimension_e = 19;
2285#[doc = ": 1.02 bpp"]
2286pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_5x5x5:
2287    ktx_pack_astc_block_dimension_e = 20;
2288#[doc = ": 0.85 bpp"]
2289pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_6x5x5:
2290    ktx_pack_astc_block_dimension_e = 21;
2291#[doc = ": 0.71 bpp"]
2292pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_6x6x5:
2293    ktx_pack_astc_block_dimension_e = 22;
2294#[doc = ": 0.59 bpp"]
2295pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_6x6x6:
2296    ktx_pack_astc_block_dimension_e = 23;
2297pub const ktx_pack_astc_block_dimension_e_KTX_PACK_ASTC_BLOCK_DIMENSION_MAX:
2298    ktx_pack_astc_block_dimension_e = 23;
2299#[doc = " @~English"]
2300#[doc = " @brief Options specifiying ASTC encoding block dimensions"]
2301pub type ktx_pack_astc_block_dimension_e = ::std::os::raw::c_uint;
2302pub const ktx_pack_astc_encoder_function_e_KTX_PACK_ASTC_ENCODER_FUNCTION_UNKNOWN:
2303    ktx_pack_astc_encoder_function_e = 0;
2304pub const ktx_pack_astc_encoder_function_e_KTX_PACK_ASTC_ENCODER_FUNCTION_SRGB:
2305    ktx_pack_astc_encoder_function_e = 1;
2306pub const ktx_pack_astc_encoder_function_e_KTX_PACK_ASTC_ENCODER_FUNCTION_LINEAR:
2307    ktx_pack_astc_encoder_function_e = 2;
2308pub const ktx_pack_astc_encoder_function_e_KTX_PACK_ASTC_ENCODER_FUNCTION_MAX:
2309    ktx_pack_astc_encoder_function_e = 2;
2310#[doc = " @~English"]
2311#[doc = " @brief Options specifiying ASTC encoder profile function"]
2312pub type ktx_pack_astc_encoder_function_e = ::std::os::raw::c_uint;
2313pub const ktx_pack_astc_encoder_mode_e_KTX_PACK_ASTC_ENCODER_MODE_DEFAULT:
2314    ktx_pack_astc_encoder_mode_e = 0;
2315pub const ktx_pack_astc_encoder_mode_e_KTX_PACK_ASTC_ENCODER_MODE_LDR:
2316    ktx_pack_astc_encoder_mode_e = 1;
2317pub const ktx_pack_astc_encoder_mode_e_KTX_PACK_ASTC_ENCODER_MODE_HDR:
2318    ktx_pack_astc_encoder_mode_e = 2;
2319pub const ktx_pack_astc_encoder_mode_e_KTX_PACK_ASTC_ENCODER_MODE_MAX:
2320    ktx_pack_astc_encoder_mode_e = 2;
2321#[doc = " @~English"]
2322#[doc = " @brief Options specifying ASTC encoder profile mode"]
2323#[doc = "        This and function is used later to derive the profile."]
2324pub type ktx_pack_astc_encoder_mode_e = ::std::os::raw::c_uint;
2325extern "C" {
2326    pub static KTX_ETC1S_DEFAULT_COMPRESSION_LEVEL: ktx_uint32_t;
2327}
2328#[doc = " @memberof ktxTexture"]
2329#[doc = " @~English"]
2330#[doc = " @brief Structure for passing extended parameters to"]
2331#[doc = "        ktxTexture_CompressAstc."]
2332#[doc = ""]
2333#[doc = " Passing a struct initialized to 0 (e.g. \" = {};\") will use the default"]
2334#[doc = " values. Only those settings to be modified need be non-zero."]
2335#[repr(C)]
2336#[derive(Debug, Copy, Clone)]
2337pub struct ktxAstcParams {
2338    pub structSize: ktx_uint32_t,
2339    pub verbose: ktx_bool_t,
2340    pub threadCount: ktx_uint32_t,
2341    #[doc = " astcenc params"]
2342    pub blockDimension: ktx_uint32_t,
2343    pub function: ktx_uint32_t,
2344    pub mode: ktx_uint32_t,
2345    pub qualityLevel: ktx_uint32_t,
2346    pub normalMap: ktx_bool_t,
2347    pub inputSwizzle: [::std::os::raw::c_char; 4usize],
2348}
2349#[test]
2350fn bindgen_test_layout_ktxAstcParams() {
2351    assert_eq!(
2352        ::std::mem::size_of::<ktxAstcParams>(),
2353        36usize,
2354        concat!("Size of: ", stringify!(ktxAstcParams))
2355    );
2356    assert_eq!(
2357        ::std::mem::align_of::<ktxAstcParams>(),
2358        4usize,
2359        concat!("Alignment of ", stringify!(ktxAstcParams))
2360    );
2361    assert_eq!(
2362        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).structSize as *const _ as usize },
2363        0usize,
2364        concat!(
2365            "Offset of field: ",
2366            stringify!(ktxAstcParams),
2367            "::",
2368            stringify!(structSize)
2369        )
2370    );
2371    assert_eq!(
2372        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).verbose as *const _ as usize },
2373        4usize,
2374        concat!(
2375            "Offset of field: ",
2376            stringify!(ktxAstcParams),
2377            "::",
2378            stringify!(verbose)
2379        )
2380    );
2381    assert_eq!(
2382        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).threadCount as *const _ as usize },
2383        8usize,
2384        concat!(
2385            "Offset of field: ",
2386            stringify!(ktxAstcParams),
2387            "::",
2388            stringify!(threadCount)
2389        )
2390    );
2391    assert_eq!(
2392        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).blockDimension as *const _ as usize },
2393        12usize,
2394        concat!(
2395            "Offset of field: ",
2396            stringify!(ktxAstcParams),
2397            "::",
2398            stringify!(blockDimension)
2399        )
2400    );
2401    assert_eq!(
2402        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).function as *const _ as usize },
2403        16usize,
2404        concat!(
2405            "Offset of field: ",
2406            stringify!(ktxAstcParams),
2407            "::",
2408            stringify!(function)
2409        )
2410    );
2411    assert_eq!(
2412        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).mode as *const _ as usize },
2413        20usize,
2414        concat!(
2415            "Offset of field: ",
2416            stringify!(ktxAstcParams),
2417            "::",
2418            stringify!(mode)
2419        )
2420    );
2421    assert_eq!(
2422        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).qualityLevel as *const _ as usize },
2423        24usize,
2424        concat!(
2425            "Offset of field: ",
2426            stringify!(ktxAstcParams),
2427            "::",
2428            stringify!(qualityLevel)
2429        )
2430    );
2431    assert_eq!(
2432        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).normalMap as *const _ as usize },
2433        28usize,
2434        concat!(
2435            "Offset of field: ",
2436            stringify!(ktxAstcParams),
2437            "::",
2438            stringify!(normalMap)
2439        )
2440    );
2441    assert_eq!(
2442        unsafe { &(*(::std::ptr::null::<ktxAstcParams>())).inputSwizzle as *const _ as usize },
2443        29usize,
2444        concat!(
2445            "Offset of field: ",
2446            stringify!(ktxAstcParams),
2447            "::",
2448            stringify!(inputSwizzle)
2449        )
2450    );
2451}
2452extern "C" {
2453    pub fn ktxTexture2_CompressAstcEx(
2454        This: *mut ktxTexture2,
2455        params: *mut ktxAstcParams,
2456    ) -> ktx_error_code_e;
2457}
2458extern "C" {
2459    pub fn ktxTexture2_CompressAstc(
2460        This: *mut ktxTexture2,
2461        quality: ktx_uint32_t,
2462    ) -> ktx_error_code_e;
2463}
2464#[doc = " @memberof ktxTexture2"]
2465#[doc = " @~English"]
2466#[doc = " @brief Structure for passing extended parameters to"]
2467#[doc = "        ktxTexture2_CompressBasisEx."]
2468#[doc = ""]
2469#[doc = " Passing a struct initialized to 0 (e.g. \" = {};\") will use the default"]
2470#[doc = " values. Only those settings to be modified need be non-zero."]
2471#[repr(C)]
2472#[derive(Debug, Copy, Clone)]
2473pub struct ktxBasisParams {
2474    pub structSize: ktx_uint32_t,
2475    pub uastc: ktx_bool_t,
2476    pub verbose: ktx_bool_t,
2477    pub noSSE: ktx_bool_t,
2478    pub threadCount: ktx_uint32_t,
2479    #[doc = " ETC1S params"]
2480    pub compressionLevel: ktx_uint32_t,
2481    pub qualityLevel: ktx_uint32_t,
2482    pub maxEndpoints: ktx_uint32_t,
2483    pub endpointRDOThreshold: f32,
2484    pub maxSelectors: ktx_uint32_t,
2485    pub selectorRDOThreshold: f32,
2486    pub inputSwizzle: [::std::os::raw::c_char; 4usize],
2487    pub normalMap: ktx_bool_t,
2488    pub separateRGToRGB_A: ktx_bool_t,
2489    pub preSwizzle: ktx_bool_t,
2490    pub noEndpointRDO: ktx_bool_t,
2491    pub noSelectorRDO: ktx_bool_t,
2492    #[doc = " UASTC params"]
2493    pub uastcFlags: ktx_pack_uastc_flags,
2494    pub uastcRDO: ktx_bool_t,
2495    pub uastcRDOQualityScalar: f32,
2496    pub uastcRDODictSize: ktx_uint32_t,
2497    pub uastcRDOMaxSmoothBlockErrorScale: f32,
2498    pub uastcRDOMaxSmoothBlockStdDev: f32,
2499    pub uastcRDODontFavorSimplerModes: ktx_bool_t,
2500    pub uastcRDONoMultithreading: ktx_bool_t,
2501}
2502#[test]
2503fn bindgen_test_layout_ktxBasisParams() {
2504    assert_eq!(
2505        ::std::mem::size_of::<ktxBasisParams>(),
2506        76usize,
2507        concat!("Size of: ", stringify!(ktxBasisParams))
2508    );
2509    assert_eq!(
2510        ::std::mem::align_of::<ktxBasisParams>(),
2511        4usize,
2512        concat!("Alignment of ", stringify!(ktxBasisParams))
2513    );
2514    assert_eq!(
2515        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).structSize as *const _ as usize },
2516        0usize,
2517        concat!(
2518            "Offset of field: ",
2519            stringify!(ktxBasisParams),
2520            "::",
2521            stringify!(structSize)
2522        )
2523    );
2524    assert_eq!(
2525        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).uastc as *const _ as usize },
2526        4usize,
2527        concat!(
2528            "Offset of field: ",
2529            stringify!(ktxBasisParams),
2530            "::",
2531            stringify!(uastc)
2532        )
2533    );
2534    assert_eq!(
2535        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).verbose as *const _ as usize },
2536        5usize,
2537        concat!(
2538            "Offset of field: ",
2539            stringify!(ktxBasisParams),
2540            "::",
2541            stringify!(verbose)
2542        )
2543    );
2544    assert_eq!(
2545        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).noSSE as *const _ as usize },
2546        6usize,
2547        concat!(
2548            "Offset of field: ",
2549            stringify!(ktxBasisParams),
2550            "::",
2551            stringify!(noSSE)
2552        )
2553    );
2554    assert_eq!(
2555        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).threadCount as *const _ as usize },
2556        8usize,
2557        concat!(
2558            "Offset of field: ",
2559            stringify!(ktxBasisParams),
2560            "::",
2561            stringify!(threadCount)
2562        )
2563    );
2564    assert_eq!(
2565        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).compressionLevel as *const _ as usize },
2566        12usize,
2567        concat!(
2568            "Offset of field: ",
2569            stringify!(ktxBasisParams),
2570            "::",
2571            stringify!(compressionLevel)
2572        )
2573    );
2574    assert_eq!(
2575        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).qualityLevel as *const _ as usize },
2576        16usize,
2577        concat!(
2578            "Offset of field: ",
2579            stringify!(ktxBasisParams),
2580            "::",
2581            stringify!(qualityLevel)
2582        )
2583    );
2584    assert_eq!(
2585        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).maxEndpoints as *const _ as usize },
2586        20usize,
2587        concat!(
2588            "Offset of field: ",
2589            stringify!(ktxBasisParams),
2590            "::",
2591            stringify!(maxEndpoints)
2592        )
2593    );
2594    assert_eq!(
2595        unsafe {
2596            &(*(::std::ptr::null::<ktxBasisParams>())).endpointRDOThreshold as *const _ as usize
2597        },
2598        24usize,
2599        concat!(
2600            "Offset of field: ",
2601            stringify!(ktxBasisParams),
2602            "::",
2603            stringify!(endpointRDOThreshold)
2604        )
2605    );
2606    assert_eq!(
2607        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).maxSelectors as *const _ as usize },
2608        28usize,
2609        concat!(
2610            "Offset of field: ",
2611            stringify!(ktxBasisParams),
2612            "::",
2613            stringify!(maxSelectors)
2614        )
2615    );
2616    assert_eq!(
2617        unsafe {
2618            &(*(::std::ptr::null::<ktxBasisParams>())).selectorRDOThreshold as *const _ as usize
2619        },
2620        32usize,
2621        concat!(
2622            "Offset of field: ",
2623            stringify!(ktxBasisParams),
2624            "::",
2625            stringify!(selectorRDOThreshold)
2626        )
2627    );
2628    assert_eq!(
2629        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).inputSwizzle as *const _ as usize },
2630        36usize,
2631        concat!(
2632            "Offset of field: ",
2633            stringify!(ktxBasisParams),
2634            "::",
2635            stringify!(inputSwizzle)
2636        )
2637    );
2638    assert_eq!(
2639        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).normalMap as *const _ as usize },
2640        40usize,
2641        concat!(
2642            "Offset of field: ",
2643            stringify!(ktxBasisParams),
2644            "::",
2645            stringify!(normalMap)
2646        )
2647    );
2648    assert_eq!(
2649        unsafe {
2650            &(*(::std::ptr::null::<ktxBasisParams>())).separateRGToRGB_A as *const _ as usize
2651        },
2652        41usize,
2653        concat!(
2654            "Offset of field: ",
2655            stringify!(ktxBasisParams),
2656            "::",
2657            stringify!(separateRGToRGB_A)
2658        )
2659    );
2660    assert_eq!(
2661        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).preSwizzle as *const _ as usize },
2662        42usize,
2663        concat!(
2664            "Offset of field: ",
2665            stringify!(ktxBasisParams),
2666            "::",
2667            stringify!(preSwizzle)
2668        )
2669    );
2670    assert_eq!(
2671        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).noEndpointRDO as *const _ as usize },
2672        43usize,
2673        concat!(
2674            "Offset of field: ",
2675            stringify!(ktxBasisParams),
2676            "::",
2677            stringify!(noEndpointRDO)
2678        )
2679    );
2680    assert_eq!(
2681        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).noSelectorRDO as *const _ as usize },
2682        44usize,
2683        concat!(
2684            "Offset of field: ",
2685            stringify!(ktxBasisParams),
2686            "::",
2687            stringify!(noSelectorRDO)
2688        )
2689    );
2690    assert_eq!(
2691        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).uastcFlags as *const _ as usize },
2692        48usize,
2693        concat!(
2694            "Offset of field: ",
2695            stringify!(ktxBasisParams),
2696            "::",
2697            stringify!(uastcFlags)
2698        )
2699    );
2700    assert_eq!(
2701        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDO as *const _ as usize },
2702        52usize,
2703        concat!(
2704            "Offset of field: ",
2705            stringify!(ktxBasisParams),
2706            "::",
2707            stringify!(uastcRDO)
2708        )
2709    );
2710    assert_eq!(
2711        unsafe {
2712            &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDOQualityScalar as *const _ as usize
2713        },
2714        56usize,
2715        concat!(
2716            "Offset of field: ",
2717            stringify!(ktxBasisParams),
2718            "::",
2719            stringify!(uastcRDOQualityScalar)
2720        )
2721    );
2722    assert_eq!(
2723        unsafe { &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDODictSize as *const _ as usize },
2724        60usize,
2725        concat!(
2726            "Offset of field: ",
2727            stringify!(ktxBasisParams),
2728            "::",
2729            stringify!(uastcRDODictSize)
2730        )
2731    );
2732    assert_eq!(
2733        unsafe {
2734            &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDOMaxSmoothBlockErrorScale as *const _
2735                as usize
2736        },
2737        64usize,
2738        concat!(
2739            "Offset of field: ",
2740            stringify!(ktxBasisParams),
2741            "::",
2742            stringify!(uastcRDOMaxSmoothBlockErrorScale)
2743        )
2744    );
2745    assert_eq!(
2746        unsafe {
2747            &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDOMaxSmoothBlockStdDev as *const _
2748                as usize
2749        },
2750        68usize,
2751        concat!(
2752            "Offset of field: ",
2753            stringify!(ktxBasisParams),
2754            "::",
2755            stringify!(uastcRDOMaxSmoothBlockStdDev)
2756        )
2757    );
2758    assert_eq!(
2759        unsafe {
2760            &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDODontFavorSimplerModes as *const _
2761                as usize
2762        },
2763        72usize,
2764        concat!(
2765            "Offset of field: ",
2766            stringify!(ktxBasisParams),
2767            "::",
2768            stringify!(uastcRDODontFavorSimplerModes)
2769        )
2770    );
2771    assert_eq!(
2772        unsafe {
2773            &(*(::std::ptr::null::<ktxBasisParams>())).uastcRDONoMultithreading as *const _ as usize
2774        },
2775        73usize,
2776        concat!(
2777            "Offset of field: ",
2778            stringify!(ktxBasisParams),
2779            "::",
2780            stringify!(uastcRDONoMultithreading)
2781        )
2782    );
2783}
2784extern "C" {
2785    pub fn ktxTexture2_CompressBasisEx(
2786        This: *mut ktxTexture2,
2787        params: *mut ktxBasisParams,
2788    ) -> ktx_error_code_e;
2789}
2790#[doc = " ETC1-2"]
2791pub const ktx_transcode_fmt_e_KTX_TTF_ETC1_RGB: ktx_transcode_fmt_e = 0;
2792pub const ktx_transcode_fmt_e_KTX_TTF_ETC2_RGBA: ktx_transcode_fmt_e = 1;
2793#[doc = " BC1-5, BC7 (desktop, some mobile devices)"]
2794pub const ktx_transcode_fmt_e_KTX_TTF_BC1_RGB: ktx_transcode_fmt_e = 2;
2795pub const ktx_transcode_fmt_e_KTX_TTF_BC3_RGBA: ktx_transcode_fmt_e = 3;
2796pub const ktx_transcode_fmt_e_KTX_TTF_BC4_R: ktx_transcode_fmt_e = 4;
2797pub const ktx_transcode_fmt_e_KTX_TTF_BC5_RG: ktx_transcode_fmt_e = 5;
2798pub const ktx_transcode_fmt_e_KTX_TTF_BC7_RGBA: ktx_transcode_fmt_e = 6;
2799#[doc = " PVRTC1 4bpp (mobile, PowerVR devices)"]
2800pub const ktx_transcode_fmt_e_KTX_TTF_PVRTC1_4_RGB: ktx_transcode_fmt_e = 8;
2801pub const ktx_transcode_fmt_e_KTX_TTF_PVRTC1_4_RGBA: ktx_transcode_fmt_e = 9;
2802#[doc = " ASTC (mobile, Intel devices, hopefully all desktop GPU's one day)"]
2803pub const ktx_transcode_fmt_e_KTX_TTF_ASTC_4x4_RGBA: ktx_transcode_fmt_e = 10;
2804#[doc = " ATC and FXT1 formats are not supported by KTX2 as there"]
2805#[doc = " are no equivalent VkFormats."]
2806pub const ktx_transcode_fmt_e_KTX_TTF_PVRTC2_4_RGB: ktx_transcode_fmt_e = 18;
2807pub const ktx_transcode_fmt_e_KTX_TTF_PVRTC2_4_RGBA: ktx_transcode_fmt_e = 19;
2808pub const ktx_transcode_fmt_e_KTX_TTF_ETC2_EAC_R11: ktx_transcode_fmt_e = 20;
2809pub const ktx_transcode_fmt_e_KTX_TTF_ETC2_EAC_RG11: ktx_transcode_fmt_e = 21;
2810#[doc = " Uncompressed (raw pixel) formats"]
2811pub const ktx_transcode_fmt_e_KTX_TTF_RGBA32: ktx_transcode_fmt_e = 13;
2812pub const ktx_transcode_fmt_e_KTX_TTF_RGB565: ktx_transcode_fmt_e = 14;
2813pub const ktx_transcode_fmt_e_KTX_TTF_BGR565: ktx_transcode_fmt_e = 15;
2814pub const ktx_transcode_fmt_e_KTX_TTF_RGBA4444: ktx_transcode_fmt_e = 16;
2815#[doc = " Values for automatic selection of RGB or RGBA depending if alpha"]
2816#[doc = " present."]
2817pub const ktx_transcode_fmt_e_KTX_TTF_ETC: ktx_transcode_fmt_e = 22;
2818pub const ktx_transcode_fmt_e_KTX_TTF_BC1_OR_3: ktx_transcode_fmt_e = 23;
2819pub const ktx_transcode_fmt_e_KTX_TTF_NOSELECTION: ktx_transcode_fmt_e = 2147483647;
2820#[doc = " Old enums for compatibility with code compiled against previous"]
2821#[doc = " versions of libktx."]
2822pub const ktx_transcode_fmt_e_KTX_TF_ETC1: ktx_transcode_fmt_e = 0;
2823pub const ktx_transcode_fmt_e_KTX_TF_ETC2: ktx_transcode_fmt_e = 22;
2824pub const ktx_transcode_fmt_e_KTX_TF_BC1: ktx_transcode_fmt_e = 2;
2825pub const ktx_transcode_fmt_e_KTX_TF_BC3: ktx_transcode_fmt_e = 3;
2826pub const ktx_transcode_fmt_e_KTX_TF_BC4: ktx_transcode_fmt_e = 4;
2827pub const ktx_transcode_fmt_e_KTX_TF_BC5: ktx_transcode_fmt_e = 5;
2828pub const ktx_transcode_fmt_e_KTX_TTF_BC7_M6_RGB: ktx_transcode_fmt_e = 6;
2829pub const ktx_transcode_fmt_e_KTX_TTF_BC7_M5_RGBA: ktx_transcode_fmt_e = 6;
2830pub const ktx_transcode_fmt_e_KTX_TF_BC7_M6_OPAQUE_ONLY: ktx_transcode_fmt_e = 6;
2831pub const ktx_transcode_fmt_e_KTX_TF_PVRTC1_4_OPAQUE_ONLY: ktx_transcode_fmt_e = 8;
2832#[doc = " @~English"]
2833#[doc = " @brief Enumerators for specifying the transcode target format."]
2834#[doc = ""]
2835#[doc = " For BasisU/ETC1S format, @e Opaque and @e alpha here refer to 2 separate"]
2836#[doc = " RGB images, a.k.a slices within the BasisU compressed data. For UASTC"]
2837#[doc = " format they refer to the RGB and the alpha components of the UASTC data. If"]
2838#[doc = " the original image had only 2 components, R will be in the opaque portion"]
2839#[doc = " and G in the alpha portion. The R value will be replicated in the RGB"]
2840#[doc = " components. In the case of BasisU the G value will be replicated in all 3"]
2841#[doc = " components of the alpha slice. If the original image had only 1 component"]
2842#[doc = " it's value is replicated in all 3 components of the opaque portion and"]
2843#[doc = " there is no alpha."]
2844#[doc = ""]
2845#[doc = " @note You should not transcode sRGB encoded data to @c KTX_TTF_BC4_R,"]
2846#[doc = " @c KTX_TTF_BC5_RG, @c KTX_TTF_ETC2_EAC_R{,G}11, @c KTX_TTF_RGB565,"]
2847#[doc = " @c KTX_TTF_BGR565 or @c KTX_TTF_RGBA4444 formats as neither OpenGL nor"]
2848#[doc = " Vulkan support sRGB variants of these. Doing sRGB decoding in the shader"]
2849#[doc = " will not produce correct results if any texture filtering is being used."]
2850pub type ktx_transcode_fmt_e = ::std::os::raw::c_uint;
2851pub const ktx_transcode_flag_bits_e_KTX_TF_PVRTC_DECODE_TO_NEXT_POW2: ktx_transcode_flag_bits_e = 2;
2852pub const ktx_transcode_flag_bits_e_KTX_TF_TRANSCODE_ALPHA_DATA_TO_OPAQUE_FORMATS:
2853    ktx_transcode_flag_bits_e = 4;
2854pub const ktx_transcode_flag_bits_e_KTX_TF_HIGH_QUALITY: ktx_transcode_flag_bits_e = 32;
2855#[doc = " @~English"]
2856#[doc = " @brief Flags guiding transcoding of Basis Universal compressed textures."]
2857pub type ktx_transcode_flag_bits_e = ::std::os::raw::c_uint;
2858pub type ktx_transcode_flags = ktx_uint32_t;
2859extern "C" {
2860    pub fn ktxTexture2_TranscodeBasis(
2861        This: *mut ktxTexture2,
2862        fmt: ktx_transcode_fmt_e,
2863        transcodeFlags: ktx_transcode_flags,
2864    ) -> ktx_error_code_e;
2865}
2866extern "C" {
2867    #[doc = " Returns a string corresponding to a KTX error code."]
2868    pub fn ktxErrorString(error: ktx_error_code_e) -> *const ::std::os::raw::c_char;
2869}
2870extern "C" {
2871    #[doc = " Returns a string corresponding to a supercompression scheme."]
2872    pub fn ktxSupercompressionSchemeString(
2873        scheme: ktxSupercmpScheme,
2874    ) -> *const ::std::os::raw::c_char;
2875}
2876extern "C" {
2877    #[doc = " Returns a string corresponding to a transcode target format."]
2878    pub fn ktxTranscodeFormatString(format: ktx_transcode_fmt_e) -> *const ::std::os::raw::c_char;
2879}
2880extern "C" {
2881    pub fn ktxHashList_Create(ppHl: *mut *mut ktxHashList) -> ktx_error_code_e;
2882}
2883extern "C" {
2884    pub fn ktxHashList_CreateCopy(
2885        ppHl: *mut *mut ktxHashList,
2886        orig: ktxHashList,
2887    ) -> ktx_error_code_e;
2888}
2889extern "C" {
2890    pub fn ktxHashList_Construct(pHl: *mut ktxHashList);
2891}
2892extern "C" {
2893    pub fn ktxHashList_ConstructCopy(pHl: *mut ktxHashList, orig: ktxHashList);
2894}
2895extern "C" {
2896    pub fn ktxHashList_Destroy(head: *mut ktxHashList);
2897}
2898extern "C" {
2899    pub fn ktxHashList_Destruct(head: *mut ktxHashList);
2900}
2901extern "C" {
2902    #[doc = " Adds a key-value pair to a hash list."]
2903    pub fn ktxHashList_AddKVPair(
2904        pHead: *mut ktxHashList,
2905        key: *const ::std::os::raw::c_char,
2906        valueLen: ::std::os::raw::c_uint,
2907        value: *const ::std::os::raw::c_void,
2908    ) -> ktx_error_code_e;
2909}
2910extern "C" {
2911    #[doc = " Deletes a ktxHashListEntry from a ktxHashList."]
2912    pub fn ktxHashList_DeleteEntry(
2913        pHead: *mut ktxHashList,
2914        pEntry: *mut ktxHashListEntry,
2915    ) -> ktx_error_code_e;
2916}
2917extern "C" {
2918    #[doc = " Finds the entry for a key in a ktxHashList and deletes it."]
2919    pub fn ktxHashList_DeleteKVPair(
2920        pHead: *mut ktxHashList,
2921        key: *const ::std::os::raw::c_char,
2922    ) -> ktx_error_code_e;
2923}
2924extern "C" {
2925    #[doc = " Looks up a key and returns the ktxHashListEntry."]
2926    pub fn ktxHashList_FindEntry(
2927        pHead: *mut ktxHashList,
2928        key: *const ::std::os::raw::c_char,
2929        ppEntry: *mut *mut ktxHashListEntry,
2930    ) -> ktx_error_code_e;
2931}
2932extern "C" {
2933    #[doc = " Looks up a key and returns the value."]
2934    pub fn ktxHashList_FindValue(
2935        pHead: *mut ktxHashList,
2936        key: *const ::std::os::raw::c_char,
2937        pValueLen: *mut ::std::os::raw::c_uint,
2938        pValue: *mut *mut ::std::os::raw::c_void,
2939    ) -> ktx_error_code_e;
2940}
2941extern "C" {
2942    #[doc = " Return the next entry in a ktxHashList."]
2943    pub fn ktxHashList_Next(entry: *mut ktxHashListEntry) -> *mut ktxHashListEntry;
2944}
2945extern "C" {
2946    #[doc = " Sorts a ktxHashList into order of the key codepoints."]
2947    pub fn ktxHashList_Sort(pHead: *mut ktxHashList) -> ktx_error_code_e;
2948}
2949extern "C" {
2950    #[doc = " Serializes a ktxHashList to a block of memory suitable for"]
2951    #[doc = " writing to a KTX file."]
2952    pub fn ktxHashList_Serialize(
2953        pHead: *mut ktxHashList,
2954        kvdLen: *mut ::std::os::raw::c_uint,
2955        kvd: *mut *mut ::std::os::raw::c_uchar,
2956    ) -> ktx_error_code_e;
2957}
2958extern "C" {
2959    #[doc = " Creates a hash table from the serialized data read from a"]
2960    #[doc = " a KTX file."]
2961    pub fn ktxHashList_Deserialize(
2962        pHead: *mut ktxHashList,
2963        kvdLen: ::std::os::raw::c_uint,
2964        kvd: *mut ::std::os::raw::c_void,
2965    ) -> ktx_error_code_e;
2966}
2967extern "C" {
2968    #[doc = " Get the key from a ktxHashListEntry"]
2969    pub fn ktxHashListEntry_GetKey(
2970        This: *mut ktxHashListEntry,
2971        pKeyLen: *mut ::std::os::raw::c_uint,
2972        ppKey: *mut *mut ::std::os::raw::c_char,
2973    ) -> ktx_error_code_e;
2974}
2975extern "C" {
2976    #[doc = " Get the value from a ktxHashListEntry"]
2977    pub fn ktxHashListEntry_GetValue(
2978        This: *mut ktxHashListEntry,
2979        pValueLen: *mut ::std::os::raw::c_uint,
2980        ppValue: *mut *mut ::std::os::raw::c_void,
2981    ) -> ktx_error_code_e;
2982}
2983extern "C" {
2984    #[doc = "===========================================================*"]
2985    #[doc = " Utilities for printing info about a KTX file.             *"]
2986    #[doc = "==========================================================="]
2987    pub fn ktxPrintInfoForStdioStream(stdioStream: *mut FILE) -> ktx_error_code_e;
2988}
2989extern "C" {
2990    pub fn ktxPrintInfoForNamedFile(filename: *const ::std::os::raw::c_char) -> ktx_error_code_e;
2991}
2992extern "C" {
2993    pub fn ktxPrintInfoForMemory(bytes: *const ktx_uint8_t, size: ktx_size_t) -> ktx_error_code_e;
2994}
2995pub const ktxFormatSizeFlagBits_KTX_FORMAT_SIZE_PACKED_BIT: ktxFormatSizeFlagBits = 1;
2996pub const ktxFormatSizeFlagBits_KTX_FORMAT_SIZE_COMPRESSED_BIT: ktxFormatSizeFlagBits = 2;
2997pub const ktxFormatSizeFlagBits_KTX_FORMAT_SIZE_PALETTIZED_BIT: ktxFormatSizeFlagBits = 4;
2998pub const ktxFormatSizeFlagBits_KTX_FORMAT_SIZE_DEPTH_BIT: ktxFormatSizeFlagBits = 8;
2999pub const ktxFormatSizeFlagBits_KTX_FORMAT_SIZE_STENCIL_BIT: ktxFormatSizeFlagBits = 16;
3000pub type ktxFormatSizeFlagBits = ::std::os::raw::c_uint;
3001pub type ktxFormatSizeFlags = ktx_uint32_t;
3002#[doc = " @brief Structure for holding size information for a texture format."]
3003#[repr(C)]
3004#[derive(Debug, Copy, Clone)]
3005pub struct ktxFormatSize {
3006    pub flags: ktxFormatSizeFlags,
3007    #[doc = " For KTX1."]
3008    pub paletteSizeInBits: ::std::os::raw::c_uint,
3009    pub blockSizeInBits: ::std::os::raw::c_uint,
3010    #[doc = " in texels"]
3011    pub blockWidth: ::std::os::raw::c_uint,
3012    #[doc = " in texels"]
3013    pub blockHeight: ::std::os::raw::c_uint,
3014    #[doc = " in texels"]
3015    pub blockDepth: ::std::os::raw::c_uint,
3016    #[doc = " Minimum required number of blocks"]
3017    pub minBlocksX: ::std::os::raw::c_uint,
3018    pub minBlocksY: ::std::os::raw::c_uint,
3019}
3020#[test]
3021fn bindgen_test_layout_ktxFormatSize() {
3022    assert_eq!(
3023        ::std::mem::size_of::<ktxFormatSize>(),
3024        32usize,
3025        concat!("Size of: ", stringify!(ktxFormatSize))
3026    );
3027    assert_eq!(
3028        ::std::mem::align_of::<ktxFormatSize>(),
3029        4usize,
3030        concat!("Alignment of ", stringify!(ktxFormatSize))
3031    );
3032    assert_eq!(
3033        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).flags as *const _ as usize },
3034        0usize,
3035        concat!(
3036            "Offset of field: ",
3037            stringify!(ktxFormatSize),
3038            "::",
3039            stringify!(flags)
3040        )
3041    );
3042    assert_eq!(
3043        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).paletteSizeInBits as *const _ as usize },
3044        4usize,
3045        concat!(
3046            "Offset of field: ",
3047            stringify!(ktxFormatSize),
3048            "::",
3049            stringify!(paletteSizeInBits)
3050        )
3051    );
3052    assert_eq!(
3053        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).blockSizeInBits as *const _ as usize },
3054        8usize,
3055        concat!(
3056            "Offset of field: ",
3057            stringify!(ktxFormatSize),
3058            "::",
3059            stringify!(blockSizeInBits)
3060        )
3061    );
3062    assert_eq!(
3063        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).blockWidth as *const _ as usize },
3064        12usize,
3065        concat!(
3066            "Offset of field: ",
3067            stringify!(ktxFormatSize),
3068            "::",
3069            stringify!(blockWidth)
3070        )
3071    );
3072    assert_eq!(
3073        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).blockHeight as *const _ as usize },
3074        16usize,
3075        concat!(
3076            "Offset of field: ",
3077            stringify!(ktxFormatSize),
3078            "::",
3079            stringify!(blockHeight)
3080        )
3081    );
3082    assert_eq!(
3083        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).blockDepth as *const _ as usize },
3084        20usize,
3085        concat!(
3086            "Offset of field: ",
3087            stringify!(ktxFormatSize),
3088            "::",
3089            stringify!(blockDepth)
3090        )
3091    );
3092    assert_eq!(
3093        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).minBlocksX as *const _ as usize },
3094        24usize,
3095        concat!(
3096            "Offset of field: ",
3097            stringify!(ktxFormatSize),
3098            "::",
3099            stringify!(minBlocksX)
3100        )
3101    );
3102    assert_eq!(
3103        unsafe { &(*(::std::ptr::null::<ktxFormatSize>())).minBlocksY as *const _ as usize },
3104        28usize,
3105        concat!(
3106            "Offset of field: ",
3107            stringify!(ktxFormatSize),
3108            "::",
3109            stringify!(minBlocksY)
3110        )
3111    );
3112}
3113extern "C" {
3114    pub fn ktxFormatSize_initFromDfd(This: *mut ktxFormatSize, pDfd: *mut ktx_uint32_t) -> bool;
3115}
3116pub const ktxFormatVersionEnum_KTX_FORMAT_VERSION_ONE: ktxFormatVersionEnum = 1;
3117pub const ktxFormatVersionEnum_KTX_FORMAT_VERSION_TWO: ktxFormatVersionEnum = 2;
3118pub type ktxFormatVersionEnum = ::std::os::raw::c_uint;
3119pub type PFNCALCDATASIZELEVELS = ::std::option::Option<
3120    unsafe extern "C" fn(This: *mut ktxTexture, levels: ktx_uint32_t) -> ktx_size_t,
3121>;
3122pub type PFNCALCFACELODSIZE = ::std::option::Option<
3123    unsafe extern "C" fn(This: *mut ktxTexture, level: ktx_uint32_t) -> ktx_size_t,
3124>;
3125pub type PFNCALCLEVELOFFSET = ::std::option::Option<
3126    unsafe extern "C" fn(This: *mut ktxTexture, level: ktx_uint32_t) -> ktx_size_t,
3127>;
3128#[repr(C)]
3129#[derive(Debug, Copy, Clone)]
3130pub struct ktxTexture_vtblInt {
3131    pub calcDataSizeLevels: PFNCALCDATASIZELEVELS,
3132    pub calcFaceLodSize: PFNCALCFACELODSIZE,
3133    pub calcLevelOffset: PFNCALCLEVELOFFSET,
3134}
3135#[test]
3136fn bindgen_test_layout_ktxTexture_vtblInt() {
3137    assert_eq!(
3138        ::std::mem::size_of::<ktxTexture_vtblInt>(),
3139        24usize,
3140        concat!("Size of: ", stringify!(ktxTexture_vtblInt))
3141    );
3142    assert_eq!(
3143        ::std::mem::align_of::<ktxTexture_vtblInt>(),
3144        8usize,
3145        concat!("Alignment of ", stringify!(ktxTexture_vtblInt))
3146    );
3147    assert_eq!(
3148        unsafe {
3149            &(*(::std::ptr::null::<ktxTexture_vtblInt>())).calcDataSizeLevels as *const _ as usize
3150        },
3151        0usize,
3152        concat!(
3153            "Offset of field: ",
3154            stringify!(ktxTexture_vtblInt),
3155            "::",
3156            stringify!(calcDataSizeLevels)
3157        )
3158    );
3159    assert_eq!(
3160        unsafe {
3161            &(*(::std::ptr::null::<ktxTexture_vtblInt>())).calcFaceLodSize as *const _ as usize
3162        },
3163        8usize,
3164        concat!(
3165            "Offset of field: ",
3166            stringify!(ktxTexture_vtblInt),
3167            "::",
3168            stringify!(calcFaceLodSize)
3169        )
3170    );
3171    assert_eq!(
3172        unsafe {
3173            &(*(::std::ptr::null::<ktxTexture_vtblInt>())).calcLevelOffset as *const _ as usize
3174        },
3175        16usize,
3176        concat!(
3177            "Offset of field: ",
3178            stringify!(ktxTexture_vtblInt),
3179            "::",
3180            stringify!(calcLevelOffset)
3181        )
3182    );
3183}
3184#[doc = " @memberof ktxTexture"]
3185#[doc = " @~English"]
3186#[doc = ""]
3187#[doc = " @brief protected members of ktxTexture."]
3188#[repr(C)]
3189pub struct ktxTexture_protected {
3190    pub _vtbl: ktxTexture_vtblInt,
3191    pub _formatSize: ktxFormatSize,
3192    pub _typeSize: ktx_uint32_t,
3193    pub _stream: ktxStream,
3194}
3195#[test]
3196fn bindgen_test_layout_ktxTexture_protected() {
3197    assert_eq!(
3198        ::std::mem::size_of::<ktxTexture_protected>(),
3199        168usize,
3200        concat!("Size of: ", stringify!(ktxTexture_protected))
3201    );
3202    assert_eq!(
3203        ::std::mem::align_of::<ktxTexture_protected>(),
3204        8usize,
3205        concat!("Alignment of ", stringify!(ktxTexture_protected))
3206    );
3207    assert_eq!(
3208        unsafe { &(*(::std::ptr::null::<ktxTexture_protected>()))._vtbl as *const _ as usize },
3209        0usize,
3210        concat!(
3211            "Offset of field: ",
3212            stringify!(ktxTexture_protected),
3213            "::",
3214            stringify!(_vtbl)
3215        )
3216    );
3217    assert_eq!(
3218        unsafe {
3219            &(*(::std::ptr::null::<ktxTexture_protected>()))._formatSize as *const _ as usize
3220        },
3221        24usize,
3222        concat!(
3223            "Offset of field: ",
3224            stringify!(ktxTexture_protected),
3225            "::",
3226            stringify!(_formatSize)
3227        )
3228    );
3229    assert_eq!(
3230        unsafe { &(*(::std::ptr::null::<ktxTexture_protected>()))._typeSize as *const _ as usize },
3231        56usize,
3232        concat!(
3233            "Offset of field: ",
3234            stringify!(ktxTexture_protected),
3235            "::",
3236            stringify!(_typeSize)
3237        )
3238    );
3239    assert_eq!(
3240        unsafe { &(*(::std::ptr::null::<ktxTexture_protected>()))._stream as *const _ as usize },
3241        64usize,
3242        concat!(
3243            "Offset of field: ",
3244            stringify!(ktxTexture_protected),
3245            "::",
3246            stringify!(_stream)
3247        )
3248    );
3249}
3250extern "C" {
3251    pub fn ktxTexture_iterateLoadedImages(
3252        This: *mut ktxTexture,
3253        iterCb: PFNKTXITERCB,
3254        userdata: *mut ::std::os::raw::c_void,
3255    ) -> ktx_error_code_e;
3256}
3257extern "C" {
3258    pub fn ktxTexture_iterateSourceImages(
3259        This: *mut ktxTexture,
3260        iterCb: PFNKTXITERCB,
3261        userdata: *mut ::std::os::raw::c_void,
3262    ) -> ktx_error_code_e;
3263}
3264extern "C" {
3265    pub fn ktxTexture_calcDataSizeTexture(This: *mut ktxTexture) -> ktx_size_t;
3266}
3267extern "C" {
3268    pub fn ktxTexture_calcImageSize(
3269        This: *mut ktxTexture,
3270        level: ktx_uint32_t,
3271        fv: ktxFormatVersionEnum,
3272    ) -> ktx_size_t;
3273}
3274extern "C" {
3275    pub fn ktxTexture_isActiveStream(This: *mut ktxTexture) -> ktx_bool_t;
3276}
3277extern "C" {
3278    pub fn ktxTexture_calcLevelSize(
3279        This: *mut ktxTexture,
3280        level: ktx_uint32_t,
3281        fv: ktxFormatVersionEnum,
3282    ) -> ktx_size_t;
3283}
3284extern "C" {
3285    pub fn ktxTexture_doCalcFaceLodSize(
3286        This: *mut ktxTexture,
3287        level: ktx_uint32_t,
3288        fv: ktxFormatVersionEnum,
3289    ) -> ktx_size_t;
3290}
3291extern "C" {
3292    pub fn ktxTexture_layerSize(
3293        This: *mut ktxTexture,
3294        level: ktx_uint32_t,
3295        fv: ktxFormatVersionEnum,
3296    ) -> ktx_size_t;
3297}
3298extern "C" {
3299    pub fn ktxTexture_rowInfo(
3300        This: *mut ktxTexture,
3301        level: ktx_uint32_t,
3302        numRows: *mut ktx_uint32_t,
3303        rowBytes: *mut ktx_uint32_t,
3304        rowPadding: *mut ktx_uint32_t,
3305    );
3306}
3307extern "C" {
3308    pub fn ktxTexture_construct(
3309        This: *mut ktxTexture,
3310        createInfo: *mut ktxTextureCreateInfo,
3311        formatSize: *mut ktxFormatSize,
3312    ) -> ktx_error_code_e;
3313}
3314extern "C" {
3315    pub fn ktxTexture_constructFromStream(
3316        This: *mut ktxTexture,
3317        pStream: *mut ktxStream,
3318        createFlags: ktxTextureCreateFlags,
3319    ) -> ktx_error_code_e;
3320}
3321extern "C" {
3322    pub fn ktxTexture_destruct(This: *mut ktxTexture);
3323}
3324#[repr(C)]
3325#[derive(Debug, Copy, Clone)]
3326pub struct ktxTexture_vvtbl {
3327    pub _address: u8,
3328}
3329#[doc = "< Private data."]
3330#[repr(C)]
3331#[derive(Debug, Copy, Clone)]
3332pub struct ktxTexture1_private {
3333    pub _address: u8,
3334}
3335#[doc = "< Private data."]
3336#[repr(C)]
3337#[derive(Debug, Copy, Clone)]
3338pub struct ktxTexture2_private {
3339    pub _address: u8,
3340}