1pub const __GNUC_VA_LIST: u32 = 1;
4pub const true_: u32 = 1;
5pub const false_: u32 = 0;
6pub const __bool_true_false_are_defined: u32 = 1;
7pub const _STDINT_H: u32 = 1;
8pub const _FEATURES_H: u32 = 1;
9pub const _DEFAULT_SOURCE: u32 = 1;
10pub const __GLIBC_USE_ISOC2X: u32 = 0;
11pub const __USE_ISOC11: u32 = 1;
12pub const __USE_ISOC99: u32 = 1;
13pub const __USE_ISOC95: u32 = 1;
14pub const __USE_POSIX_IMPLICITLY: u32 = 1;
15pub const _POSIX_SOURCE: u32 = 1;
16pub const _POSIX_C_SOURCE: u32 = 200809;
17pub const __USE_POSIX: u32 = 1;
18pub const __USE_POSIX2: u32 = 1;
19pub const __USE_POSIX199309: u32 = 1;
20pub const __USE_POSIX199506: u32 = 1;
21pub const __USE_XOPEN2K: u32 = 1;
22pub const __USE_XOPEN2K8: u32 = 1;
23pub const _ATFILE_SOURCE: u32 = 1;
24pub const __WORDSIZE: u32 = 64;
25pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
26pub const __SYSCALL_WORDSIZE: u32 = 64;
27pub const __TIMESIZE: u32 = 64;
28pub const __USE_MISC: u32 = 1;
29pub const __USE_ATFILE: u32 = 1;
30pub const __USE_FORTIFY_LEVEL: u32 = 0;
31pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
32pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
33pub const _STDC_PREDEF_H: u32 = 1;
34pub const __STDC_IEC_559__: u32 = 1;
35pub const __STDC_IEC_60559_BFP__: u32 = 201404;
36pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
37pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
38pub const __STDC_ISO_10646__: u32 = 201706;
39pub const __GNU_LIBRARY__: u32 = 6;
40pub const __GLIBC__: u32 = 2;
41pub const __GLIBC_MINOR__: u32 = 35;
42pub const _SYS_CDEFS_H: u32 = 1;
43pub const __glibc_c99_flexarr_available: u32 = 1;
44pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
45pub const __HAVE_GENERIC_SELECTION: u32 = 1;
46pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
47pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
48pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
49pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
50pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
51pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
52pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
53pub const _BITS_TYPES_H: u32 = 1;
54pub const _BITS_TYPESIZES_H: u32 = 1;
55pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
56pub const __INO_T_MATCHES_INO64_T: u32 = 1;
57pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
58pub const __STATFS_MATCHES_STATFS64: u32 = 1;
59pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
60pub const __FD_SETSIZE: u32 = 1024;
61pub const _BITS_TIME64_H: u32 = 1;
62pub const _BITS_WCHAR_H: u32 = 1;
63pub const _BITS_STDINT_INTN_H: u32 = 1;
64pub const _BITS_STDINT_UINTN_H: u32 = 1;
65pub const INT8_MIN: i32 = -128;
66pub const INT16_MIN: i32 = -32768;
67pub const INT32_MIN: i32 = -2147483648;
68pub const INT8_MAX: u32 = 127;
69pub const INT16_MAX: u32 = 32767;
70pub const INT32_MAX: u32 = 2147483647;
71pub const UINT8_MAX: u32 = 255;
72pub const UINT16_MAX: u32 = 65535;
73pub const UINT32_MAX: u32 = 4294967295;
74pub const INT_LEAST8_MIN: i32 = -128;
75pub const INT_LEAST16_MIN: i32 = -32768;
76pub const INT_LEAST32_MIN: i32 = -2147483648;
77pub const INT_LEAST8_MAX: u32 = 127;
78pub const INT_LEAST16_MAX: u32 = 32767;
79pub const INT_LEAST32_MAX: u32 = 2147483647;
80pub const UINT_LEAST8_MAX: u32 = 255;
81pub const UINT_LEAST16_MAX: u32 = 65535;
82pub const UINT_LEAST32_MAX: u32 = 4294967295;
83pub const INT_FAST8_MIN: i32 = -128;
84pub const INT_FAST16_MIN: i64 = -9223372036854775808;
85pub const INT_FAST32_MIN: i64 = -9223372036854775808;
86pub const INT_FAST8_MAX: u32 = 127;
87pub const INT_FAST16_MAX: u64 = 9223372036854775807;
88pub const INT_FAST32_MAX: u64 = 9223372036854775807;
89pub const UINT_FAST8_MAX: u32 = 255;
90pub const UINT_FAST16_MAX: i32 = -1;
91pub const UINT_FAST32_MAX: i32 = -1;
92pub const INTPTR_MIN: i64 = -9223372036854775808;
93pub const INTPTR_MAX: u64 = 9223372036854775807;
94pub const UINTPTR_MAX: i32 = -1;
95pub const PTRDIFF_MIN: i64 = -9223372036854775808;
96pub const PTRDIFF_MAX: u64 = 9223372036854775807;
97pub const SIG_ATOMIC_MIN: i32 = -2147483648;
98pub const SIG_ATOMIC_MAX: u32 = 2147483647;
99pub const SIZE_MAX: i32 = -1;
100pub const WINT_MIN: u32 = 0;
101pub const WINT_MAX: u32 = 4294967295;
102pub const _STDLIB_H: u32 = 1;
103pub const WNOHANG: u32 = 1;
104pub const WUNTRACED: u32 = 2;
105pub const WSTOPPED: u32 = 2;
106pub const WEXITED: u32 = 4;
107pub const WCONTINUED: u32 = 8;
108pub const WNOWAIT: u32 = 16777216;
109pub const __WNOTHREAD: u32 = 536870912;
110pub const __WALL: u32 = 1073741824;
111pub const __WCLONE: u32 = 2147483648;
112pub const __W_CONTINUED: u32 = 65535;
113pub const __WCOREFLAG: u32 = 128;
114pub const __HAVE_FLOAT128: u32 = 0;
115pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
116pub const __HAVE_FLOAT64X: u32 = 1;
117pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
118pub const __HAVE_FLOAT16: u32 = 0;
119pub const __HAVE_FLOAT32: u32 = 1;
120pub const __HAVE_FLOAT64: u32 = 1;
121pub const __HAVE_FLOAT32X: u32 = 1;
122pub const __HAVE_FLOAT128X: u32 = 0;
123pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
124pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
125pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
126pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
127pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
128pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
129pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
130pub const __ldiv_t_defined: u32 = 1;
131pub const __lldiv_t_defined: u32 = 1;
132pub const RAND_MAX: u32 = 2147483647;
133pub const EXIT_FAILURE: u32 = 1;
134pub const EXIT_SUCCESS: u32 = 0;
135pub const _SYS_TYPES_H: u32 = 1;
136pub const __clock_t_defined: u32 = 1;
137pub const __clockid_t_defined: u32 = 1;
138pub const __time_t_defined: u32 = 1;
139pub const __timer_t_defined: u32 = 1;
140pub const __BIT_TYPES_DEFINED__: u32 = 1;
141pub const _ENDIAN_H: u32 = 1;
142pub const _BITS_ENDIAN_H: u32 = 1;
143pub const __LITTLE_ENDIAN: u32 = 1234;
144pub const __BIG_ENDIAN: u32 = 4321;
145pub const __PDP_ENDIAN: u32 = 3412;
146pub const _BITS_ENDIANNESS_H: u32 = 1;
147pub const __BYTE_ORDER: u32 = 1234;
148pub const __FLOAT_WORD_ORDER: u32 = 1234;
149pub const LITTLE_ENDIAN: u32 = 1234;
150pub const BIG_ENDIAN: u32 = 4321;
151pub const PDP_ENDIAN: u32 = 3412;
152pub const BYTE_ORDER: u32 = 1234;
153pub const _BITS_BYTESWAP_H: u32 = 1;
154pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
155pub const _SYS_SELECT_H: u32 = 1;
156pub const __sigset_t_defined: u32 = 1;
157pub const __timeval_defined: u32 = 1;
158pub const _STRUCT_TIMESPEC: u32 = 1;
159pub const FD_SETSIZE: u32 = 1024;
160pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
161pub const _THREAD_SHARED_TYPES_H: u32 = 1;
162pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
163pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
164pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
165pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
166pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
167pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
168pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
169pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
170pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
171pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
172pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
173pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
174pub const __have_pthread_attr_t: u32 = 1;
175pub const _ALLOCA_H: u32 = 1;
176pub const BX_ARCH_32BIT: u32 = 0;
177pub const BX_ARCH_64BIT: u32 = 0;
178pub const BX_COMPILER_CLANG: u32 = 0;
179pub const BX_COMPILER_CLANG_ANALYZER: u32 = 0;
180pub const BX_COMPILER_GCC: u32 = 0;
181pub const BX_COMPILER_MSVC: u32 = 0;
182pub const BX_CPU_ENDIAN_BIG: u32 = 0;
183pub const BX_CPU_ENDIAN_LITTLE: u32 = 0;
184pub const BX_CPU_ARM: u32 = 0;
185pub const BX_CPU_JIT: u32 = 0;
186pub const BX_CPU_MIPS: u32 = 0;
187pub const BX_CPU_PPC: u32 = 0;
188pub const BX_CPU_RISCV: u32 = 0;
189pub const BX_CPU_X86: u32 = 0;
190pub const BX_CRT_BIONIC: u32 = 0;
191pub const BX_CRT_BSD: u32 = 0;
192pub const BX_CRT_GLIBC: u32 = 0;
193pub const BX_CRT_LIBCXX: u32 = 0;
194pub const BX_CRT_MINGW: u32 = 0;
195pub const BX_CRT_MSVC: u32 = 0;
196pub const BX_CRT_NEWLIB: u32 = 0;
197pub const BX_CRT_NONE: u32 = 0;
198pub const BX_LANGUAGE_CPP14: u32 = 201402;
199pub const BX_LANGUAGE_CPP17: u32 = 201703;
200pub const BX_LANGUAGE_CPP20: u32 = 202002;
201pub const BX_LANGUAGE_CPP23: u32 = 202207;
202pub const BX_PLATFORM_ANDROID: u32 = 0;
203pub const BX_PLATFORM_BSD: u32 = 0;
204pub const BX_PLATFORM_EMSCRIPTEN: u32 = 0;
205pub const BX_PLATFORM_HAIKU: u32 = 0;
206pub const BX_PLATFORM_HURD: u32 = 0;
207pub const BX_PLATFORM_IOS: u32 = 0;
208pub const BX_PLATFORM_LINUX: u32 = 0;
209pub const BX_PLATFORM_NX: u32 = 0;
210pub const BX_PLATFORM_OSX: u32 = 0;
211pub const BX_PLATFORM_PS4: u32 = 0;
212pub const BX_PLATFORM_PS5: u32 = 0;
213pub const BX_PLATFORM_RPI: u32 = 0;
214pub const BX_PLATFORM_WINDOWS: u32 = 0;
215pub const BX_PLATFORM_WINRT: u32 = 0;
216pub const BX_PLATFORM_XBOXONE: u32 = 0;
217pub const BX_CACHE_LINE_SIZE: u32 = 64;
218pub const BX_PLATFORM_NAME: &[u8; 6] = b"Linux\0";
219pub const BX_CPU_NAME: &[u8; 4] = b"x86\0";
220pub const BX_CRT_NAME: &[u8; 14] = b"GNU C Library\0";
221pub const BX_ARCH_NAME: &[u8; 7] = b"64-bit\0";
222pub const BX_CPP_NAME: &[u8; 11] = b"C++Unknown\0";
223pub const BGFX_SHARED_LIB_BUILD: u32 = 0;
224pub const BGFX_SHARED_LIB_USE: u32 = 0;
225pub const BGFX_API_VERSION: u32 = 122;
226pub const BGFX_STATE_WRITE_R: u32 = 1;
227pub const BGFX_STATE_WRITE_G: u32 = 2;
228pub const BGFX_STATE_WRITE_B: u32 = 4;
229pub const BGFX_STATE_WRITE_A: u32 = 8;
230pub const BGFX_STATE_WRITE_Z: u64 = 274877906944;
231pub const BGFX_STATE_WRITE_RGB: u32 = 7;
232pub const BGFX_STATE_WRITE_MASK: u64 = 274877906959;
233pub const BGFX_STATE_DEPTH_TEST_LESS: u32 = 16;
234pub const BGFX_STATE_DEPTH_TEST_LEQUAL: u32 = 32;
235pub const BGFX_STATE_DEPTH_TEST_EQUAL: u32 = 48;
236pub const BGFX_STATE_DEPTH_TEST_GEQUAL: u32 = 64;
237pub const BGFX_STATE_DEPTH_TEST_GREATER: u32 = 80;
238pub const BGFX_STATE_DEPTH_TEST_NOTEQUAL: u32 = 96;
239pub const BGFX_STATE_DEPTH_TEST_NEVER: u32 = 112;
240pub const BGFX_STATE_DEPTH_TEST_ALWAYS: u32 = 128;
241pub const BGFX_STATE_DEPTH_TEST_SHIFT: u32 = 4;
242pub const BGFX_STATE_DEPTH_TEST_MASK: u32 = 240;
243pub const BGFX_STATE_BLEND_ZERO: u32 = 4096;
244pub const BGFX_STATE_BLEND_ONE: u32 = 8192;
245pub const BGFX_STATE_BLEND_SRC_COLOR: u32 = 12288;
246pub const BGFX_STATE_BLEND_INV_SRC_COLOR: u32 = 16384;
247pub const BGFX_STATE_BLEND_SRC_ALPHA: u32 = 20480;
248pub const BGFX_STATE_BLEND_INV_SRC_ALPHA: u32 = 24576;
249pub const BGFX_STATE_BLEND_DST_ALPHA: u32 = 28672;
250pub const BGFX_STATE_BLEND_INV_DST_ALPHA: u32 = 32768;
251pub const BGFX_STATE_BLEND_DST_COLOR: u32 = 36864;
252pub const BGFX_STATE_BLEND_INV_DST_COLOR: u32 = 40960;
253pub const BGFX_STATE_BLEND_SRC_ALPHA_SAT: u32 = 45056;
254pub const BGFX_STATE_BLEND_FACTOR: u32 = 49152;
255pub const BGFX_STATE_BLEND_INV_FACTOR: u32 = 53248;
256pub const BGFX_STATE_BLEND_SHIFT: u32 = 12;
257pub const BGFX_STATE_BLEND_MASK: u32 = 268431360;
258pub const BGFX_STATE_BLEND_EQUATION_ADD: u32 = 0;
259pub const BGFX_STATE_BLEND_EQUATION_SUB: u32 = 268435456;
260pub const BGFX_STATE_BLEND_EQUATION_REVSUB: u32 = 536870912;
261pub const BGFX_STATE_BLEND_EQUATION_MIN: u32 = 805306368;
262pub const BGFX_STATE_BLEND_EQUATION_MAX: u32 = 1073741824;
263pub const BGFX_STATE_BLEND_EQUATION_SHIFT: u32 = 28;
264pub const BGFX_STATE_BLEND_EQUATION_MASK: u64 = 16911433728;
265pub const BGFX_STATE_CULL_CW: u64 = 68719476736;
266pub const BGFX_STATE_CULL_CCW: u64 = 137438953472;
267pub const BGFX_STATE_CULL_SHIFT: u32 = 36;
268pub const BGFX_STATE_CULL_MASK: u64 = 206158430208;
269pub const BGFX_STATE_ALPHA_REF_SHIFT: u32 = 40;
270pub const BGFX_STATE_ALPHA_REF_MASK: u64 = 280375465082880;
271pub const BGFX_STATE_PT_TRISTRIP: u64 = 281474976710656;
272pub const BGFX_STATE_PT_LINES: u64 = 562949953421312;
273pub const BGFX_STATE_PT_LINESTRIP: u64 = 844424930131968;
274pub const BGFX_STATE_PT_POINTS: u64 = 1125899906842624;
275pub const BGFX_STATE_PT_SHIFT: u32 = 48;
276pub const BGFX_STATE_PT_MASK: u64 = 1970324836974592;
277pub const BGFX_STATE_POINT_SIZE_SHIFT: u32 = 52;
278pub const BGFX_STATE_POINT_SIZE_MASK: u64 = 67553994410557440;
279pub const BGFX_STATE_MSAA: u64 = 72057594037927936;
280pub const BGFX_STATE_LINEAA: u64 = 144115188075855872;
281pub const BGFX_STATE_CONSERVATIVE_RASTER: u64 = 288230376151711744;
282pub const BGFX_STATE_NONE: u32 = 0;
283pub const BGFX_STATE_FRONT_CCW: u64 = 549755813888;
284pub const BGFX_STATE_BLEND_INDEPENDENT: u64 = 17179869184;
285pub const BGFX_STATE_BLEND_ALPHA_TO_COVERAGE: u64 = 34359738368;
286pub const BGFX_STATE_DEFAULT: u64 = 72057937635311647;
287pub const BGFX_STATE_MASK: i32 = -1;
288pub const BGFX_STATE_RESERVED_SHIFT: u32 = 61;
289pub const BGFX_STATE_RESERVED_MASK: i64 = -2305843009213693952;
290pub const BGFX_STENCIL_FUNC_REF_SHIFT: u32 = 0;
291pub const BGFX_STENCIL_FUNC_REF_MASK: u32 = 255;
292pub const BGFX_STENCIL_FUNC_RMASK_SHIFT: u32 = 8;
293pub const BGFX_STENCIL_FUNC_RMASK_MASK: u32 = 65280;
294pub const BGFX_STENCIL_NONE: u32 = 0;
295pub const BGFX_STENCIL_MASK: u32 = 4294967295;
296pub const BGFX_STENCIL_DEFAULT: u32 = 0;
297pub const BGFX_STENCIL_TEST_LESS: u32 = 65536;
298pub const BGFX_STENCIL_TEST_LEQUAL: u32 = 131072;
299pub const BGFX_STENCIL_TEST_EQUAL: u32 = 196608;
300pub const BGFX_STENCIL_TEST_GEQUAL: u32 = 262144;
301pub const BGFX_STENCIL_TEST_GREATER: u32 = 327680;
302pub const BGFX_STENCIL_TEST_NOTEQUAL: u32 = 393216;
303pub const BGFX_STENCIL_TEST_NEVER: u32 = 458752;
304pub const BGFX_STENCIL_TEST_ALWAYS: u32 = 524288;
305pub const BGFX_STENCIL_TEST_SHIFT: u32 = 16;
306pub const BGFX_STENCIL_TEST_MASK: u32 = 983040;
307pub const BGFX_STENCIL_OP_FAIL_S_ZERO: u32 = 0;
308pub const BGFX_STENCIL_OP_FAIL_S_KEEP: u32 = 1048576;
309pub const BGFX_STENCIL_OP_FAIL_S_REPLACE: u32 = 2097152;
310pub const BGFX_STENCIL_OP_FAIL_S_INCR: u32 = 3145728;
311pub const BGFX_STENCIL_OP_FAIL_S_INCRSAT: u32 = 4194304;
312pub const BGFX_STENCIL_OP_FAIL_S_DECR: u32 = 5242880;
313pub const BGFX_STENCIL_OP_FAIL_S_DECRSAT: u32 = 6291456;
314pub const BGFX_STENCIL_OP_FAIL_S_INVERT: u32 = 7340032;
315pub const BGFX_STENCIL_OP_FAIL_S_SHIFT: u32 = 20;
316pub const BGFX_STENCIL_OP_FAIL_S_MASK: u32 = 15728640;
317pub const BGFX_STENCIL_OP_FAIL_Z_ZERO: u32 = 0;
318pub const BGFX_STENCIL_OP_FAIL_Z_KEEP: u32 = 16777216;
319pub const BGFX_STENCIL_OP_FAIL_Z_REPLACE: u32 = 33554432;
320pub const BGFX_STENCIL_OP_FAIL_Z_INCR: u32 = 50331648;
321pub const BGFX_STENCIL_OP_FAIL_Z_INCRSAT: u32 = 67108864;
322pub const BGFX_STENCIL_OP_FAIL_Z_DECR: u32 = 83886080;
323pub const BGFX_STENCIL_OP_FAIL_Z_DECRSAT: u32 = 100663296;
324pub const BGFX_STENCIL_OP_FAIL_Z_INVERT: u32 = 117440512;
325pub const BGFX_STENCIL_OP_FAIL_Z_SHIFT: u32 = 24;
326pub const BGFX_STENCIL_OP_FAIL_Z_MASK: u32 = 251658240;
327pub const BGFX_STENCIL_OP_PASS_Z_ZERO: u32 = 0;
328pub const BGFX_STENCIL_OP_PASS_Z_KEEP: u32 = 268435456;
329pub const BGFX_STENCIL_OP_PASS_Z_REPLACE: u32 = 536870912;
330pub const BGFX_STENCIL_OP_PASS_Z_INCR: u32 = 805306368;
331pub const BGFX_STENCIL_OP_PASS_Z_INCRSAT: u32 = 1073741824;
332pub const BGFX_STENCIL_OP_PASS_Z_DECR: u32 = 1342177280;
333pub const BGFX_STENCIL_OP_PASS_Z_DECRSAT: u32 = 1610612736;
334pub const BGFX_STENCIL_OP_PASS_Z_INVERT: u32 = 1879048192;
335pub const BGFX_STENCIL_OP_PASS_Z_SHIFT: u32 = 28;
336pub const BGFX_STENCIL_OP_PASS_Z_MASK: u32 = 4026531840;
337pub const BGFX_CLEAR_NONE: u32 = 0;
338pub const BGFX_CLEAR_COLOR: u32 = 1;
339pub const BGFX_CLEAR_DEPTH: u32 = 2;
340pub const BGFX_CLEAR_STENCIL: u32 = 4;
341pub const BGFX_CLEAR_DISCARD_COLOR_0: u32 = 8;
342pub const BGFX_CLEAR_DISCARD_COLOR_1: u32 = 16;
343pub const BGFX_CLEAR_DISCARD_COLOR_2: u32 = 32;
344pub const BGFX_CLEAR_DISCARD_COLOR_3: u32 = 64;
345pub const BGFX_CLEAR_DISCARD_COLOR_4: u32 = 128;
346pub const BGFX_CLEAR_DISCARD_COLOR_5: u32 = 256;
347pub const BGFX_CLEAR_DISCARD_COLOR_6: u32 = 512;
348pub const BGFX_CLEAR_DISCARD_COLOR_7: u32 = 1024;
349pub const BGFX_CLEAR_DISCARD_DEPTH: u32 = 2048;
350pub const BGFX_CLEAR_DISCARD_STENCIL: u32 = 4096;
351pub const BGFX_CLEAR_DISCARD_COLOR_MASK: u32 = 2040;
352pub const BGFX_CLEAR_DISCARD_MASK: u32 = 8184;
353pub const BGFX_DISCARD_NONE: u32 = 0;
354pub const BGFX_DISCARD_BINDINGS: u32 = 1;
355pub const BGFX_DISCARD_INDEX_BUFFER: u32 = 2;
356pub const BGFX_DISCARD_INSTANCE_DATA: u32 = 4;
357pub const BGFX_DISCARD_STATE: u32 = 8;
358pub const BGFX_DISCARD_TRANSFORM: u32 = 16;
359pub const BGFX_DISCARD_VERTEX_STREAMS: u32 = 32;
360pub const BGFX_DISCARD_ALL: u32 = 255;
361pub const BGFX_DEBUG_NONE: u32 = 0;
362pub const BGFX_DEBUG_WIREFRAME: u32 = 1;
363pub const BGFX_DEBUG_IFH: u32 = 2;
364pub const BGFX_DEBUG_STATS: u32 = 4;
365pub const BGFX_DEBUG_TEXT: u32 = 8;
366pub const BGFX_DEBUG_PROFILER: u32 = 16;
367pub const BGFX_BUFFER_COMPUTE_FORMAT_8X1: u32 = 1;
368pub const BGFX_BUFFER_COMPUTE_FORMAT_8X2: u32 = 2;
369pub const BGFX_BUFFER_COMPUTE_FORMAT_8X4: u32 = 3;
370pub const BGFX_BUFFER_COMPUTE_FORMAT_16X1: u32 = 4;
371pub const BGFX_BUFFER_COMPUTE_FORMAT_16X2: u32 = 5;
372pub const BGFX_BUFFER_COMPUTE_FORMAT_16X4: u32 = 6;
373pub const BGFX_BUFFER_COMPUTE_FORMAT_32X1: u32 = 7;
374pub const BGFX_BUFFER_COMPUTE_FORMAT_32X2: u32 = 8;
375pub const BGFX_BUFFER_COMPUTE_FORMAT_32X4: u32 = 9;
376pub const BGFX_BUFFER_COMPUTE_FORMAT_SHIFT: u32 = 0;
377pub const BGFX_BUFFER_COMPUTE_FORMAT_MASK: u32 = 15;
378pub const BGFX_BUFFER_COMPUTE_TYPE_INT: u32 = 16;
379pub const BGFX_BUFFER_COMPUTE_TYPE_UINT: u32 = 32;
380pub const BGFX_BUFFER_COMPUTE_TYPE_FLOAT: u32 = 48;
381pub const BGFX_BUFFER_COMPUTE_TYPE_SHIFT: u32 = 4;
382pub const BGFX_BUFFER_COMPUTE_TYPE_MASK: u32 = 48;
383pub const BGFX_BUFFER_NONE: u32 = 0;
384pub const BGFX_BUFFER_COMPUTE_READ: u32 = 256;
385pub const BGFX_BUFFER_COMPUTE_WRITE: u32 = 512;
386pub const BGFX_BUFFER_DRAW_INDIRECT: u32 = 1024;
387pub const BGFX_BUFFER_ALLOW_RESIZE: u32 = 2048;
388pub const BGFX_BUFFER_INDEX32: u32 = 4096;
389pub const BGFX_BUFFER_COMPUTE_READ_WRITE: u32 = 768;
390pub const BGFX_TEXTURE_NONE: u32 = 0;
391pub const BGFX_TEXTURE_MSAA_SAMPLE: u64 = 34359738368;
392pub const BGFX_TEXTURE_RT: u64 = 68719476736;
393pub const BGFX_TEXTURE_COMPUTE_WRITE: u64 = 17592186044416;
394pub const BGFX_TEXTURE_SRGB: u64 = 35184372088832;
395pub const BGFX_TEXTURE_BLIT_DST: u64 = 70368744177664;
396pub const BGFX_TEXTURE_READ_BACK: u64 = 140737488355328;
397pub const BGFX_TEXTURE_RT_MSAA_X2: u64 = 137438953472;
398pub const BGFX_TEXTURE_RT_MSAA_X4: u64 = 206158430208;
399pub const BGFX_TEXTURE_RT_MSAA_X8: u64 = 274877906944;
400pub const BGFX_TEXTURE_RT_MSAA_X16: u64 = 343597383680;
401pub const BGFX_TEXTURE_RT_MSAA_SHIFT: u32 = 36;
402pub const BGFX_TEXTURE_RT_MSAA_MASK: u64 = 481036337152;
403pub const BGFX_TEXTURE_RT_WRITE_ONLY: u64 = 549755813888;
404pub const BGFX_TEXTURE_RT_SHIFT: u32 = 36;
405pub const BGFX_TEXTURE_RT_MASK: u64 = 1030792151040;
406pub const BGFX_SAMPLER_U_MIRROR: u32 = 1;
407pub const BGFX_SAMPLER_U_CLAMP: u32 = 2;
408pub const BGFX_SAMPLER_U_BORDER: u32 = 3;
409pub const BGFX_SAMPLER_U_SHIFT: u32 = 0;
410pub const BGFX_SAMPLER_U_MASK: u32 = 3;
411pub const BGFX_SAMPLER_V_MIRROR: u32 = 4;
412pub const BGFX_SAMPLER_V_CLAMP: u32 = 8;
413pub const BGFX_SAMPLER_V_BORDER: u32 = 12;
414pub const BGFX_SAMPLER_V_SHIFT: u32 = 2;
415pub const BGFX_SAMPLER_V_MASK: u32 = 12;
416pub const BGFX_SAMPLER_W_MIRROR: u32 = 16;
417pub const BGFX_SAMPLER_W_CLAMP: u32 = 32;
418pub const BGFX_SAMPLER_W_BORDER: u32 = 48;
419pub const BGFX_SAMPLER_W_SHIFT: u32 = 4;
420pub const BGFX_SAMPLER_W_MASK: u32 = 48;
421pub const BGFX_SAMPLER_MIN_POINT: u32 = 64;
422pub const BGFX_SAMPLER_MIN_ANISOTROPIC: u32 = 128;
423pub const BGFX_SAMPLER_MIN_SHIFT: u32 = 6;
424pub const BGFX_SAMPLER_MIN_MASK: u32 = 192;
425pub const BGFX_SAMPLER_MAG_POINT: u32 = 256;
426pub const BGFX_SAMPLER_MAG_ANISOTROPIC: u32 = 512;
427pub const BGFX_SAMPLER_MAG_SHIFT: u32 = 8;
428pub const BGFX_SAMPLER_MAG_MASK: u32 = 768;
429pub const BGFX_SAMPLER_MIP_POINT: u32 = 1024;
430pub const BGFX_SAMPLER_MIP_SHIFT: u32 = 10;
431pub const BGFX_SAMPLER_MIP_MASK: u32 = 1024;
432pub const BGFX_SAMPLER_COMPARE_LESS: u32 = 65536;
433pub const BGFX_SAMPLER_COMPARE_LEQUAL: u32 = 131072;
434pub const BGFX_SAMPLER_COMPARE_EQUAL: u32 = 196608;
435pub const BGFX_SAMPLER_COMPARE_GEQUAL: u32 = 262144;
436pub const BGFX_SAMPLER_COMPARE_GREATER: u32 = 327680;
437pub const BGFX_SAMPLER_COMPARE_NOTEQUAL: u32 = 393216;
438pub const BGFX_SAMPLER_COMPARE_NEVER: u32 = 458752;
439pub const BGFX_SAMPLER_COMPARE_ALWAYS: u32 = 524288;
440pub const BGFX_SAMPLER_COMPARE_SHIFT: u32 = 16;
441pub const BGFX_SAMPLER_COMPARE_MASK: u32 = 983040;
442pub const BGFX_SAMPLER_BORDER_COLOR_SHIFT: u32 = 24;
443pub const BGFX_SAMPLER_BORDER_COLOR_MASK: u32 = 251658240;
444pub const BGFX_SAMPLER_RESERVED_SHIFT: u32 = 28;
445pub const BGFX_SAMPLER_RESERVED_MASK: u32 = 4026531840;
446pub const BGFX_SAMPLER_NONE: u32 = 0;
447pub const BGFX_SAMPLER_SAMPLE_STENCIL: u32 = 1048576;
448pub const BGFX_SAMPLER_POINT: u32 = 1344;
449pub const BGFX_SAMPLER_UVW_MIRROR: u32 = 21;
450pub const BGFX_SAMPLER_UVW_CLAMP: u32 = 42;
451pub const BGFX_SAMPLER_UVW_BORDER: u32 = 63;
452pub const BGFX_SAMPLER_BITS_MASK: u32 = 985087;
453pub const BGFX_RESET_MSAA_X2: u32 = 16;
454pub const BGFX_RESET_MSAA_X4: u32 = 32;
455pub const BGFX_RESET_MSAA_X8: u32 = 48;
456pub const BGFX_RESET_MSAA_X16: u32 = 64;
457pub const BGFX_RESET_MSAA_SHIFT: u32 = 4;
458pub const BGFX_RESET_MSAA_MASK: u32 = 112;
459pub const BGFX_RESET_NONE: u32 = 0;
460pub const BGFX_RESET_FULLSCREEN: u32 = 1;
461pub const BGFX_RESET_VSYNC: u32 = 128;
462pub const BGFX_RESET_MAXANISOTROPY: u32 = 256;
463pub const BGFX_RESET_CAPTURE: u32 = 512;
464pub const BGFX_RESET_FLUSH_AFTER_RENDER: u32 = 8192;
465pub const BGFX_RESET_FLIP_AFTER_RENDER: u32 = 16384;
466pub const BGFX_RESET_SRGB_BACKBUFFER: u32 = 32768;
467pub const BGFX_RESET_HDR10: u32 = 65536;
468pub const BGFX_RESET_HIDPI: u32 = 131072;
469pub const BGFX_RESET_DEPTH_CLAMP: u32 = 262144;
470pub const BGFX_RESET_SUSPEND: u32 = 524288;
471pub const BGFX_RESET_TRANSPARENT_BACKBUFFER: u32 = 1048576;
472pub const BGFX_RESET_FULLSCREEN_SHIFT: u32 = 0;
473pub const BGFX_RESET_FULLSCREEN_MASK: u32 = 1;
474pub const BGFX_RESET_RESERVED_SHIFT: u32 = 31;
475pub const BGFX_RESET_RESERVED_MASK: u32 = 2147483648;
476pub const BGFX_CAPS_ALPHA_TO_COVERAGE: u32 = 1;
477pub const BGFX_CAPS_BLEND_INDEPENDENT: u32 = 2;
478pub const BGFX_CAPS_COMPUTE: u32 = 4;
479pub const BGFX_CAPS_CONSERVATIVE_RASTER: u32 = 8;
480pub const BGFX_CAPS_DRAW_INDIRECT: u32 = 16;
481pub const BGFX_CAPS_FRAGMENT_DEPTH: u32 = 32;
482pub const BGFX_CAPS_FRAGMENT_ORDERING: u32 = 64;
483pub const BGFX_CAPS_GRAPHICS_DEBUGGER: u32 = 128;
484pub const BGFX_CAPS_HDR10: u32 = 256;
485pub const BGFX_CAPS_HIDPI: u32 = 512;
486pub const BGFX_CAPS_IMAGE_RW: u32 = 1024;
487pub const BGFX_CAPS_INDEX32: u32 = 2048;
488pub const BGFX_CAPS_INSTANCING: u32 = 4096;
489pub const BGFX_CAPS_OCCLUSION_QUERY: u32 = 8192;
490pub const BGFX_CAPS_RENDERER_MULTITHREADED: u32 = 16384;
491pub const BGFX_CAPS_SWAP_CHAIN: u32 = 32768;
492pub const BGFX_CAPS_TEXTURE_2D_ARRAY: u32 = 65536;
493pub const BGFX_CAPS_TEXTURE_3D: u32 = 131072;
494pub const BGFX_CAPS_TEXTURE_BLIT: u32 = 262144;
495pub const BGFX_CAPS_TRANSPARENT_BACKBUFFER: u32 = 524288;
496pub const BGFX_CAPS_TEXTURE_COMPARE_RESERVED: u32 = 1048576;
497pub const BGFX_CAPS_TEXTURE_COMPARE_LEQUAL: u32 = 2097152;
498pub const BGFX_CAPS_TEXTURE_CUBE_ARRAY: u32 = 4194304;
499pub const BGFX_CAPS_TEXTURE_DIRECT_ACCESS: u32 = 8388608;
500pub const BGFX_CAPS_TEXTURE_READ_BACK: u32 = 16777216;
501pub const BGFX_CAPS_VERTEX_ATTRIB_HALF: u32 = 33554432;
502pub const BGFX_CAPS_VERTEX_ATTRIB_UINT10: u32 = 67108864;
503pub const BGFX_CAPS_VERTEX_ID: u32 = 134217728;
504pub const BGFX_CAPS_PRIMITIVE_ID: u32 = 268435456;
505pub const BGFX_CAPS_VIEWPORT_LAYER_ARRAY: u32 = 536870912;
506pub const BGFX_CAPS_DRAW_INDIRECT_COUNT: u32 = 1073741824;
507pub const BGFX_CAPS_TEXTURE_COMPARE_ALL: u32 = 3145728;
508pub const BGFX_CAPS_FORMAT_TEXTURE_NONE: u32 = 0;
509pub const BGFX_CAPS_FORMAT_TEXTURE_2D: u32 = 1;
510pub const BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB: u32 = 2;
511pub const BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED: u32 = 4;
512pub const BGFX_CAPS_FORMAT_TEXTURE_3D: u32 = 8;
513pub const BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB: u32 = 16;
514pub const BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED: u32 = 32;
515pub const BGFX_CAPS_FORMAT_TEXTURE_CUBE: u32 = 64;
516pub const BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB: u32 = 128;
517pub const BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED: u32 = 256;
518pub const BGFX_CAPS_FORMAT_TEXTURE_VERTEX: u32 = 512;
519pub const BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ: u32 = 1024;
520pub const BGFX_CAPS_FORMAT_TEXTURE_IMAGE_WRITE: u32 = 2048;
521pub const BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER: u32 = 4096;
522pub const BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA: u32 = 8192;
523pub const BGFX_CAPS_FORMAT_TEXTURE_MSAA: u32 = 16384;
524pub const BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN: u32 = 32768;
525pub const BGFX_RESOLVE_NONE: u32 = 0;
526pub const BGFX_RESOLVE_AUTO_GEN_MIPS: u32 = 1;
527pub const BGFX_PCI_ID_NONE: u32 = 0;
528pub const BGFX_PCI_ID_SOFTWARE_RASTERIZER: u32 = 1;
529pub const BGFX_PCI_ID_AMD: u32 = 4098;
530pub const BGFX_PCI_ID_APPLE: u32 = 4203;
531pub const BGFX_PCI_ID_INTEL: u32 = 32902;
532pub const BGFX_PCI_ID_NVIDIA: u32 = 4318;
533pub const BGFX_PCI_ID_MICROSOFT: u32 = 5140;
534pub const BGFX_PCI_ID_ARM: u32 = 5045;
535pub const BGFX_CUBE_MAP_POSITIVE_X: u32 = 0;
536pub const BGFX_CUBE_MAP_NEGATIVE_X: u32 = 1;
537pub const BGFX_CUBE_MAP_POSITIVE_Y: u32 = 2;
538pub const BGFX_CUBE_MAP_NEGATIVE_Y: u32 = 3;
539pub const BGFX_CUBE_MAP_POSITIVE_Z: u32 = 4;
540pub const BGFX_CUBE_MAP_NEGATIVE_Z: u32 = 5;
541pub type va_list = __builtin_va_list;
542pub type __gnuc_va_list = __builtin_va_list;
543pub type __u_char = ::std::os::raw::c_uchar;
544pub type __u_short = ::std::os::raw::c_ushort;
545pub type __u_int = ::std::os::raw::c_uint;
546pub type __u_long = ::std::os::raw::c_ulong;
547pub type __int8_t = ::std::os::raw::c_schar;
548pub type __uint8_t = ::std::os::raw::c_uchar;
549pub type __int16_t = ::std::os::raw::c_short;
550pub type __uint16_t = ::std::os::raw::c_ushort;
551pub type __int32_t = ::std::os::raw::c_int;
552pub type __uint32_t = ::std::os::raw::c_uint;
553pub type __int64_t = ::std::os::raw::c_long;
554pub type __uint64_t = ::std::os::raw::c_ulong;
555pub type __int_least8_t = __int8_t;
556pub type __uint_least8_t = __uint8_t;
557pub type __int_least16_t = __int16_t;
558pub type __uint_least16_t = __uint16_t;
559pub type __int_least32_t = __int32_t;
560pub type __uint_least32_t = __uint32_t;
561pub type __int_least64_t = __int64_t;
562pub type __uint_least64_t = __uint64_t;
563pub type __quad_t = ::std::os::raw::c_long;
564pub type __u_quad_t = ::std::os::raw::c_ulong;
565pub type __intmax_t = ::std::os::raw::c_long;
566pub type __uintmax_t = ::std::os::raw::c_ulong;
567pub type __dev_t = ::std::os::raw::c_ulong;
568pub type __uid_t = ::std::os::raw::c_uint;
569pub type __gid_t = ::std::os::raw::c_uint;
570pub type __ino_t = ::std::os::raw::c_ulong;
571pub type __ino64_t = ::std::os::raw::c_ulong;
572pub type __mode_t = ::std::os::raw::c_uint;
573pub type __nlink_t = ::std::os::raw::c_ulong;
574pub type __off_t = ::std::os::raw::c_long;
575pub type __off64_t = ::std::os::raw::c_long;
576pub type __pid_t = ::std::os::raw::c_int;
577#[repr(C)]
578#[derive(Debug, Copy, Clone)]
579pub struct __fsid_t {
580 pub __val: [::std::os::raw::c_int; 2usize],
581}
582pub type __clock_t = ::std::os::raw::c_long;
583pub type __rlim_t = ::std::os::raw::c_ulong;
584pub type __rlim64_t = ::std::os::raw::c_ulong;
585pub type __id_t = ::std::os::raw::c_uint;
586pub type __time_t = ::std::os::raw::c_long;
587pub type __useconds_t = ::std::os::raw::c_uint;
588pub type __suseconds_t = ::std::os::raw::c_long;
589pub type __suseconds64_t = ::std::os::raw::c_long;
590pub type __daddr_t = ::std::os::raw::c_int;
591pub type __key_t = ::std::os::raw::c_int;
592pub type __clockid_t = ::std::os::raw::c_int;
593pub type __timer_t = *mut ::std::os::raw::c_void;
594pub type __blksize_t = ::std::os::raw::c_long;
595pub type __blkcnt_t = ::std::os::raw::c_long;
596pub type __blkcnt64_t = ::std::os::raw::c_long;
597pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
598pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
599pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
600pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
601pub type __fsword_t = ::std::os::raw::c_long;
602pub type __ssize_t = ::std::os::raw::c_long;
603pub type __syscall_slong_t = ::std::os::raw::c_long;
604pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
605pub type __loff_t = __off64_t;
606pub type __caddr_t = *mut ::std::os::raw::c_char;
607pub type __intptr_t = ::std::os::raw::c_long;
608pub type __socklen_t = ::std::os::raw::c_uint;
609pub type __sig_atomic_t = ::std::os::raw::c_int;
610pub type int_least8_t = __int_least8_t;
611pub type int_least16_t = __int_least16_t;
612pub type int_least32_t = __int_least32_t;
613pub type int_least64_t = __int_least64_t;
614pub type uint_least8_t = __uint_least8_t;
615pub type uint_least16_t = __uint_least16_t;
616pub type uint_least32_t = __uint_least32_t;
617pub type uint_least64_t = __uint_least64_t;
618pub type int_fast8_t = ::std::os::raw::c_schar;
619pub type int_fast16_t = ::std::os::raw::c_long;
620pub type int_fast32_t = ::std::os::raw::c_long;
621pub type int_fast64_t = ::std::os::raw::c_long;
622pub type uint_fast8_t = ::std::os::raw::c_uchar;
623pub type uint_fast16_t = ::std::os::raw::c_ulong;
624pub type uint_fast32_t = ::std::os::raw::c_ulong;
625pub type uint_fast64_t = ::std::os::raw::c_ulong;
626pub type intmax_t = __intmax_t;
627pub type uintmax_t = __uintmax_t;
628pub type wchar_t = ::std::os::raw::c_int;
629pub type _Float32 = f32;
630pub type _Float64 = f64;
631pub type _Float32x = f64;
632pub type _Float64x = u128;
633#[repr(C)]
634#[derive(Debug, Copy, Clone)]
635pub struct div_t {
636 pub quot: ::std::os::raw::c_int,
637 pub rem: ::std::os::raw::c_int,
638}
639#[repr(C)]
640#[derive(Debug, Copy, Clone)]
641pub struct ldiv_t {
642 pub quot: ::std::os::raw::c_long,
643 pub rem: ::std::os::raw::c_long,
644}
645#[repr(C)]
646#[derive(Debug, Copy, Clone)]
647pub struct lldiv_t {
648 pub quot: ::std::os::raw::c_longlong,
649 pub rem: ::std::os::raw::c_longlong,
650}
651extern "C" {
652 pub fn __ctype_get_mb_cur_max() -> usize;
653}
654extern "C" {
655 pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
656}
657extern "C" {
658 pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
659}
660extern "C" {
661 pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
662}
663extern "C" {
664 pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
665}
666extern "C" {
667 pub fn strtod(
668 __nptr: *const ::std::os::raw::c_char,
669 __endptr: *mut *mut ::std::os::raw::c_char,
670 ) -> f64;
671}
672extern "C" {
673 pub fn strtof(
674 __nptr: *const ::std::os::raw::c_char,
675 __endptr: *mut *mut ::std::os::raw::c_char,
676 ) -> f32;
677}
678extern "C" {
679 pub fn strtol(
680 __nptr: *const ::std::os::raw::c_char,
681 __endptr: *mut *mut ::std::os::raw::c_char,
682 __base: ::std::os::raw::c_int,
683 ) -> ::std::os::raw::c_long;
684}
685extern "C" {
686 pub fn strtoul(
687 __nptr: *const ::std::os::raw::c_char,
688 __endptr: *mut *mut ::std::os::raw::c_char,
689 __base: ::std::os::raw::c_int,
690 ) -> ::std::os::raw::c_ulong;
691}
692extern "C" {
693 pub fn strtoq(
694 __nptr: *const ::std::os::raw::c_char,
695 __endptr: *mut *mut ::std::os::raw::c_char,
696 __base: ::std::os::raw::c_int,
697 ) -> ::std::os::raw::c_longlong;
698}
699extern "C" {
700 pub fn strtouq(
701 __nptr: *const ::std::os::raw::c_char,
702 __endptr: *mut *mut ::std::os::raw::c_char,
703 __base: ::std::os::raw::c_int,
704 ) -> ::std::os::raw::c_ulonglong;
705}
706extern "C" {
707 pub fn strtoll(
708 __nptr: *const ::std::os::raw::c_char,
709 __endptr: *mut *mut ::std::os::raw::c_char,
710 __base: ::std::os::raw::c_int,
711 ) -> ::std::os::raw::c_longlong;
712}
713extern "C" {
714 pub fn strtoull(
715 __nptr: *const ::std::os::raw::c_char,
716 __endptr: *mut *mut ::std::os::raw::c_char,
717 __base: ::std::os::raw::c_int,
718 ) -> ::std::os::raw::c_ulonglong;
719}
720extern "C" {
721 pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
722}
723extern "C" {
724 pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
725}
726pub type u_char = __u_char;
727pub type u_short = __u_short;
728pub type u_int = __u_int;
729pub type u_long = __u_long;
730pub type quad_t = __quad_t;
731pub type u_quad_t = __u_quad_t;
732pub type fsid_t = __fsid_t;
733pub type loff_t = __loff_t;
734pub type ino_t = __ino_t;
735pub type dev_t = __dev_t;
736pub type gid_t = __gid_t;
737pub type mode_t = __mode_t;
738pub type nlink_t = __nlink_t;
739pub type uid_t = __uid_t;
740pub type off_t = __off_t;
741pub type pid_t = __pid_t;
742pub type id_t = __id_t;
743pub type daddr_t = __daddr_t;
744pub type caddr_t = __caddr_t;
745pub type key_t = __key_t;
746pub type clock_t = __clock_t;
747pub type clockid_t = __clockid_t;
748pub type time_t = __time_t;
749pub type timer_t = __timer_t;
750pub type ulong = ::std::os::raw::c_ulong;
751pub type ushort = ::std::os::raw::c_ushort;
752pub type uint = ::std::os::raw::c_uint;
753pub type u_int8_t = __uint8_t;
754pub type u_int16_t = __uint16_t;
755pub type u_int32_t = __uint32_t;
756pub type u_int64_t = __uint64_t;
757pub type register_t = ::std::os::raw::c_long;
758#[repr(C)]
759#[derive(Debug, Copy, Clone)]
760pub struct __sigset_t {
761 pub __val: [::std::os::raw::c_ulong; 16usize],
762}
763pub type sigset_t = __sigset_t;
764#[repr(C)]
765#[derive(Debug, Copy, Clone)]
766pub struct timeval {
767 pub tv_sec: __time_t,
768 pub tv_usec: __suseconds_t,
769}
770#[repr(C)]
771#[derive(Debug, Copy, Clone)]
772pub struct timespec {
773 pub tv_sec: __time_t,
774 pub tv_nsec: __syscall_slong_t,
775}
776pub type suseconds_t = __suseconds_t;
777pub type __fd_mask = ::std::os::raw::c_long;
778#[repr(C)]
779#[derive(Debug, Copy, Clone)]
780pub struct fd_set {
781 pub __fds_bits: [__fd_mask; 16usize],
782}
783pub type fd_mask = __fd_mask;
784extern "C" {
785 pub fn select(
786 __nfds: ::std::os::raw::c_int,
787 __readfds: *mut fd_set,
788 __writefds: *mut fd_set,
789 __exceptfds: *mut fd_set,
790 __timeout: *mut timeval,
791 ) -> ::std::os::raw::c_int;
792}
793extern "C" {
794 pub fn pselect(
795 __nfds: ::std::os::raw::c_int,
796 __readfds: *mut fd_set,
797 __writefds: *mut fd_set,
798 __exceptfds: *mut fd_set,
799 __timeout: *const timespec,
800 __sigmask: *const __sigset_t,
801 ) -> ::std::os::raw::c_int;
802}
803pub type blksize_t = __blksize_t;
804pub type blkcnt_t = __blkcnt_t;
805pub type fsblkcnt_t = __fsblkcnt_t;
806pub type fsfilcnt_t = __fsfilcnt_t;
807#[repr(C)]
808#[derive(Copy, Clone)]
809pub union __atomic_wide_counter {
810 pub __value64: ::std::os::raw::c_ulonglong,
811 pub __value32: __atomic_wide_counter__bindgen_ty_1,
812}
813#[repr(C)]
814#[derive(Debug, Copy, Clone)]
815pub struct __atomic_wide_counter__bindgen_ty_1 {
816 pub __low: ::std::os::raw::c_uint,
817 pub __high: ::std::os::raw::c_uint,
818}
819#[repr(C)]
820#[derive(Debug, Copy, Clone)]
821pub struct __pthread_internal_list {
822 pub __prev: *mut __pthread_internal_list,
823 pub __next: *mut __pthread_internal_list,
824}
825pub type __pthread_list_t = __pthread_internal_list;
826#[repr(C)]
827#[derive(Debug, Copy, Clone)]
828pub struct __pthread_internal_slist {
829 pub __next: *mut __pthread_internal_slist,
830}
831pub type __pthread_slist_t = __pthread_internal_slist;
832#[repr(C)]
833#[derive(Debug, Copy, Clone)]
834pub struct __pthread_mutex_s {
835 pub __lock: ::std::os::raw::c_int,
836 pub __count: ::std::os::raw::c_uint,
837 pub __owner: ::std::os::raw::c_int,
838 pub __nusers: ::std::os::raw::c_uint,
839 pub __kind: ::std::os::raw::c_int,
840 pub __spins: ::std::os::raw::c_short,
841 pub __elision: ::std::os::raw::c_short,
842 pub __list: __pthread_list_t,
843}
844#[repr(C)]
845#[derive(Debug, Copy, Clone)]
846pub struct __pthread_rwlock_arch_t {
847 pub __readers: ::std::os::raw::c_uint,
848 pub __writers: ::std::os::raw::c_uint,
849 pub __wrphase_futex: ::std::os::raw::c_uint,
850 pub __writers_futex: ::std::os::raw::c_uint,
851 pub __pad3: ::std::os::raw::c_uint,
852 pub __pad4: ::std::os::raw::c_uint,
853 pub __cur_writer: ::std::os::raw::c_int,
854 pub __shared: ::std::os::raw::c_int,
855 pub __rwelision: ::std::os::raw::c_schar,
856 pub __pad1: [::std::os::raw::c_uchar; 7usize],
857 pub __pad2: ::std::os::raw::c_ulong,
858 pub __flags: ::std::os::raw::c_uint,
859}
860#[repr(C)]
861#[derive(Copy, Clone)]
862pub struct __pthread_cond_s {
863 pub __wseq: __atomic_wide_counter,
864 pub __g1_start: __atomic_wide_counter,
865 pub __g_refs: [::std::os::raw::c_uint; 2usize],
866 pub __g_size: [::std::os::raw::c_uint; 2usize],
867 pub __g1_orig_size: ::std::os::raw::c_uint,
868 pub __wrefs: ::std::os::raw::c_uint,
869 pub __g_signals: [::std::os::raw::c_uint; 2usize],
870}
871pub type __tss_t = ::std::os::raw::c_uint;
872pub type __thrd_t = ::std::os::raw::c_ulong;
873#[repr(C)]
874#[derive(Debug, Copy, Clone)]
875pub struct __once_flag {
876 pub __data: ::std::os::raw::c_int,
877}
878pub type pthread_t = ::std::os::raw::c_ulong;
879#[repr(C)]
880#[derive(Copy, Clone)]
881pub union pthread_mutexattr_t {
882 pub __size: [::std::os::raw::c_char; 4usize],
883 pub __align: ::std::os::raw::c_int,
884}
885#[repr(C)]
886#[derive(Copy, Clone)]
887pub union pthread_condattr_t {
888 pub __size: [::std::os::raw::c_char; 4usize],
889 pub __align: ::std::os::raw::c_int,
890}
891pub type pthread_key_t = ::std::os::raw::c_uint;
892pub type pthread_once_t = ::std::os::raw::c_int;
893#[repr(C)]
894#[derive(Copy, Clone)]
895pub union pthread_attr_t {
896 pub __size: [::std::os::raw::c_char; 56usize],
897 pub __align: ::std::os::raw::c_long,
898}
899#[repr(C)]
900#[derive(Copy, Clone)]
901pub union pthread_mutex_t {
902 pub __data: __pthread_mutex_s,
903 pub __size: [::std::os::raw::c_char; 40usize],
904 pub __align: ::std::os::raw::c_long,
905}
906#[repr(C)]
907#[derive(Copy, Clone)]
908pub union pthread_cond_t {
909 pub __data: __pthread_cond_s,
910 pub __size: [::std::os::raw::c_char; 48usize],
911 pub __align: ::std::os::raw::c_longlong,
912}
913#[repr(C)]
914#[derive(Copy, Clone)]
915pub union pthread_rwlock_t {
916 pub __data: __pthread_rwlock_arch_t,
917 pub __size: [::std::os::raw::c_char; 56usize],
918 pub __align: ::std::os::raw::c_long,
919}
920#[repr(C)]
921#[derive(Copy, Clone)]
922pub union pthread_rwlockattr_t {
923 pub __size: [::std::os::raw::c_char; 8usize],
924 pub __align: ::std::os::raw::c_long,
925}
926pub type pthread_spinlock_t = ::std::os::raw::c_int;
927#[repr(C)]
928#[derive(Copy, Clone)]
929pub union pthread_barrier_t {
930 pub __size: [::std::os::raw::c_char; 32usize],
931 pub __align: ::std::os::raw::c_long,
932}
933#[repr(C)]
934#[derive(Copy, Clone)]
935pub union pthread_barrierattr_t {
936 pub __size: [::std::os::raw::c_char; 4usize],
937 pub __align: ::std::os::raw::c_int,
938}
939extern "C" {
940 pub fn random() -> ::std::os::raw::c_long;
941}
942extern "C" {
943 pub fn srandom(__seed: ::std::os::raw::c_uint);
944}
945extern "C" {
946 pub fn initstate(
947 __seed: ::std::os::raw::c_uint,
948 __statebuf: *mut ::std::os::raw::c_char,
949 __statelen: usize,
950 ) -> *mut ::std::os::raw::c_char;
951}
952extern "C" {
953 pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
954}
955#[repr(C)]
956#[derive(Debug, Copy, Clone)]
957pub struct random_data {
958 pub fptr: *mut i32,
959 pub rptr: *mut i32,
960 pub state: *mut i32,
961 pub rand_type: ::std::os::raw::c_int,
962 pub rand_deg: ::std::os::raw::c_int,
963 pub rand_sep: ::std::os::raw::c_int,
964 pub end_ptr: *mut i32,
965}
966extern "C" {
967 pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
968}
969extern "C" {
970 pub fn srandom_r(
971 __seed: ::std::os::raw::c_uint,
972 __buf: *mut random_data,
973 ) -> ::std::os::raw::c_int;
974}
975extern "C" {
976 pub fn initstate_r(
977 __seed: ::std::os::raw::c_uint,
978 __statebuf: *mut ::std::os::raw::c_char,
979 __statelen: usize,
980 __buf: *mut random_data,
981 ) -> ::std::os::raw::c_int;
982}
983extern "C" {
984 pub fn setstate_r(
985 __statebuf: *mut ::std::os::raw::c_char,
986 __buf: *mut random_data,
987 ) -> ::std::os::raw::c_int;
988}
989extern "C" {
990 pub fn rand() -> ::std::os::raw::c_int;
991}
992extern "C" {
993 pub fn srand(__seed: ::std::os::raw::c_uint);
994}
995extern "C" {
996 pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
997}
998extern "C" {
999 pub fn drand48() -> f64;
1000}
1001extern "C" {
1002 pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
1003}
1004extern "C" {
1005 pub fn lrand48() -> ::std::os::raw::c_long;
1006}
1007extern "C" {
1008 pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1009}
1010extern "C" {
1011 pub fn mrand48() -> ::std::os::raw::c_long;
1012}
1013extern "C" {
1014 pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1015}
1016extern "C" {
1017 pub fn srand48(__seedval: ::std::os::raw::c_long);
1018}
1019extern "C" {
1020 pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
1021}
1022extern "C" {
1023 pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
1024}
1025#[repr(C)]
1026#[derive(Debug, Copy, Clone)]
1027pub struct drand48_data {
1028 pub __x: [::std::os::raw::c_ushort; 3usize],
1029 pub __old_x: [::std::os::raw::c_ushort; 3usize],
1030 pub __c: ::std::os::raw::c_ushort,
1031 pub __init: ::std::os::raw::c_ushort,
1032 pub __a: ::std::os::raw::c_ulonglong,
1033}
1034extern "C" {
1035 pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
1036}
1037extern "C" {
1038 pub fn erand48_r(
1039 __xsubi: *mut ::std::os::raw::c_ushort,
1040 __buffer: *mut drand48_data,
1041 __result: *mut f64,
1042 ) -> ::std::os::raw::c_int;
1043}
1044extern "C" {
1045 pub fn lrand48_r(
1046 __buffer: *mut drand48_data,
1047 __result: *mut ::std::os::raw::c_long,
1048 ) -> ::std::os::raw::c_int;
1049}
1050extern "C" {
1051 pub fn nrand48_r(
1052 __xsubi: *mut ::std::os::raw::c_ushort,
1053 __buffer: *mut drand48_data,
1054 __result: *mut ::std::os::raw::c_long,
1055 ) -> ::std::os::raw::c_int;
1056}
1057extern "C" {
1058 pub fn mrand48_r(
1059 __buffer: *mut drand48_data,
1060 __result: *mut ::std::os::raw::c_long,
1061 ) -> ::std::os::raw::c_int;
1062}
1063extern "C" {
1064 pub fn jrand48_r(
1065 __xsubi: *mut ::std::os::raw::c_ushort,
1066 __buffer: *mut drand48_data,
1067 __result: *mut ::std::os::raw::c_long,
1068 ) -> ::std::os::raw::c_int;
1069}
1070extern "C" {
1071 pub fn srand48_r(
1072 __seedval: ::std::os::raw::c_long,
1073 __buffer: *mut drand48_data,
1074 ) -> ::std::os::raw::c_int;
1075}
1076extern "C" {
1077 pub fn seed48_r(
1078 __seed16v: *mut ::std::os::raw::c_ushort,
1079 __buffer: *mut drand48_data,
1080 ) -> ::std::os::raw::c_int;
1081}
1082extern "C" {
1083 pub fn lcong48_r(
1084 __param: *mut ::std::os::raw::c_ushort,
1085 __buffer: *mut drand48_data,
1086 ) -> ::std::os::raw::c_int;
1087}
1088extern "C" {
1089 pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1090}
1091extern "C" {
1092 pub fn calloc(
1093 __nmemb: ::std::os::raw::c_ulong,
1094 __size: ::std::os::raw::c_ulong,
1095 ) -> *mut ::std::os::raw::c_void;
1096}
1097extern "C" {
1098 pub fn realloc(
1099 __ptr: *mut ::std::os::raw::c_void,
1100 __size: ::std::os::raw::c_ulong,
1101 ) -> *mut ::std::os::raw::c_void;
1102}
1103extern "C" {
1104 pub fn free(__ptr: *mut ::std::os::raw::c_void);
1105}
1106extern "C" {
1107 pub fn reallocarray(
1108 __ptr: *mut ::std::os::raw::c_void,
1109 __nmemb: usize,
1110 __size: usize,
1111 ) -> *mut ::std::os::raw::c_void;
1112}
1113extern "C" {
1114 pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1115}
1116extern "C" {
1117 pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
1118}
1119extern "C" {
1120 pub fn posix_memalign(
1121 __memptr: *mut *mut ::std::os::raw::c_void,
1122 __alignment: usize,
1123 __size: usize,
1124 ) -> ::std::os::raw::c_int;
1125}
1126extern "C" {
1127 pub fn aligned_alloc(
1128 __alignment: ::std::os::raw::c_ulong,
1129 __size: ::std::os::raw::c_ulong,
1130 ) -> *mut ::std::os::raw::c_void;
1131}
1132extern "C" {
1133 pub fn abort() -> !;
1134}
1135extern "C" {
1136 pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
1137}
1138extern "C" {
1139 pub fn at_quick_exit(
1140 __func: ::std::option::Option<unsafe extern "C" fn()>,
1141 ) -> ::std::os::raw::c_int;
1142}
1143extern "C" {
1144 pub fn on_exit(
1145 __func: ::std::option::Option<
1146 unsafe extern "C" fn(
1147 __status: ::std::os::raw::c_int,
1148 __arg: *mut ::std::os::raw::c_void,
1149 ),
1150 >,
1151 __arg: *mut ::std::os::raw::c_void,
1152 ) -> ::std::os::raw::c_int;
1153}
1154extern "C" {
1155 pub fn exit(__status: ::std::os::raw::c_int) -> !;
1156}
1157extern "C" {
1158 pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
1159}
1160extern "C" {
1161 pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
1162}
1163extern "C" {
1164 pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1165}
1166extern "C" {
1167 pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1168}
1169extern "C" {
1170 pub fn setenv(
1171 __name: *const ::std::os::raw::c_char,
1172 __value: *const ::std::os::raw::c_char,
1173 __replace: ::std::os::raw::c_int,
1174 ) -> ::std::os::raw::c_int;
1175}
1176extern "C" {
1177 pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1178}
1179extern "C" {
1180 pub fn clearenv() -> ::std::os::raw::c_int;
1181}
1182extern "C" {
1183 pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1184}
1185extern "C" {
1186 pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1187}
1188extern "C" {
1189 pub fn mkstemps(
1190 __template: *mut ::std::os::raw::c_char,
1191 __suffixlen: ::std::os::raw::c_int,
1192 ) -> ::std::os::raw::c_int;
1193}
1194extern "C" {
1195 pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1196}
1197extern "C" {
1198 pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1199}
1200extern "C" {
1201 pub fn realpath(
1202 __name: *const ::std::os::raw::c_char,
1203 __resolved: *mut ::std::os::raw::c_char,
1204 ) -> *mut ::std::os::raw::c_char;
1205}
1206pub type __compar_fn_t = ::std::option::Option<
1207 unsafe extern "C" fn(
1208 arg1: *const ::std::os::raw::c_void,
1209 arg2: *const ::std::os::raw::c_void,
1210 ) -> ::std::os::raw::c_int,
1211>;
1212extern "C" {
1213 pub fn bsearch(
1214 __key: *const ::std::os::raw::c_void,
1215 __base: *const ::std::os::raw::c_void,
1216 __nmemb: usize,
1217 __size: usize,
1218 __compar: __compar_fn_t,
1219 ) -> *mut ::std::os::raw::c_void;
1220}
1221extern "C" {
1222 pub fn qsort(
1223 __base: *mut ::std::os::raw::c_void,
1224 __nmemb: usize,
1225 __size: usize,
1226 __compar: __compar_fn_t,
1227 );
1228}
1229extern "C" {
1230 pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1231}
1232extern "C" {
1233 pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
1234}
1235extern "C" {
1236 pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
1237}
1238extern "C" {
1239 pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
1240}
1241extern "C" {
1242 pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
1243}
1244extern "C" {
1245 pub fn lldiv(
1246 __numer: ::std::os::raw::c_longlong,
1247 __denom: ::std::os::raw::c_longlong,
1248 ) -> lldiv_t;
1249}
1250extern "C" {
1251 pub fn ecvt(
1252 __value: f64,
1253 __ndigit: ::std::os::raw::c_int,
1254 __decpt: *mut ::std::os::raw::c_int,
1255 __sign: *mut ::std::os::raw::c_int,
1256 ) -> *mut ::std::os::raw::c_char;
1257}
1258extern "C" {
1259 pub fn fcvt(
1260 __value: f64,
1261 __ndigit: ::std::os::raw::c_int,
1262 __decpt: *mut ::std::os::raw::c_int,
1263 __sign: *mut ::std::os::raw::c_int,
1264 ) -> *mut ::std::os::raw::c_char;
1265}
1266extern "C" {
1267 pub fn gcvt(
1268 __value: f64,
1269 __ndigit: ::std::os::raw::c_int,
1270 __buf: *mut ::std::os::raw::c_char,
1271 ) -> *mut ::std::os::raw::c_char;
1272}
1273extern "C" {
1274 pub fn ecvt_r(
1275 __value: f64,
1276 __ndigit: ::std::os::raw::c_int,
1277 __decpt: *mut ::std::os::raw::c_int,
1278 __sign: *mut ::std::os::raw::c_int,
1279 __buf: *mut ::std::os::raw::c_char,
1280 __len: usize,
1281 ) -> ::std::os::raw::c_int;
1282}
1283extern "C" {
1284 pub fn fcvt_r(
1285 __value: f64,
1286 __ndigit: ::std::os::raw::c_int,
1287 __decpt: *mut ::std::os::raw::c_int,
1288 __sign: *mut ::std::os::raw::c_int,
1289 __buf: *mut ::std::os::raw::c_char,
1290 __len: usize,
1291 ) -> ::std::os::raw::c_int;
1292}
1293extern "C" {
1294 pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
1295}
1296extern "C" {
1297 pub fn mbtowc(
1298 __pwc: *mut wchar_t,
1299 __s: *const ::std::os::raw::c_char,
1300 __n: usize,
1301 ) -> ::std::os::raw::c_int;
1302}
1303extern "C" {
1304 pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
1305}
1306extern "C" {
1307 pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
1308}
1309extern "C" {
1310 pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
1311}
1312extern "C" {
1313 pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1314}
1315extern "C" {
1316 pub fn getsubopt(
1317 __optionp: *mut *mut ::std::os::raw::c_char,
1318 __tokens: *const *mut ::std::os::raw::c_char,
1319 __valuep: *mut *mut ::std::os::raw::c_char,
1320 ) -> ::std::os::raw::c_int;
1321}
1322extern "C" {
1323 pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
1324 -> ::std::os::raw::c_int;
1325}
1326pub const BGFX_FATAL_DEBUG_CHECK: bgfx_fatal = 0;
1327#[doc = " ( 0)"]
1328pub const BGFX_FATAL_INVALID_SHADER: bgfx_fatal = 1;
1329#[doc = " ( 1)"]
1330pub const BGFX_FATAL_UNABLE_TO_INITIALIZE: bgfx_fatal = 2;
1331#[doc = " ( 2)"]
1332pub const BGFX_FATAL_UNABLE_TO_CREATE_TEXTURE: bgfx_fatal = 3;
1333#[doc = " ( 3)"]
1334pub const BGFX_FATAL_DEVICE_LOST: bgfx_fatal = 4;
1335#[doc = " ( 4)"]
1336pub const BGFX_FATAL_COUNT: bgfx_fatal = 5;
1337#[doc = " Fatal error enum.\n"]
1338pub type bgfx_fatal = ::std::os::raw::c_uint;
1339#[doc = " Fatal error enum.\n"]
1340pub use self::bgfx_fatal as bgfx_fatal_t;
1341pub const BGFX_RENDERER_TYPE_NOOP: bgfx_renderer_type = 0;
1342#[doc = " ( 0) No rendering."]
1343pub const BGFX_RENDERER_TYPE_AGC: bgfx_renderer_type = 1;
1344#[doc = " ( 1) AGC"]
1345pub const BGFX_RENDERER_TYPE_DIRECT3D9: bgfx_renderer_type = 2;
1346#[doc = " ( 2) Direct3D 9.0"]
1347pub const BGFX_RENDERER_TYPE_DIRECT3D11: bgfx_renderer_type = 3;
1348#[doc = " ( 3) Direct3D 11.0"]
1349pub const BGFX_RENDERER_TYPE_DIRECT3D12: bgfx_renderer_type = 4;
1350#[doc = " ( 4) Direct3D 12.0"]
1351pub const BGFX_RENDERER_TYPE_GNM: bgfx_renderer_type = 5;
1352#[doc = " ( 5) GNM"]
1353pub const BGFX_RENDERER_TYPE_METAL: bgfx_renderer_type = 6;
1354#[doc = " ( 6) Metal"]
1355pub const BGFX_RENDERER_TYPE_NVN: bgfx_renderer_type = 7;
1356#[doc = " ( 7) NVN"]
1357pub const BGFX_RENDERER_TYPE_OPENGLES: bgfx_renderer_type = 8;
1358#[doc = " ( 8) OpenGL ES 2.0+"]
1359pub const BGFX_RENDERER_TYPE_OPENGL: bgfx_renderer_type = 9;
1360#[doc = " ( 9) OpenGL 2.1+"]
1361pub const BGFX_RENDERER_TYPE_VULKAN: bgfx_renderer_type = 10;
1362#[doc = " (10) Vulkan"]
1363pub const BGFX_RENDERER_TYPE_WEBGPU: bgfx_renderer_type = 11;
1364#[doc = " (11) WebGPU"]
1365pub const BGFX_RENDERER_TYPE_COUNT: bgfx_renderer_type = 12;
1366#[doc = " Renderer backend type enum.\n"]
1367pub type bgfx_renderer_type = ::std::os::raw::c_uint;
1368#[doc = " Renderer backend type enum.\n"]
1369pub use self::bgfx_renderer_type as bgfx_renderer_type_t;
1370pub const BGFX_ACCESS_READ: bgfx_access = 0;
1371#[doc = " ( 0) Read."]
1372pub const BGFX_ACCESS_WRITE: bgfx_access = 1;
1373#[doc = " ( 1) Write."]
1374pub const BGFX_ACCESS_READWRITE: bgfx_access = 2;
1375#[doc = " ( 2) Read and write."]
1376pub const BGFX_ACCESS_COUNT: bgfx_access = 3;
1377#[doc = " Access mode enum.\n"]
1378pub type bgfx_access = ::std::os::raw::c_uint;
1379#[doc = " Access mode enum.\n"]
1380pub use self::bgfx_access as bgfx_access_t;
1381pub const BGFX_ATTRIB_POSITION: bgfx_attrib = 0;
1382#[doc = " ( 0) a_position"]
1383pub const BGFX_ATTRIB_NORMAL: bgfx_attrib = 1;
1384#[doc = " ( 1) a_normal"]
1385pub const BGFX_ATTRIB_TANGENT: bgfx_attrib = 2;
1386#[doc = " ( 2) a_tangent"]
1387pub const BGFX_ATTRIB_BITANGENT: bgfx_attrib = 3;
1388#[doc = " ( 3) a_bitangent"]
1389pub const BGFX_ATTRIB_COLOR0: bgfx_attrib = 4;
1390#[doc = " ( 4) a_color0"]
1391pub const BGFX_ATTRIB_COLOR1: bgfx_attrib = 5;
1392#[doc = " ( 5) a_color1"]
1393pub const BGFX_ATTRIB_COLOR2: bgfx_attrib = 6;
1394#[doc = " ( 6) a_color2"]
1395pub const BGFX_ATTRIB_COLOR3: bgfx_attrib = 7;
1396#[doc = " ( 7) a_color3"]
1397pub const BGFX_ATTRIB_INDICES: bgfx_attrib = 8;
1398#[doc = " ( 8) a_indices"]
1399pub const BGFX_ATTRIB_WEIGHT: bgfx_attrib = 9;
1400#[doc = " ( 9) a_weight"]
1401pub const BGFX_ATTRIB_TEXCOORD0: bgfx_attrib = 10;
1402#[doc = " (10) a_texcoord0"]
1403pub const BGFX_ATTRIB_TEXCOORD1: bgfx_attrib = 11;
1404#[doc = " (11) a_texcoord1"]
1405pub const BGFX_ATTRIB_TEXCOORD2: bgfx_attrib = 12;
1406#[doc = " (12) a_texcoord2"]
1407pub const BGFX_ATTRIB_TEXCOORD3: bgfx_attrib = 13;
1408#[doc = " (13) a_texcoord3"]
1409pub const BGFX_ATTRIB_TEXCOORD4: bgfx_attrib = 14;
1410#[doc = " (14) a_texcoord4"]
1411pub const BGFX_ATTRIB_TEXCOORD5: bgfx_attrib = 15;
1412#[doc = " (15) a_texcoord5"]
1413pub const BGFX_ATTRIB_TEXCOORD6: bgfx_attrib = 16;
1414#[doc = " (16) a_texcoord6"]
1415pub const BGFX_ATTRIB_TEXCOORD7: bgfx_attrib = 17;
1416#[doc = " (17) a_texcoord7"]
1417pub const BGFX_ATTRIB_COUNT: bgfx_attrib = 18;
1418#[doc = " Vertex attribute enum.\n"]
1419pub type bgfx_attrib = ::std::os::raw::c_uint;
1420#[doc = " Vertex attribute enum.\n"]
1421pub use self::bgfx_attrib as bgfx_attrib_t;
1422pub const BGFX_ATTRIB_TYPE_UINT8: bgfx_attrib_type = 0;
1423#[doc = " ( 0) Uint8"]
1424pub const BGFX_ATTRIB_TYPE_UINT10: bgfx_attrib_type = 1;
1425#[doc = " ( 1) Uint10, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_UINT10`."]
1426pub const BGFX_ATTRIB_TYPE_INT16: bgfx_attrib_type = 2;
1427#[doc = " ( 2) Int16"]
1428pub const BGFX_ATTRIB_TYPE_HALF: bgfx_attrib_type = 3;
1429#[doc = " ( 3) Half, availability depends on: `BGFX_CAPS_VERTEX_ATTRIB_HALF`."]
1430pub const BGFX_ATTRIB_TYPE_FLOAT: bgfx_attrib_type = 4;
1431#[doc = " ( 4) Float"]
1432pub const BGFX_ATTRIB_TYPE_COUNT: bgfx_attrib_type = 5;
1433#[doc = " Vertex attribute type enum.\n"]
1434pub type bgfx_attrib_type = ::std::os::raw::c_uint;
1435#[doc = " Vertex attribute type enum.\n"]
1436pub use self::bgfx_attrib_type as bgfx_attrib_type_t;
1437pub const BGFX_TEXTURE_FORMAT_BC1: bgfx_texture_format = 0;
1438#[doc = " ( 0) DXT1 R5G6B5A1"]
1439pub const BGFX_TEXTURE_FORMAT_BC2: bgfx_texture_format = 1;
1440#[doc = " ( 1) DXT3 R5G6B5A4"]
1441pub const BGFX_TEXTURE_FORMAT_BC3: bgfx_texture_format = 2;
1442#[doc = " ( 2) DXT5 R5G6B5A8"]
1443pub const BGFX_TEXTURE_FORMAT_BC4: bgfx_texture_format = 3;
1444#[doc = " ( 3) LATC1/ATI1 R8"]
1445pub const BGFX_TEXTURE_FORMAT_BC5: bgfx_texture_format = 4;
1446#[doc = " ( 4) LATC2/ATI2 RG8"]
1447pub const BGFX_TEXTURE_FORMAT_BC6H: bgfx_texture_format = 5;
1448#[doc = " ( 5) BC6H RGB16F"]
1449pub const BGFX_TEXTURE_FORMAT_BC7: bgfx_texture_format = 6;
1450#[doc = " ( 6) BC7 RGB 4-7 bits per color channel, 0-8 bits alpha"]
1451pub const BGFX_TEXTURE_FORMAT_ETC1: bgfx_texture_format = 7;
1452#[doc = " ( 7) ETC1 RGB8"]
1453pub const BGFX_TEXTURE_FORMAT_ETC2: bgfx_texture_format = 8;
1454#[doc = " ( 8) ETC2 RGB8"]
1455pub const BGFX_TEXTURE_FORMAT_ETC2A: bgfx_texture_format = 9;
1456#[doc = " ( 9) ETC2 RGBA8"]
1457pub const BGFX_TEXTURE_FORMAT_ETC2A1: bgfx_texture_format = 10;
1458#[doc = " (10) ETC2 RGB8A1"]
1459pub const BGFX_TEXTURE_FORMAT_PTC12: bgfx_texture_format = 11;
1460#[doc = " (11) PVRTC1 RGB 2BPP"]
1461pub const BGFX_TEXTURE_FORMAT_PTC14: bgfx_texture_format = 12;
1462#[doc = " (12) PVRTC1 RGB 4BPP"]
1463pub const BGFX_TEXTURE_FORMAT_PTC12A: bgfx_texture_format = 13;
1464#[doc = " (13) PVRTC1 RGBA 2BPP"]
1465pub const BGFX_TEXTURE_FORMAT_PTC14A: bgfx_texture_format = 14;
1466#[doc = " (14) PVRTC1 RGBA 4BPP"]
1467pub const BGFX_TEXTURE_FORMAT_PTC22: bgfx_texture_format = 15;
1468#[doc = " (15) PVRTC2 RGBA 2BPP"]
1469pub const BGFX_TEXTURE_FORMAT_PTC24: bgfx_texture_format = 16;
1470#[doc = " (16) PVRTC2 RGBA 4BPP"]
1471pub const BGFX_TEXTURE_FORMAT_ATC: bgfx_texture_format = 17;
1472#[doc = " (17) ATC RGB 4BPP"]
1473pub const BGFX_TEXTURE_FORMAT_ATCE: bgfx_texture_format = 18;
1474#[doc = " (18) ATCE RGBA 8 BPP explicit alpha"]
1475pub const BGFX_TEXTURE_FORMAT_ATCI: bgfx_texture_format = 19;
1476#[doc = " (19) ATCI RGBA 8 BPP interpolated alpha"]
1477pub const BGFX_TEXTURE_FORMAT_ASTC4X4: bgfx_texture_format = 20;
1478#[doc = " (20) ASTC 4x4 8.0 BPP"]
1479pub const BGFX_TEXTURE_FORMAT_ASTC5X4: bgfx_texture_format = 21;
1480#[doc = " (21) ASTC 5x4 6.40 BPP"]
1481pub const BGFX_TEXTURE_FORMAT_ASTC5X5: bgfx_texture_format = 22;
1482#[doc = " (22) ASTC 5x5 5.12 BPP"]
1483pub const BGFX_TEXTURE_FORMAT_ASTC6X5: bgfx_texture_format = 23;
1484#[doc = " (23) ASTC 6x5 4.27 BPP"]
1485pub const BGFX_TEXTURE_FORMAT_ASTC6X6: bgfx_texture_format = 24;
1486#[doc = " (24) ASTC 6x6 3.56 BPP"]
1487pub const BGFX_TEXTURE_FORMAT_ASTC8X5: bgfx_texture_format = 25;
1488#[doc = " (25) ASTC 8x5 3.20 BPP"]
1489pub const BGFX_TEXTURE_FORMAT_ASTC8X6: bgfx_texture_format = 26;
1490#[doc = " (26) ASTC 8x6 2.67 BPP"]
1491pub const BGFX_TEXTURE_FORMAT_ASTC8X8: bgfx_texture_format = 27;
1492#[doc = " (27) ASTC 8x8 2.00 BPP"]
1493pub const BGFX_TEXTURE_FORMAT_ASTC10X5: bgfx_texture_format = 28;
1494#[doc = " (28) ASTC 10x5 2.56 BPP"]
1495pub const BGFX_TEXTURE_FORMAT_ASTC10X6: bgfx_texture_format = 29;
1496#[doc = " (29) ASTC 10x6 2.13 BPP"]
1497pub const BGFX_TEXTURE_FORMAT_ASTC10X8: bgfx_texture_format = 30;
1498#[doc = " (30) ASTC 10x8 1.60 BPP"]
1499pub const BGFX_TEXTURE_FORMAT_ASTC10X10: bgfx_texture_format = 31;
1500#[doc = " (31) ASTC 10x10 1.28 BPP"]
1501pub const BGFX_TEXTURE_FORMAT_ASTC12X10: bgfx_texture_format = 32;
1502#[doc = " (32) ASTC 12x10 1.07 BPP"]
1503pub const BGFX_TEXTURE_FORMAT_ASTC12X12: bgfx_texture_format = 33;
1504#[doc = " (33) ASTC 12x12 0.89 BPP"]
1505pub const BGFX_TEXTURE_FORMAT_UNKNOWN: bgfx_texture_format = 34;
1506#[doc = " (34) Compressed formats above."]
1507pub const BGFX_TEXTURE_FORMAT_R1: bgfx_texture_format = 35;
1508#[doc = " (35)"]
1509pub const BGFX_TEXTURE_FORMAT_A8: bgfx_texture_format = 36;
1510#[doc = " (36)"]
1511pub const BGFX_TEXTURE_FORMAT_R8: bgfx_texture_format = 37;
1512#[doc = " (37)"]
1513pub const BGFX_TEXTURE_FORMAT_R8I: bgfx_texture_format = 38;
1514#[doc = " (38)"]
1515pub const BGFX_TEXTURE_FORMAT_R8U: bgfx_texture_format = 39;
1516#[doc = " (39)"]
1517pub const BGFX_TEXTURE_FORMAT_R8S: bgfx_texture_format = 40;
1518#[doc = " (40)"]
1519pub const BGFX_TEXTURE_FORMAT_R16: bgfx_texture_format = 41;
1520#[doc = " (41)"]
1521pub const BGFX_TEXTURE_FORMAT_R16I: bgfx_texture_format = 42;
1522#[doc = " (42)"]
1523pub const BGFX_TEXTURE_FORMAT_R16U: bgfx_texture_format = 43;
1524#[doc = " (43)"]
1525pub const BGFX_TEXTURE_FORMAT_R16F: bgfx_texture_format = 44;
1526#[doc = " (44)"]
1527pub const BGFX_TEXTURE_FORMAT_R16S: bgfx_texture_format = 45;
1528#[doc = " (45)"]
1529pub const BGFX_TEXTURE_FORMAT_R32I: bgfx_texture_format = 46;
1530#[doc = " (46)"]
1531pub const BGFX_TEXTURE_FORMAT_R32U: bgfx_texture_format = 47;
1532#[doc = " (47)"]
1533pub const BGFX_TEXTURE_FORMAT_R32F: bgfx_texture_format = 48;
1534#[doc = " (48)"]
1535pub const BGFX_TEXTURE_FORMAT_RG8: bgfx_texture_format = 49;
1536#[doc = " (49)"]
1537pub const BGFX_TEXTURE_FORMAT_RG8I: bgfx_texture_format = 50;
1538#[doc = " (50)"]
1539pub const BGFX_TEXTURE_FORMAT_RG8U: bgfx_texture_format = 51;
1540#[doc = " (51)"]
1541pub const BGFX_TEXTURE_FORMAT_RG8S: bgfx_texture_format = 52;
1542#[doc = " (52)"]
1543pub const BGFX_TEXTURE_FORMAT_RG16: bgfx_texture_format = 53;
1544#[doc = " (53)"]
1545pub const BGFX_TEXTURE_FORMAT_RG16I: bgfx_texture_format = 54;
1546#[doc = " (54)"]
1547pub const BGFX_TEXTURE_FORMAT_RG16U: bgfx_texture_format = 55;
1548#[doc = " (55)"]
1549pub const BGFX_TEXTURE_FORMAT_RG16F: bgfx_texture_format = 56;
1550#[doc = " (56)"]
1551pub const BGFX_TEXTURE_FORMAT_RG16S: bgfx_texture_format = 57;
1552#[doc = " (57)"]
1553pub const BGFX_TEXTURE_FORMAT_RG32I: bgfx_texture_format = 58;
1554#[doc = " (58)"]
1555pub const BGFX_TEXTURE_FORMAT_RG32U: bgfx_texture_format = 59;
1556#[doc = " (59)"]
1557pub const BGFX_TEXTURE_FORMAT_RG32F: bgfx_texture_format = 60;
1558#[doc = " (60)"]
1559pub const BGFX_TEXTURE_FORMAT_RGB8: bgfx_texture_format = 61;
1560#[doc = " (61)"]
1561pub const BGFX_TEXTURE_FORMAT_RGB8I: bgfx_texture_format = 62;
1562#[doc = " (62)"]
1563pub const BGFX_TEXTURE_FORMAT_RGB8U: bgfx_texture_format = 63;
1564#[doc = " (63)"]
1565pub const BGFX_TEXTURE_FORMAT_RGB8S: bgfx_texture_format = 64;
1566#[doc = " (64)"]
1567pub const BGFX_TEXTURE_FORMAT_RGB9E5F: bgfx_texture_format = 65;
1568#[doc = " (65)"]
1569pub const BGFX_TEXTURE_FORMAT_BGRA8: bgfx_texture_format = 66;
1570#[doc = " (66)"]
1571pub const BGFX_TEXTURE_FORMAT_RGBA8: bgfx_texture_format = 67;
1572#[doc = " (67)"]
1573pub const BGFX_TEXTURE_FORMAT_RGBA8I: bgfx_texture_format = 68;
1574#[doc = " (68)"]
1575pub const BGFX_TEXTURE_FORMAT_RGBA8U: bgfx_texture_format = 69;
1576#[doc = " (69)"]
1577pub const BGFX_TEXTURE_FORMAT_RGBA8S: bgfx_texture_format = 70;
1578#[doc = " (70)"]
1579pub const BGFX_TEXTURE_FORMAT_RGBA16: bgfx_texture_format = 71;
1580#[doc = " (71)"]
1581pub const BGFX_TEXTURE_FORMAT_RGBA16I: bgfx_texture_format = 72;
1582#[doc = " (72)"]
1583pub const BGFX_TEXTURE_FORMAT_RGBA16U: bgfx_texture_format = 73;
1584#[doc = " (73)"]
1585pub const BGFX_TEXTURE_FORMAT_RGBA16F: bgfx_texture_format = 74;
1586#[doc = " (74)"]
1587pub const BGFX_TEXTURE_FORMAT_RGBA16S: bgfx_texture_format = 75;
1588#[doc = " (75)"]
1589pub const BGFX_TEXTURE_FORMAT_RGBA32I: bgfx_texture_format = 76;
1590#[doc = " (76)"]
1591pub const BGFX_TEXTURE_FORMAT_RGBA32U: bgfx_texture_format = 77;
1592#[doc = " (77)"]
1593pub const BGFX_TEXTURE_FORMAT_RGBA32F: bgfx_texture_format = 78;
1594#[doc = " (78)"]
1595pub const BGFX_TEXTURE_FORMAT_B5G6R5: bgfx_texture_format = 79;
1596#[doc = " (79)"]
1597pub const BGFX_TEXTURE_FORMAT_R5G6B5: bgfx_texture_format = 80;
1598#[doc = " (80)"]
1599pub const BGFX_TEXTURE_FORMAT_BGRA4: bgfx_texture_format = 81;
1600#[doc = " (81)"]
1601pub const BGFX_TEXTURE_FORMAT_RGBA4: bgfx_texture_format = 82;
1602#[doc = " (82)"]
1603pub const BGFX_TEXTURE_FORMAT_BGR5A1: bgfx_texture_format = 83;
1604#[doc = " (83)"]
1605pub const BGFX_TEXTURE_FORMAT_RGB5A1: bgfx_texture_format = 84;
1606#[doc = " (84)"]
1607pub const BGFX_TEXTURE_FORMAT_RGB10A2: bgfx_texture_format = 85;
1608#[doc = " (85)"]
1609pub const BGFX_TEXTURE_FORMAT_RG11B10F: bgfx_texture_format = 86;
1610#[doc = " (86)"]
1611pub const BGFX_TEXTURE_FORMAT_UNKNOWNDEPTH: bgfx_texture_format = 87;
1612#[doc = " (87) Depth formats below."]
1613pub const BGFX_TEXTURE_FORMAT_D16: bgfx_texture_format = 88;
1614#[doc = " (88)"]
1615pub const BGFX_TEXTURE_FORMAT_D24: bgfx_texture_format = 89;
1616#[doc = " (89)"]
1617pub const BGFX_TEXTURE_FORMAT_D24S8: bgfx_texture_format = 90;
1618#[doc = " (90)"]
1619pub const BGFX_TEXTURE_FORMAT_D32: bgfx_texture_format = 91;
1620#[doc = " (91)"]
1621pub const BGFX_TEXTURE_FORMAT_D16F: bgfx_texture_format = 92;
1622#[doc = " (92)"]
1623pub const BGFX_TEXTURE_FORMAT_D24F: bgfx_texture_format = 93;
1624#[doc = " (93)"]
1625pub const BGFX_TEXTURE_FORMAT_D32F: bgfx_texture_format = 94;
1626#[doc = " (94)"]
1627pub const BGFX_TEXTURE_FORMAT_D0S8: bgfx_texture_format = 95;
1628#[doc = " (95)"]
1629pub const BGFX_TEXTURE_FORMAT_COUNT: bgfx_texture_format = 96;
1630#[doc = " Texture format enum.\n Notation:\n RGBA16S\n ^ ^ ^\n | | +-- [ ]Unorm\n | | [F]loat\n | | [S]norm\n | | [I]nt\n | | [U]int\n | +---- Number of bits per component\n +-------- Components\n @attention Availability depends on Caps (see: formats).\n"]
1631pub type bgfx_texture_format = ::std::os::raw::c_uint;
1632#[doc = " Texture format enum.\n Notation:\n RGBA16S\n ^ ^ ^\n | | +-- [ ]Unorm\n | | [F]loat\n | | [S]norm\n | | [I]nt\n | | [U]int\n | +---- Number of bits per component\n +-------- Components\n @attention Availability depends on Caps (see: formats).\n"]
1633pub use self::bgfx_texture_format as bgfx_texture_format_t;
1634pub const BGFX_UNIFORM_TYPE_SAMPLER: bgfx_uniform_type = 0;
1635#[doc = " ( 0) Sampler."]
1636pub const BGFX_UNIFORM_TYPE_END: bgfx_uniform_type = 1;
1637#[doc = " ( 1) Reserved, do not use."]
1638pub const BGFX_UNIFORM_TYPE_VEC4: bgfx_uniform_type = 2;
1639#[doc = " ( 2) 4 floats vector."]
1640pub const BGFX_UNIFORM_TYPE_MAT3: bgfx_uniform_type = 3;
1641#[doc = " ( 3) 3x3 matrix."]
1642pub const BGFX_UNIFORM_TYPE_MAT4: bgfx_uniform_type = 4;
1643#[doc = " ( 4) 4x4 matrix."]
1644pub const BGFX_UNIFORM_TYPE_COUNT: bgfx_uniform_type = 5;
1645#[doc = " Uniform type enum.\n"]
1646pub type bgfx_uniform_type = ::std::os::raw::c_uint;
1647#[doc = " Uniform type enum.\n"]
1648pub use self::bgfx_uniform_type as bgfx_uniform_type_t;
1649pub const BGFX_BACKBUFFER_RATIO_EQUAL: bgfx_backbuffer_ratio = 0;
1650#[doc = " ( 0) Equal to backbuffer."]
1651pub const BGFX_BACKBUFFER_RATIO_HALF: bgfx_backbuffer_ratio = 1;
1652#[doc = " ( 1) One half size of backbuffer."]
1653pub const BGFX_BACKBUFFER_RATIO_QUARTER: bgfx_backbuffer_ratio = 2;
1654#[doc = " ( 2) One quarter size of backbuffer."]
1655pub const BGFX_BACKBUFFER_RATIO_EIGHTH: bgfx_backbuffer_ratio = 3;
1656#[doc = " ( 3) One eighth size of backbuffer."]
1657pub const BGFX_BACKBUFFER_RATIO_SIXTEENTH: bgfx_backbuffer_ratio = 4;
1658#[doc = " ( 4) One sixteenth size of backbuffer."]
1659pub const BGFX_BACKBUFFER_RATIO_DOUBLE: bgfx_backbuffer_ratio = 5;
1660#[doc = " ( 5) Double size of backbuffer."]
1661pub const BGFX_BACKBUFFER_RATIO_COUNT: bgfx_backbuffer_ratio = 6;
1662#[doc = " Backbuffer ratio enum.\n"]
1663pub type bgfx_backbuffer_ratio = ::std::os::raw::c_uint;
1664#[doc = " Backbuffer ratio enum.\n"]
1665pub use self::bgfx_backbuffer_ratio as bgfx_backbuffer_ratio_t;
1666pub const BGFX_OCCLUSION_QUERY_RESULT_INVISIBLE: bgfx_occlusion_query_result = 0;
1667#[doc = " ( 0) Query failed test."]
1668pub const BGFX_OCCLUSION_QUERY_RESULT_VISIBLE: bgfx_occlusion_query_result = 1;
1669#[doc = " ( 1) Query passed test."]
1670pub const BGFX_OCCLUSION_QUERY_RESULT_NORESULT: bgfx_occlusion_query_result = 2;
1671#[doc = " ( 2) Query result is not available yet."]
1672pub const BGFX_OCCLUSION_QUERY_RESULT_COUNT: bgfx_occlusion_query_result = 3;
1673#[doc = " Occlusion query result.\n"]
1674pub type bgfx_occlusion_query_result = ::std::os::raw::c_uint;
1675#[doc = " Occlusion query result.\n"]
1676pub use self::bgfx_occlusion_query_result as bgfx_occlusion_query_result_t;
1677pub const BGFX_TOPOLOGY_TRI_LIST: bgfx_topology = 0;
1678#[doc = " ( 0) Triangle list."]
1679pub const BGFX_TOPOLOGY_TRI_STRIP: bgfx_topology = 1;
1680#[doc = " ( 1) Triangle strip."]
1681pub const BGFX_TOPOLOGY_LINE_LIST: bgfx_topology = 2;
1682#[doc = " ( 2) Line list."]
1683pub const BGFX_TOPOLOGY_LINE_STRIP: bgfx_topology = 3;
1684#[doc = " ( 3) Line strip."]
1685pub const BGFX_TOPOLOGY_POINT_LIST: bgfx_topology = 4;
1686#[doc = " ( 4) Point list."]
1687pub const BGFX_TOPOLOGY_COUNT: bgfx_topology = 5;
1688#[doc = " Primitive topology.\n"]
1689pub type bgfx_topology = ::std::os::raw::c_uint;
1690#[doc = " Primitive topology.\n"]
1691pub use self::bgfx_topology as bgfx_topology_t;
1692pub const BGFX_TOPOLOGY_CONVERT_TRI_LIST_FLIP_WINDING: bgfx_topology_convert = 0;
1693#[doc = " ( 0) Flip winding order of triangle list."]
1694pub const BGFX_TOPOLOGY_CONVERT_TRI_STRIP_FLIP_WINDING: bgfx_topology_convert = 1;
1695#[doc = " ( 1) Flip winding order of triangle strip."]
1696pub const BGFX_TOPOLOGY_CONVERT_TRI_LIST_TO_LINE_LIST: bgfx_topology_convert = 2;
1697#[doc = " ( 2) Convert triangle list to line list."]
1698pub const BGFX_TOPOLOGY_CONVERT_TRI_STRIP_TO_TRI_LIST: bgfx_topology_convert = 3;
1699#[doc = " ( 3) Convert triangle strip to triangle list."]
1700pub const BGFX_TOPOLOGY_CONVERT_LINE_STRIP_TO_LINE_LIST: bgfx_topology_convert = 4;
1701#[doc = " ( 4) Convert line strip to line list."]
1702pub const BGFX_TOPOLOGY_CONVERT_COUNT: bgfx_topology_convert = 5;
1703#[doc = " Topology conversion function.\n"]
1704pub type bgfx_topology_convert = ::std::os::raw::c_uint;
1705#[doc = " Topology conversion function.\n"]
1706pub use self::bgfx_topology_convert as bgfx_topology_convert_t;
1707pub const BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MIN: bgfx_topology_sort = 0;
1708#[doc = " ( 0)"]
1709pub const BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_AVG: bgfx_topology_sort = 1;
1710#[doc = " ( 1)"]
1711pub const BGFX_TOPOLOGY_SORT_DIRECTION_FRONT_TO_BACK_MAX: bgfx_topology_sort = 2;
1712#[doc = " ( 2)"]
1713pub const BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MIN: bgfx_topology_sort = 3;
1714#[doc = " ( 3)"]
1715pub const BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_AVG: bgfx_topology_sort = 4;
1716#[doc = " ( 4)"]
1717pub const BGFX_TOPOLOGY_SORT_DIRECTION_BACK_TO_FRONT_MAX: bgfx_topology_sort = 5;
1718#[doc = " ( 5)"]
1719pub const BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MIN: bgfx_topology_sort = 6;
1720#[doc = " ( 6)"]
1721pub const BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_AVG: bgfx_topology_sort = 7;
1722#[doc = " ( 7)"]
1723pub const BGFX_TOPOLOGY_SORT_DISTANCE_FRONT_TO_BACK_MAX: bgfx_topology_sort = 8;
1724#[doc = " ( 8)"]
1725pub const BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MIN: bgfx_topology_sort = 9;
1726#[doc = " ( 9)"]
1727pub const BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_AVG: bgfx_topology_sort = 10;
1728#[doc = " (10)"]
1729pub const BGFX_TOPOLOGY_SORT_DISTANCE_BACK_TO_FRONT_MAX: bgfx_topology_sort = 11;
1730#[doc = " (11)"]
1731pub const BGFX_TOPOLOGY_SORT_COUNT: bgfx_topology_sort = 12;
1732#[doc = " Topology sort order.\n"]
1733pub type bgfx_topology_sort = ::std::os::raw::c_uint;
1734#[doc = " Topology sort order.\n"]
1735pub use self::bgfx_topology_sort as bgfx_topology_sort_t;
1736pub const BGFX_VIEW_MODE_DEFAULT: bgfx_view_mode = 0;
1737#[doc = " ( 0) Default sort order."]
1738pub const BGFX_VIEW_MODE_SEQUENTIAL: bgfx_view_mode = 1;
1739#[doc = " ( 1) Sort in the same order in which submit calls were called."]
1740pub const BGFX_VIEW_MODE_DEPTH_ASCENDING: bgfx_view_mode = 2;
1741#[doc = " ( 2) Sort draw call depth in ascending order."]
1742pub const BGFX_VIEW_MODE_DEPTH_DESCENDING: bgfx_view_mode = 3;
1743#[doc = " ( 3) Sort draw call depth in descending order."]
1744pub const BGFX_VIEW_MODE_COUNT: bgfx_view_mode = 4;
1745#[doc = " View mode sets draw call sort order.\n"]
1746pub type bgfx_view_mode = ::std::os::raw::c_uint;
1747#[doc = " View mode sets draw call sort order.\n"]
1748pub use self::bgfx_view_mode as bgfx_view_mode_t;
1749pub const BGFX_NATIVE_WINDOW_HANDLE_TYPE_DEFAULT: bgfx_native_window_handle_type = 0;
1750#[doc = " ( 0) Platform default handle type (X11 on Linux)"]
1751pub const BGFX_NATIVE_WINDOW_HANDLE_TYPE_WAYLAND: bgfx_native_window_handle_type = 1;
1752#[doc = " ( 1) Wayland."]
1753pub const BGFX_NATIVE_WINDOW_HANDLE_TYPE_COUNT: bgfx_native_window_handle_type = 2;
1754#[doc = " Native window handle type..\n"]
1755pub type bgfx_native_window_handle_type = ::std::os::raw::c_uint;
1756#[doc = " Native window handle type..\n"]
1757pub use self::bgfx_native_window_handle_type as bgfx_native_window_handle_type_t;
1758pub const BGFX_RENDER_FRAME_NO_CONTEXT: bgfx_render_frame = 0;
1759#[doc = " ( 0) Renderer context is not created yet."]
1760pub const BGFX_RENDER_FRAME_RENDER: bgfx_render_frame = 1;
1761#[doc = " ( 1) Renderer context is created and rendering."]
1762pub const BGFX_RENDER_FRAME_TIMEOUT: bgfx_render_frame = 2;
1763#[doc = " ( 2) Renderer context wait for main thread signal timed out without rendering."]
1764pub const BGFX_RENDER_FRAME_EXITING: bgfx_render_frame = 3;
1765#[doc = " ( 3) Renderer context is getting destroyed."]
1766pub const BGFX_RENDER_FRAME_COUNT: bgfx_render_frame = 4;
1767#[doc = " Render frame enum.\n"]
1768pub type bgfx_render_frame = ::std::os::raw::c_uint;
1769#[doc = " Render frame enum.\n"]
1770pub use self::bgfx_render_frame as bgfx_render_frame_t;
1771pub type bgfx_view_id_t = u16;
1772#[repr(C)]
1773#[derive(Debug, Copy, Clone)]
1774pub struct bgfx_allocator_interface_s {
1775 pub vtbl: *const bgfx_allocator_vtbl_s,
1776}
1777pub type bgfx_allocator_interface_t = bgfx_allocator_interface_s;
1778#[repr(C)]
1779#[derive(Debug, Copy, Clone)]
1780pub struct bgfx_allocator_vtbl_s {
1781 pub realloc: ::std::option::Option<
1782 unsafe extern "C" fn(
1783 _this: *mut bgfx_allocator_interface_t,
1784 _ptr: *mut ::std::os::raw::c_void,
1785 _size: usize,
1786 _align: usize,
1787 _file: *const ::std::os::raw::c_char,
1788 _line: u32,
1789 ) -> *mut ::std::os::raw::c_void,
1790 >,
1791}
1792pub type bgfx_allocator_vtbl_t = bgfx_allocator_vtbl_s;
1793pub type bgfx_interface_vtbl_t = bgfx_interface_vtbl;
1794#[repr(C)]
1795#[derive(Debug, Copy, Clone)]
1796pub struct bgfx_callback_interface_s {
1797 pub vtbl: *const bgfx_callback_vtbl_s,
1798}
1799pub type bgfx_callback_interface_t = bgfx_callback_interface_s;
1800#[repr(C)]
1801#[derive(Debug, Copy, Clone)]
1802pub struct bgfx_callback_vtbl_s {
1803 pub fatal: ::std::option::Option<
1804 unsafe extern "C" fn(
1805 _this: *mut bgfx_callback_interface_t,
1806 _filePath: *const ::std::os::raw::c_char,
1807 _line: u16,
1808 _code: bgfx_fatal_t,
1809 _str: *const ::std::os::raw::c_char,
1810 ),
1811 >,
1812 pub trace_vargs: ::std::option::Option<
1813 unsafe extern "C" fn(
1814 _this: *mut bgfx_callback_interface_t,
1815 _filePath: *const ::std::os::raw::c_char,
1816 _line: u16,
1817 _format: *const ::std::os::raw::c_char,
1818 _argList: *mut __va_list_tag,
1819 ),
1820 >,
1821 pub profiler_begin: ::std::option::Option<
1822 unsafe extern "C" fn(
1823 _this: *mut bgfx_callback_interface_t,
1824 _name: *const ::std::os::raw::c_char,
1825 _abgr: u32,
1826 _filePath: *const ::std::os::raw::c_char,
1827 _line: u16,
1828 ),
1829 >,
1830 pub profiler_begin_literal: ::std::option::Option<
1831 unsafe extern "C" fn(
1832 _this: *mut bgfx_callback_interface_t,
1833 _name: *const ::std::os::raw::c_char,
1834 _abgr: u32,
1835 _filePath: *const ::std::os::raw::c_char,
1836 _line: u16,
1837 ),
1838 >,
1839 pub profiler_end:
1840 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_callback_interface_t)>,
1841 pub cache_read_size: ::std::option::Option<
1842 unsafe extern "C" fn(_this: *mut bgfx_callback_interface_t, _id: u64) -> u32,
1843 >,
1844 pub cache_read: ::std::option::Option<
1845 unsafe extern "C" fn(
1846 _this: *mut bgfx_callback_interface_t,
1847 _id: u64,
1848 _data: *mut ::std::os::raw::c_void,
1849 _size: u32,
1850 ) -> bool,
1851 >,
1852 pub cache_write: ::std::option::Option<
1853 unsafe extern "C" fn(
1854 _this: *mut bgfx_callback_interface_t,
1855 _id: u64,
1856 _data: *const ::std::os::raw::c_void,
1857 _size: u32,
1858 ),
1859 >,
1860 pub screen_shot: ::std::option::Option<
1861 unsafe extern "C" fn(
1862 _this: *mut bgfx_callback_interface_t,
1863 _filePath: *const ::std::os::raw::c_char,
1864 _width: u32,
1865 _height: u32,
1866 _pitch: u32,
1867 _data: *const ::std::os::raw::c_void,
1868 _size: u32,
1869 _yflip: bool,
1870 ),
1871 >,
1872 pub capture_begin: ::std::option::Option<
1873 unsafe extern "C" fn(
1874 _this: *mut bgfx_callback_interface_t,
1875 _width: u32,
1876 _height: u32,
1877 _pitch: u32,
1878 _format: bgfx_texture_format_t,
1879 _yflip: bool,
1880 ),
1881 >,
1882 pub capture_end:
1883 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_callback_interface_t)>,
1884 pub capture_frame: ::std::option::Option<
1885 unsafe extern "C" fn(
1886 _this: *mut bgfx_callback_interface_t,
1887 _data: *const ::std::os::raw::c_void,
1888 _size: u32,
1889 ),
1890 >,
1891}
1892pub type bgfx_callback_vtbl_t = bgfx_callback_vtbl_s;
1893#[repr(C)]
1894#[derive(Debug, Copy, Clone)]
1895pub struct bgfx_dynamic_index_buffer_handle_s {
1896 pub idx: u16,
1897}
1898pub type bgfx_dynamic_index_buffer_handle_t = bgfx_dynamic_index_buffer_handle_s;
1899#[repr(C)]
1900#[derive(Debug, Copy, Clone)]
1901pub struct bgfx_dynamic_vertex_buffer_handle_s {
1902 pub idx: u16,
1903}
1904pub type bgfx_dynamic_vertex_buffer_handle_t = bgfx_dynamic_vertex_buffer_handle_s;
1905#[repr(C)]
1906#[derive(Debug, Copy, Clone)]
1907pub struct bgfx_frame_buffer_handle_s {
1908 pub idx: u16,
1909}
1910pub type bgfx_frame_buffer_handle_t = bgfx_frame_buffer_handle_s;
1911#[repr(C)]
1912#[derive(Debug, Copy, Clone)]
1913pub struct bgfx_index_buffer_handle_s {
1914 pub idx: u16,
1915}
1916pub type bgfx_index_buffer_handle_t = bgfx_index_buffer_handle_s;
1917#[repr(C)]
1918#[derive(Debug, Copy, Clone)]
1919pub struct bgfx_indirect_buffer_handle_s {
1920 pub idx: u16,
1921}
1922pub type bgfx_indirect_buffer_handle_t = bgfx_indirect_buffer_handle_s;
1923#[repr(C)]
1924#[derive(Debug, Copy, Clone)]
1925pub struct bgfx_occlusion_query_handle_s {
1926 pub idx: u16,
1927}
1928pub type bgfx_occlusion_query_handle_t = bgfx_occlusion_query_handle_s;
1929#[repr(C)]
1930#[derive(Debug, Copy, Clone)]
1931pub struct bgfx_program_handle_s {
1932 pub idx: u16,
1933}
1934pub type bgfx_program_handle_t = bgfx_program_handle_s;
1935#[repr(C)]
1936#[derive(Debug, Copy, Clone)]
1937pub struct bgfx_shader_handle_s {
1938 pub idx: u16,
1939}
1940pub type bgfx_shader_handle_t = bgfx_shader_handle_s;
1941#[repr(C)]
1942#[derive(Debug, Copy, Clone)]
1943pub struct bgfx_texture_handle_s {
1944 pub idx: u16,
1945}
1946pub type bgfx_texture_handle_t = bgfx_texture_handle_s;
1947#[repr(C)]
1948#[derive(Debug, Copy, Clone)]
1949pub struct bgfx_uniform_handle_s {
1950 pub idx: u16,
1951}
1952pub type bgfx_uniform_handle_t = bgfx_uniform_handle_s;
1953#[repr(C)]
1954#[derive(Debug, Copy, Clone)]
1955pub struct bgfx_vertex_buffer_handle_s {
1956 pub idx: u16,
1957}
1958pub type bgfx_vertex_buffer_handle_t = bgfx_vertex_buffer_handle_s;
1959#[repr(C)]
1960#[derive(Debug, Copy, Clone)]
1961pub struct bgfx_vertex_layout_handle_s {
1962 pub idx: u16,
1963}
1964pub type bgfx_vertex_layout_handle_t = bgfx_vertex_layout_handle_s;
1965#[doc = " Memory release callback.\n\n @param[in] _ptr Pointer to allocated data.\n @param[in] _userData User defined data if needed.\n"]
1966pub type bgfx_release_fn_t = ::std::option::Option<
1967 unsafe extern "C" fn(_ptr: *mut ::std::os::raw::c_void, _userData: *mut ::std::os::raw::c_void),
1968>;
1969#[doc = " GPU info.\n"]
1970#[repr(C)]
1971#[derive(Debug, Copy, Clone)]
1972pub struct bgfx_caps_gpu_s {
1973 pub vendorId: u16,
1974 #[doc = " Vendor PCI id. See `BGFX_PCI_ID_*`."]
1975 pub deviceId: u16,
1976}
1977#[doc = " GPU info.\n"]
1978pub type bgfx_caps_gpu_t = bgfx_caps_gpu_s;
1979#[doc = " Renderer runtime limits.\n"]
1980#[repr(C)]
1981#[derive(Debug, Copy, Clone)]
1982pub struct bgfx_caps_limits_s {
1983 pub maxDrawCalls: u32,
1984 #[doc = " Maximum number of draw calls."]
1985 pub maxBlits: u32,
1986 #[doc = " Maximum number of blit calls."]
1987 pub maxTextureSize: u32,
1988 #[doc = " Maximum texture size."]
1989 pub maxTextureLayers: u32,
1990 #[doc = " Maximum texture layers."]
1991 pub maxViews: u32,
1992 #[doc = " Maximum number of views."]
1993 pub maxFrameBuffers: u32,
1994 #[doc = " Maximum number of frame buffer handles."]
1995 pub maxFBAttachments: u32,
1996 #[doc = " Maximum number of frame buffer attachments."]
1997 pub maxPrograms: u32,
1998 #[doc = " Maximum number of program handles."]
1999 pub maxShaders: u32,
2000 #[doc = " Maximum number of shader handles."]
2001 pub maxTextures: u32,
2002 #[doc = " Maximum number of texture handles."]
2003 pub maxTextureSamplers: u32,
2004 #[doc = " Maximum number of texture samplers."]
2005 pub maxComputeBindings: u32,
2006 #[doc = " Maximum number of compute bindings."]
2007 pub maxVertexLayouts: u32,
2008 #[doc = " Maximum number of vertex format layouts."]
2009 pub maxVertexStreams: u32,
2010 #[doc = " Maximum number of vertex streams."]
2011 pub maxIndexBuffers: u32,
2012 #[doc = " Maximum number of index buffer handles."]
2013 pub maxVertexBuffers: u32,
2014 #[doc = " Maximum number of vertex buffer handles."]
2015 pub maxDynamicIndexBuffers: u32,
2016 #[doc = " Maximum number of dynamic index buffer handles."]
2017 pub maxDynamicVertexBuffers: u32,
2018 #[doc = " Maximum number of dynamic vertex buffer handles."]
2019 pub maxUniforms: u32,
2020 #[doc = " Maximum number of uniform handles."]
2021 pub maxOcclusionQueries: u32,
2022 #[doc = " Maximum number of occlusion query handles."]
2023 pub maxEncoders: u32,
2024 #[doc = " Maximum number of encoder threads."]
2025 pub minResourceCbSize: u32,
2026 #[doc = " Minimum resource command buffer size."]
2027 pub transientVbSize: u32,
2028 #[doc = " Maximum transient vertex buffer size."]
2029 pub transientIbSize: u32,
2030}
2031#[doc = " Renderer runtime limits.\n"]
2032pub type bgfx_caps_limits_t = bgfx_caps_limits_s;
2033#[doc = " Renderer capabilities.\n"]
2034#[repr(C)]
2035#[derive(Debug, Copy, Clone)]
2036pub struct bgfx_caps_s {
2037 pub rendererType: bgfx_renderer_type_t,
2038 #[doc = " Supported functionality.\n @attention See `BGFX_CAPS_*` flags at https://bkaradzic.github.io/bgfx/bgfx.html#available-caps"]
2039 pub supported: u64,
2040 pub vendorId: u16,
2041 #[doc = " Selected GPU vendor PCI id."]
2042 pub deviceId: u16,
2043 #[doc = " Selected GPU device id."]
2044 pub homogeneousDepth: bool,
2045 #[doc = " True when NDC depth is in [-1, 1] range, otherwise its [0, 1]."]
2046 pub originBottomLeft: bool,
2047 #[doc = " True when NDC origin is at bottom left."]
2048 pub numGPUs: u8,
2049 #[doc = " Number of enumerated GPUs."]
2050 pub gpu: [bgfx_caps_gpu_t; 4usize],
2051 #[doc = " Enumerated GPUs."]
2052 pub limits: bgfx_caps_limits_t,
2053 #[doc = " Supported texture format capabilities flags:\n - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - Texture format is not supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_2D` - Texture format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB` - Texture as sRGB format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - Texture format is emulated.\n - `BGFX_CAPS_FORMAT_TEXTURE_3D` - Texture format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB` - Texture as sRGB format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED` - Texture format is emulated.\n - `BGFX_CAPS_FORMAT_TEXTURE_CUBE` - Texture format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB` - Texture as sRGB format is supported.\n - `BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED` - Texture format is emulated.\n - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - Texture format can be used from vertex shader.\n - `BGFX_CAPS_FORMAT_TEXTURE_IMAGE_READ` - Texture format can be used as image\n and read from.\n - `BGFX_CAPS_FORMAT_TEXTURE_IMAGE_WRITE` - Texture format can be used as image\n and written to.\n - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER` - Texture format can be used as frame\n buffer.\n - `BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA` - Texture format can be used as MSAA\n frame buffer.\n - `BGFX_CAPS_FORMAT_TEXTURE_MSAA` - Texture can be sampled as MSAA.\n - `BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN` - Texture format supports auto-generated\n mips."]
2054 pub formats: [u16; 96usize],
2055}
2056#[doc = " Renderer capabilities.\n"]
2057pub type bgfx_caps_t = bgfx_caps_s;
2058#[doc = " Internal data.\n"]
2059#[repr(C)]
2060#[derive(Debug, Copy, Clone)]
2061pub struct bgfx_internal_data_s {
2062 pub caps: *const bgfx_caps_t,
2063 #[doc = " Renderer capabilities."]
2064 pub context: *mut ::std::os::raw::c_void,
2065}
2066#[doc = " Internal data.\n"]
2067pub type bgfx_internal_data_t = bgfx_internal_data_s;
2068#[doc = " Platform data.\n"]
2069#[repr(C)]
2070#[derive(Debug, Copy, Clone)]
2071pub struct bgfx_platform_data_s {
2072 pub ndt: *mut ::std::os::raw::c_void,
2073 #[doc = " Native window handle. If `NULL`, bgfx will create a headless\n context/device, provided the rendering API supports it."]
2074 pub nwh: *mut ::std::os::raw::c_void,
2075 #[doc = " GL context, D3D device, or Vulkan device. If `NULL`, bgfx\n will create context/device."]
2076 pub context: *mut ::std::os::raw::c_void,
2077 #[doc = " GL back-buffer, or D3D render target view. If `NULL` bgfx will\n create back-buffer color surface."]
2078 pub backBuffer: *mut ::std::os::raw::c_void,
2079 #[doc = " Backbuffer depth/stencil. If `NULL`, bgfx will create a back-buffer\n depth/stencil surface."]
2080 pub backBufferDS: *mut ::std::os::raw::c_void,
2081 #[doc = " Handle type. Needed for platforms having more than one option."]
2082 pub type_: bgfx_native_window_handle_type_t,
2083}
2084#[doc = " Platform data.\n"]
2085pub type bgfx_platform_data_t = bgfx_platform_data_s;
2086#[doc = " Backbuffer resolution and reset parameters.\n"]
2087#[repr(C)]
2088#[derive(Debug, Copy, Clone)]
2089pub struct bgfx_resolution_s {
2090 pub format: bgfx_texture_format_t,
2091 #[doc = " Backbuffer format."]
2092 pub width: u32,
2093 #[doc = " Backbuffer width."]
2094 pub height: u32,
2095 #[doc = " Backbuffer height."]
2096 pub reset: u32,
2097 #[doc = " Reset parameters."]
2098 pub numBackBuffers: u8,
2099 #[doc = " Number of back buffers."]
2100 pub maxFrameLatency: u8,
2101 #[doc = " Maximum frame latency."]
2102 pub debugTextScale: u8,
2103}
2104#[doc = " Backbuffer resolution and reset parameters.\n"]
2105pub type bgfx_resolution_t = bgfx_resolution_s;
2106#[doc = " Configurable runtime limits parameters.\n"]
2107#[repr(C)]
2108#[derive(Debug, Copy, Clone)]
2109pub struct bgfx_init_limits_s {
2110 pub maxEncoders: u16,
2111 #[doc = " Maximum number of encoder threads."]
2112 pub minResourceCbSize: u32,
2113 #[doc = " Minimum resource command buffer size."]
2114 pub transientVbSize: u32,
2115 #[doc = " Maximum transient vertex buffer size."]
2116 pub transientIbSize: u32,
2117}
2118#[doc = " Configurable runtime limits parameters.\n"]
2119pub type bgfx_init_limits_t = bgfx_init_limits_s;
2120#[doc = " Initialization parameters used by `bgfx::init`.\n"]
2121#[repr(C)]
2122#[derive(Debug, Copy, Clone)]
2123pub struct bgfx_init_s {
2124 #[doc = " Select rendering backend. When set to RendererType::Count\n a default rendering backend will be selected appropriate to the platform.\n See: `bgfx::RendererType`"]
2125 pub type_: bgfx_renderer_type_t,
2126 #[doc = " Vendor PCI ID. If set to `BGFX_PCI_ID_NONE`, discrete and integrated\n GPUs will be prioritised.\n - `BGFX_PCI_ID_NONE` - Autoselect adapter.\n - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.\n - `BGFX_PCI_ID_AMD` - AMD adapter.\n - `BGFX_PCI_ID_APPLE` - Apple adapter.\n - `BGFX_PCI_ID_INTEL` - Intel adapter.\n - `BGFX_PCI_ID_NVIDIA` - NVIDIA adapter.\n - `BGFX_PCI_ID_MICROSOFT` - Microsoft adapter."]
2127 pub vendorId: u16,
2128 #[doc = " Device ID. If set to 0 it will select first device, or device with\n matching ID."]
2129 pub deviceId: u16,
2130 pub capabilities: u64,
2131 #[doc = " Capabilities initialization mask (default: UINT64_MAX)."]
2132 pub debug: bool,
2133 #[doc = " Enable device for debugging."]
2134 pub profile: bool,
2135 #[doc = " Enable device for profiling."]
2136 pub platformData: bgfx_platform_data_t,
2137 #[doc = " Platform data."]
2138 pub resolution: bgfx_resolution_t,
2139 #[doc = " Backbuffer resolution and reset parameters. See: `bgfx::Resolution`."]
2140 pub limits: bgfx_init_limits_t,
2141 #[doc = " Provide application specific callback interface.\n See: `bgfx::CallbackI`"]
2142 pub callback: *mut bgfx_callback_interface_t,
2143 #[doc = " Custom allocator. When a custom allocator is not\n specified, bgfx uses the CRT allocator. Bgfx assumes\n custom allocator is thread safe."]
2144 pub allocator: *mut bgfx_allocator_interface_t,
2145}
2146#[doc = " Initialization parameters used by `bgfx::init`.\n"]
2147pub type bgfx_init_t = bgfx_init_s;
2148#[doc = " Memory must be obtained by calling `bgfx::alloc`, `bgfx::copy`, or `bgfx::makeRef`.\n @attention It is illegal to create this structure on stack and pass it to any bgfx API.\n"]
2149#[repr(C)]
2150#[derive(Debug, Copy, Clone)]
2151pub struct bgfx_memory_s {
2152 pub data: *mut u8,
2153 #[doc = " Pointer to data."]
2154 pub size: u32,
2155}
2156#[doc = " Memory must be obtained by calling `bgfx::alloc`, `bgfx::copy`, or `bgfx::makeRef`.\n @attention It is illegal to create this structure on stack and pass it to any bgfx API.\n"]
2157pub type bgfx_memory_t = bgfx_memory_s;
2158#[doc = " Transient index buffer.\n"]
2159#[repr(C)]
2160#[derive(Debug, Copy, Clone)]
2161pub struct bgfx_transient_index_buffer_s {
2162 pub data: *mut u8,
2163 #[doc = " Pointer to data."]
2164 pub size: u32,
2165 #[doc = " Data size."]
2166 pub startIndex: u32,
2167 #[doc = " First index."]
2168 pub handle: bgfx_index_buffer_handle_t,
2169 #[doc = " Index buffer handle."]
2170 pub isIndex16: bool,
2171}
2172#[doc = " Transient index buffer.\n"]
2173pub type bgfx_transient_index_buffer_t = bgfx_transient_index_buffer_s;
2174#[doc = " Transient vertex buffer.\n"]
2175#[repr(C)]
2176#[derive(Debug, Copy, Clone)]
2177pub struct bgfx_transient_vertex_buffer_s {
2178 pub data: *mut u8,
2179 #[doc = " Pointer to data."]
2180 pub size: u32,
2181 #[doc = " Data size."]
2182 pub startVertex: u32,
2183 #[doc = " First vertex."]
2184 pub stride: u16,
2185 #[doc = " Vertex stride."]
2186 pub handle: bgfx_vertex_buffer_handle_t,
2187 #[doc = " Vertex buffer handle."]
2188 pub layoutHandle: bgfx_vertex_layout_handle_t,
2189}
2190#[doc = " Transient vertex buffer.\n"]
2191pub type bgfx_transient_vertex_buffer_t = bgfx_transient_vertex_buffer_s;
2192#[doc = " Instance data buffer info.\n"]
2193#[repr(C)]
2194#[derive(Debug, Copy, Clone)]
2195pub struct bgfx_instance_data_buffer_s {
2196 pub data: *mut u8,
2197 #[doc = " Pointer to data."]
2198 pub size: u32,
2199 #[doc = " Data size."]
2200 pub offset: u32,
2201 #[doc = " Offset in vertex buffer."]
2202 pub num: u32,
2203 #[doc = " Number of instances."]
2204 pub stride: u16,
2205 #[doc = " Vertex buffer stride."]
2206 pub handle: bgfx_vertex_buffer_handle_t,
2207}
2208#[doc = " Instance data buffer info.\n"]
2209pub type bgfx_instance_data_buffer_t = bgfx_instance_data_buffer_s;
2210#[doc = " Texture info.\n"]
2211#[repr(C)]
2212#[derive(Debug, Copy, Clone)]
2213pub struct bgfx_texture_info_s {
2214 pub format: bgfx_texture_format_t,
2215 #[doc = " Texture format."]
2216 pub storageSize: u32,
2217 #[doc = " Total amount of bytes required to store texture."]
2218 pub width: u16,
2219 #[doc = " Texture width."]
2220 pub height: u16,
2221 #[doc = " Texture height."]
2222 pub depth: u16,
2223 #[doc = " Texture depth."]
2224 pub numLayers: u16,
2225 #[doc = " Number of layers in texture array."]
2226 pub numMips: u8,
2227 #[doc = " Number of MIP maps."]
2228 pub bitsPerPixel: u8,
2229 #[doc = " Format bits per pixel."]
2230 pub cubeMap: bool,
2231}
2232#[doc = " Texture info.\n"]
2233pub type bgfx_texture_info_t = bgfx_texture_info_s;
2234#[doc = " Uniform info.\n"]
2235#[repr(C)]
2236#[derive(Debug, Copy, Clone)]
2237pub struct bgfx_uniform_info_s {
2238 pub name: [::std::os::raw::c_char; 256usize],
2239 #[doc = " Uniform name."]
2240 pub type_: bgfx_uniform_type_t,
2241 #[doc = " Uniform type."]
2242 pub num: u16,
2243}
2244#[doc = " Uniform info.\n"]
2245pub type bgfx_uniform_info_t = bgfx_uniform_info_s;
2246#[doc = " Frame buffer texture attachment info.\n"]
2247#[repr(C)]
2248#[derive(Debug, Copy, Clone)]
2249pub struct bgfx_attachment_s {
2250 pub access: bgfx_access_t,
2251 #[doc = " Attachment access. See `Access::Enum`."]
2252 pub handle: bgfx_texture_handle_t,
2253 #[doc = " Render target texture handle."]
2254 pub mip: u16,
2255 #[doc = " Mip level."]
2256 pub layer: u16,
2257 #[doc = " Cubemap side or depth layer/slice to use."]
2258 pub numLayers: u16,
2259 #[doc = " Number of texture layer/slice(s) in array to use."]
2260 pub resolve: u8,
2261}
2262#[doc = " Frame buffer texture attachment info.\n"]
2263pub type bgfx_attachment_t = bgfx_attachment_s;
2264#[doc = " Transform data.\n"]
2265#[repr(C)]
2266#[derive(Debug, Copy, Clone)]
2267pub struct bgfx_transform_s {
2268 pub data: *mut f32,
2269 #[doc = " Pointer to first 4x4 matrix."]
2270 pub num: u16,
2271}
2272#[doc = " Transform data.\n"]
2273pub type bgfx_transform_t = bgfx_transform_s;
2274#[doc = " View stats.\n"]
2275#[repr(C)]
2276#[derive(Debug, Copy, Clone)]
2277pub struct bgfx_view_stats_s {
2278 pub name: [::std::os::raw::c_char; 256usize],
2279 #[doc = " View name."]
2280 pub view: bgfx_view_id_t,
2281 #[doc = " View id."]
2282 pub cpuTimeBegin: i64,
2283 #[doc = " CPU (submit) begin time."]
2284 pub cpuTimeEnd: i64,
2285 #[doc = " CPU (submit) end time."]
2286 pub gpuTimeBegin: i64,
2287 #[doc = " GPU begin time."]
2288 pub gpuTimeEnd: i64,
2289 #[doc = " GPU end time."]
2290 pub gpuFrameNum: u32,
2291}
2292#[doc = " View stats.\n"]
2293pub type bgfx_view_stats_t = bgfx_view_stats_s;
2294#[doc = " Encoder stats.\n"]
2295#[repr(C)]
2296#[derive(Debug, Copy, Clone)]
2297pub struct bgfx_encoder_stats_s {
2298 pub cpuTimeBegin: i64,
2299 #[doc = " Encoder thread CPU submit begin time."]
2300 pub cpuTimeEnd: i64,
2301}
2302#[doc = " Encoder stats.\n"]
2303pub type bgfx_encoder_stats_t = bgfx_encoder_stats_s;
2304#[doc = " Renderer statistics data.\n @remarks All time values are high-resolution timestamps, while\n time frequencies define timestamps-per-second for that hardware.\n"]
2305#[repr(C)]
2306#[derive(Debug, Copy, Clone)]
2307pub struct bgfx_stats_s {
2308 pub cpuTimeFrame: i64,
2309 #[doc = " CPU time between two `bgfx::frame` calls."]
2310 pub cpuTimeBegin: i64,
2311 #[doc = " Render thread CPU submit begin time."]
2312 pub cpuTimeEnd: i64,
2313 #[doc = " Render thread CPU submit end time."]
2314 pub cpuTimerFreq: i64,
2315 #[doc = " CPU timer frequency. Timestamps-per-second"]
2316 pub gpuTimeBegin: i64,
2317 #[doc = " GPU frame begin time."]
2318 pub gpuTimeEnd: i64,
2319 #[doc = " GPU frame end time."]
2320 pub gpuTimerFreq: i64,
2321 #[doc = " GPU timer frequency."]
2322 pub waitRender: i64,
2323 #[doc = " Time spent waiting for render backend thread to finish issuing draw commands to underlying graphics API."]
2324 pub waitSubmit: i64,
2325 #[doc = " Time spent waiting for submit thread to advance to next frame."]
2326 pub numDraw: u32,
2327 #[doc = " Number of draw calls submitted."]
2328 pub numCompute: u32,
2329 #[doc = " Number of compute calls submitted."]
2330 pub numBlit: u32,
2331 #[doc = " Number of blit calls submitted."]
2332 pub maxGpuLatency: u32,
2333 #[doc = " GPU driver latency."]
2334 pub gpuFrameNum: u32,
2335 #[doc = " Frame which generated gpuTimeBegin, gpuTimeEnd."]
2336 pub numDynamicIndexBuffers: u16,
2337 #[doc = " Number of used dynamic index buffers."]
2338 pub numDynamicVertexBuffers: u16,
2339 #[doc = " Number of used dynamic vertex buffers."]
2340 pub numFrameBuffers: u16,
2341 #[doc = " Number of used frame buffers."]
2342 pub numIndexBuffers: u16,
2343 #[doc = " Number of used index buffers."]
2344 pub numOcclusionQueries: u16,
2345 #[doc = " Number of used occlusion queries."]
2346 pub numPrograms: u16,
2347 #[doc = " Number of used programs."]
2348 pub numShaders: u16,
2349 #[doc = " Number of used shaders."]
2350 pub numTextures: u16,
2351 #[doc = " Number of used textures."]
2352 pub numUniforms: u16,
2353 #[doc = " Number of used uniforms."]
2354 pub numVertexBuffers: u16,
2355 #[doc = " Number of used vertex buffers."]
2356 pub numVertexLayouts: u16,
2357 #[doc = " Number of used vertex layouts."]
2358 pub textureMemoryUsed: i64,
2359 #[doc = " Estimate of texture memory used."]
2360 pub rtMemoryUsed: i64,
2361 #[doc = " Estimate of render target memory used."]
2362 pub transientVbUsed: i32,
2363 #[doc = " Amount of transient vertex buffer used."]
2364 pub transientIbUsed: i32,
2365 #[doc = " Amount of transient index buffer used."]
2366 pub numPrims: [u32; 5usize],
2367 #[doc = " Number of primitives rendered."]
2368 pub gpuMemoryMax: i64,
2369 #[doc = " Maximum available GPU memory for application."]
2370 pub gpuMemoryUsed: i64,
2371 #[doc = " Amount of GPU memory used by the application."]
2372 pub width: u16,
2373 #[doc = " Backbuffer width in pixels."]
2374 pub height: u16,
2375 #[doc = " Backbuffer height in pixels."]
2376 pub textWidth: u16,
2377 #[doc = " Debug text width in characters."]
2378 pub textHeight: u16,
2379 #[doc = " Debug text height in characters."]
2380 pub numViews: u16,
2381 #[doc = " Number of view stats."]
2382 pub viewStats: *mut bgfx_view_stats_t,
2383 #[doc = " Array of View stats."]
2384 pub numEncoders: u8,
2385 #[doc = " Number of encoders used during frame."]
2386 pub encoderStats: *mut bgfx_encoder_stats_t,
2387}
2388#[doc = " Renderer statistics data.\n @remarks All time values are high-resolution timestamps, while\n time frequencies define timestamps-per-second for that hardware.\n"]
2389pub type bgfx_stats_t = bgfx_stats_s;
2390#[doc = " Vertex layout.\n"]
2391#[repr(C)]
2392#[derive(Debug, Copy, Clone)]
2393pub struct bgfx_vertex_layout_s {
2394 pub hash: u32,
2395 #[doc = " Hash."]
2396 pub stride: u16,
2397 #[doc = " Stride."]
2398 pub offset: [u16; 18usize],
2399 #[doc = " Attribute offsets."]
2400 pub attributes: [u16; 18usize],
2401}
2402#[doc = " Vertex layout.\n"]
2403pub type bgfx_vertex_layout_t = bgfx_vertex_layout_s;
2404#[doc = " Encoders are used for submitting draw calls from multiple threads. Only one encoder\n per thread should be used. Use `bgfx::begin()` to obtain an encoder for a thread.\n"]
2405#[repr(C)]
2406#[derive(Debug, Copy, Clone)]
2407pub struct bgfx_encoder_s {
2408 _unused: [u8; 0],
2409}
2410pub type bgfx_encoder_t = bgfx_encoder_s;
2411extern "C" {
2412 #[doc = " Init attachment.\n\n @param[in] _handle Render target texture handle.\n @param[in] _access Access. See `Access::Enum`.\n @param[in] _layer Cubemap side or depth layer/slice to use.\n @param[in] _numLayers Number of texture layer/slice(s) in array to use.\n @param[in] _mip Mip level.\n @param[in] _resolve Resolve flags. See: `BGFX_RESOLVE_*`\n"]
2413 pub fn bgfx_attachment_init(
2414 _this: *mut bgfx_attachment_t,
2415 _handle: bgfx_texture_handle_t,
2416 _access: bgfx_access_t,
2417 _layer: u16,
2418 _numLayers: u16,
2419 _mip: u16,
2420 _resolve: u8,
2421 );
2422}
2423extern "C" {
2424 #[doc = " Start VertexLayout.\n\n @param[in] _rendererType Renderer backend type. See: `bgfx::RendererType`\n\n @returns Returns itself.\n"]
2425 pub fn bgfx_vertex_layout_begin(
2426 _this: *mut bgfx_vertex_layout_t,
2427 _rendererType: bgfx_renderer_type_t,
2428 ) -> *mut bgfx_vertex_layout_t;
2429}
2430extern "C" {
2431 #[doc = " Add attribute to VertexLayout.\n @remarks Must be called between begin/end.\n\n @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`\n @param[in] _num Number of elements 1, 2, 3 or 4.\n @param[in] _type Element type.\n @param[in] _normalized When using fixed point AttribType (f.e. Uint8)\n value will be normalized for vertex shader usage. When normalized\n is set to true, AttribType::Uint8 value in range 0-255 will be\n in range 0.0-1.0 in vertex shader.\n @param[in] _asInt Packaging rule for vertexPack, vertexUnpack, and\n vertexConvert for AttribType::Uint8 and AttribType::Int16.\n Unpacking code must be implemented inside vertex shader.\n\n @returns Returns itself.\n"]
2432 pub fn bgfx_vertex_layout_add(
2433 _this: *mut bgfx_vertex_layout_t,
2434 _attrib: bgfx_attrib_t,
2435 _num: u8,
2436 _type: bgfx_attrib_type_t,
2437 _normalized: bool,
2438 _asInt: bool,
2439 ) -> *mut bgfx_vertex_layout_t;
2440}
2441extern "C" {
2442 #[doc = " Decode attribute.\n\n @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`\n @param[out] _num Number of elements.\n @param[out] _type Element type.\n @param[out] _normalized Attribute is normalized.\n @param[out] _asInt Attribute is packed as int.\n"]
2443 pub fn bgfx_vertex_layout_decode(
2444 _this: *const bgfx_vertex_layout_t,
2445 _attrib: bgfx_attrib_t,
2446 _num: *mut u8,
2447 _type: *mut bgfx_attrib_type_t,
2448 _normalized: *mut bool,
2449 _asInt: *mut bool,
2450 );
2451}
2452extern "C" {
2453 #[doc = " Returns `true` if VertexLayout contains attribute.\n\n @param[in] _attrib Attribute semantics. See: `bgfx::Attrib`\n\n @returns True if VertexLayout contains attribute.\n"]
2454 pub fn bgfx_vertex_layout_has(
2455 _this: *const bgfx_vertex_layout_t,
2456 _attrib: bgfx_attrib_t,
2457 ) -> bool;
2458}
2459extern "C" {
2460 #[doc = " Skip `_num` bytes in vertex stream.\n\n @param[in] _num Number of bytes to skip.\n\n @returns Returns itself.\n"]
2461 pub fn bgfx_vertex_layout_skip(
2462 _this: *mut bgfx_vertex_layout_t,
2463 _num: u8,
2464 ) -> *mut bgfx_vertex_layout_t;
2465}
2466extern "C" {
2467 #[doc = " End VertexLayout.\n"]
2468 pub fn bgfx_vertex_layout_end(_this: *mut bgfx_vertex_layout_t);
2469}
2470extern "C" {
2471 #[doc = " Pack vertex attribute into vertex stream format.\n\n @param[in] _input Value to be packed into vertex stream.\n @param[in] _inputNormalized `true` if input value is already normalized.\n @param[in] _attr Attribute to pack.\n @param[in] _layout Vertex stream layout.\n @param[in] _data Destination vertex stream where data will be packed.\n @param[in] _index Vertex index that will be modified.\n"]
2472 pub fn bgfx_vertex_pack(
2473 _input: *const f32,
2474 _inputNormalized: bool,
2475 _attr: bgfx_attrib_t,
2476 _layout: *const bgfx_vertex_layout_t,
2477 _data: *mut ::std::os::raw::c_void,
2478 _index: u32,
2479 );
2480}
2481extern "C" {
2482 #[doc = " Unpack vertex attribute from vertex stream format.\n\n @param[out] _output Result of unpacking.\n @param[in] _attr Attribute to unpack.\n @param[in] _layout Vertex stream layout.\n @param[in] _data Source vertex stream from where data will be unpacked.\n @param[in] _index Vertex index that will be unpacked.\n"]
2483 pub fn bgfx_vertex_unpack(
2484 _output: *mut f32,
2485 _attr: bgfx_attrib_t,
2486 _layout: *const bgfx_vertex_layout_t,
2487 _data: *const ::std::os::raw::c_void,
2488 _index: u32,
2489 );
2490}
2491extern "C" {
2492 #[doc = " Converts vertex stream data from one vertex stream format to another.\n\n @param[in] _dstLayout Destination vertex stream layout.\n @param[in] _dstData Destination vertex stream.\n @param[in] _srcLayout Source vertex stream layout.\n @param[in] _srcData Source vertex stream data.\n @param[in] _num Number of vertices to convert from source to destination.\n"]
2493 pub fn bgfx_vertex_convert(
2494 _dstLayout: *const bgfx_vertex_layout_t,
2495 _dstData: *mut ::std::os::raw::c_void,
2496 _srcLayout: *const bgfx_vertex_layout_t,
2497 _srcData: *const ::std::os::raw::c_void,
2498 _num: u32,
2499 );
2500}
2501extern "C" {
2502 #[doc = " Weld vertices.\n\n @param[in] _output Welded vertices remapping table. The size of buffer\n must be the same as number of vertices.\n @param[in] _layout Vertex stream layout.\n @param[in] _data Vertex stream.\n @param[in] _num Number of vertices in vertex stream.\n @param[in] _index32 Set to `true` if input indices are 32-bit.\n @param[in] _epsilon Error tolerance for vertex position comparison.\n\n @returns Number of unique vertices after vertex welding.\n"]
2503 pub fn bgfx_weld_vertices(
2504 _output: *mut ::std::os::raw::c_void,
2505 _layout: *const bgfx_vertex_layout_t,
2506 _data: *const ::std::os::raw::c_void,
2507 _num: u32,
2508 _index32: bool,
2509 _epsilon: f32,
2510 ) -> u32;
2511}
2512extern "C" {
2513 #[doc = " Convert index buffer for use with different primitive topologies.\n\n @param[in] _conversion Conversion type, see `TopologyConvert::Enum`.\n @param[out] _dst Destination index buffer. If this argument is NULL\n function will return number of indices after conversion.\n @param[in] _dstSize Destination index buffer in bytes. It must be\n large enough to contain output indices. If destination size is\n insufficient index buffer will be truncated.\n @param[in] _indices Source indices.\n @param[in] _numIndices Number of input indices.\n @param[in] _index32 Set to `true` if input indices are 32-bit.\n\n @returns Number of output indices after conversion.\n"]
2514 pub fn bgfx_topology_convert(
2515 _conversion: bgfx_topology_convert_t,
2516 _dst: *mut ::std::os::raw::c_void,
2517 _dstSize: u32,
2518 _indices: *const ::std::os::raw::c_void,
2519 _numIndices: u32,
2520 _index32: bool,
2521 ) -> u32;
2522}
2523extern "C" {
2524 #[doc = " Sort indices.\n\n @param[in] _sort Sort order, see `TopologySort::Enum`.\n @param[out] _dst Destination index buffer.\n @param[in] _dstSize Destination index buffer in bytes. It must be\n large enough to contain output indices. If destination size is\n insufficient index buffer will be truncated.\n @param[in] _dir Direction (vector must be normalized).\n @param[in] _pos Position.\n @param[in] _vertices Pointer to first vertex represented as\n float x, y, z. Must contain at least number of vertices\n referencende by index buffer.\n @param[in] _stride Vertex stride.\n @param[in] _indices Source indices.\n @param[in] _numIndices Number of input indices.\n @param[in] _index32 Set to `true` if input indices are 32-bit.\n"]
2525 pub fn bgfx_topology_sort_tri_list(
2526 _sort: bgfx_topology_sort_t,
2527 _dst: *mut ::std::os::raw::c_void,
2528 _dstSize: u32,
2529 _dir: *const f32,
2530 _pos: *const f32,
2531 _vertices: *const ::std::os::raw::c_void,
2532 _stride: u32,
2533 _indices: *const ::std::os::raw::c_void,
2534 _numIndices: u32,
2535 _index32: bool,
2536 );
2537}
2538extern "C" {
2539 #[doc = " Returns supported backend API renderers.\n\n @param[in] _max Maximum number of elements in _enum array.\n @param[inout] _enum Array where supported renderers will be written.\n\n @returns Number of supported renderers.\n"]
2540 pub fn bgfx_get_supported_renderers(_max: u8, _enum: *mut bgfx_renderer_type_t) -> u8;
2541}
2542extern "C" {
2543 #[doc = " Returns name of renderer.\n\n @param[in] _type Renderer backend type. See: `bgfx::RendererType`\n\n @returns Name of renderer.\n"]
2544 pub fn bgfx_get_renderer_name(_type: bgfx_renderer_type_t) -> *const ::std::os::raw::c_char;
2545}
2546extern "C" {
2547 pub fn bgfx_init_ctor(_init: *mut bgfx_init_t);
2548}
2549extern "C" {
2550 #[doc = " Initialize the bgfx library.\n\n @param[in] _init Initialization parameters. See: `bgfx::Init` for more info.\n\n @returns `true` if initialization was successful.\n"]
2551 pub fn bgfx_init(_init: *const bgfx_init_t) -> bool;
2552}
2553extern "C" {
2554 #[doc = " Shutdown bgfx library.\n"]
2555 pub fn bgfx_shutdown();
2556}
2557extern "C" {
2558 #[doc = " Reset graphic settings and back-buffer size.\n @attention This call doesn’t change the window size, it just resizes\n the back-buffer. Your windowing code controls the window size.\n\n @param[in] _width Back-buffer width.\n @param[in] _height Back-buffer height.\n @param[in] _flags See: `BGFX_RESET_*` for more info.\n - `BGFX_RESET_NONE` - No reset flags.\n - `BGFX_RESET_FULLSCREEN` - Not supported yet.\n - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.\n - `BGFX_RESET_VSYNC` - Enable V-Sync.\n - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.\n - `BGFX_RESET_CAPTURE` - Begin screen capture.\n - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.\n - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag specifies where flip\n occurs. Default behaviour is that flip occurs before rendering new\n frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.\n - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB back-buffer.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n"]
2559 pub fn bgfx_reset(_width: u32, _height: u32, _flags: u32, _format: bgfx_texture_format_t);
2560}
2561extern "C" {
2562 #[doc = " Advance to next frame. When using multithreaded renderer, this call\n just swaps internal buffers, kicks render thread, and returns. In\n singlethreaded renderer this call does frame rendering.\n\n @param[in] _capture Capture frame with graphics debugger.\n\n @returns Current frame number. This might be used in conjunction with\n double/multi buffering data outside the library and passing it to\n library via `bgfx::makeRef` calls.\n"]
2563 pub fn bgfx_frame(_capture: bool) -> u32;
2564}
2565extern "C" {
2566 #[doc = " Returns current renderer backend API type.\n @remarks\n Library must be initialized.\n"]
2567 pub fn bgfx_get_renderer_type() -> bgfx_renderer_type_t;
2568}
2569extern "C" {
2570 #[doc = " Returns renderer capabilities.\n @remarks\n Library must be initialized.\n"]
2571 pub fn bgfx_get_caps() -> *const bgfx_caps_t;
2572}
2573extern "C" {
2574 #[doc = " Returns performance counters.\n @attention Pointer returned is valid until `bgfx::frame` is called.\n"]
2575 pub fn bgfx_get_stats() -> *const bgfx_stats_t;
2576}
2577extern "C" {
2578 #[doc = " Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.\n\n @param[in] _size Size to allocate.\n\n @returns Allocated memory.\n"]
2579 pub fn bgfx_alloc(_size: u32) -> *const bgfx_memory_t;
2580}
2581extern "C" {
2582 #[doc = " Allocate buffer and copy data into it. Data will be freed inside bgfx.\n\n @param[in] _data Pointer to data to be copied.\n @param[in] _size Size of data to be copied.\n\n @returns Allocated memory.\n"]
2583 pub fn bgfx_copy(_data: *const ::std::os::raw::c_void, _size: u32) -> *const bgfx_memory_t;
2584}
2585extern "C" {
2586 #[doc = " Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call\n doesn't allocate memory for data. It just copies the _data pointer. You\n can pass `ReleaseFn` function pointer to release this memory after it's\n consumed, otherwise you must make sure _data is available for at least 2\n `bgfx::frame` calls. `ReleaseFn` function must be able to be called\n from any thread.\n @attention Data passed must be available for at least 2 `bgfx::frame` calls.\n\n @param[in] _data Pointer to data.\n @param[in] _size Size of data.\n\n @returns Referenced memory.\n"]
2587 pub fn bgfx_make_ref(_data: *const ::std::os::raw::c_void, _size: u32) -> *const bgfx_memory_t;
2588}
2589extern "C" {
2590 #[doc = " Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call\n doesn't allocate memory for data. It just copies the _data pointer. You\n can pass `ReleaseFn` function pointer to release this memory after it's\n consumed, otherwise you must make sure _data is available for at least 2\n `bgfx::frame` calls. `ReleaseFn` function must be able to be called\n from any thread.\n @attention Data passed must be available for at least 2 `bgfx::frame` calls.\n\n @param[in] _data Pointer to data.\n @param[in] _size Size of data.\n @param[in] _releaseFn Callback function to release memory after use.\n @param[in] _userData User data to be passed to callback function.\n\n @returns Referenced memory.\n"]
2591 pub fn bgfx_make_ref_release(
2592 _data: *const ::std::os::raw::c_void,
2593 _size: u32,
2594 _releaseFn: bgfx_release_fn_t,
2595 _userData: *mut ::std::os::raw::c_void,
2596 ) -> *const bgfx_memory_t;
2597}
2598extern "C" {
2599 #[doc = " Set debug flags.\n\n @param[in] _debug Available flags:\n - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set\n all rendering calls will be skipped. This is useful when profiling\n to quickly assess potential bottlenecks between CPU and GPU.\n - `BGFX_DEBUG_PROFILER` - Enable profiler.\n - `BGFX_DEBUG_STATS` - Display internal statistics.\n - `BGFX_DEBUG_TEXT` - Display debug text.\n - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering\n primitives will be rendered as lines.\n"]
2600 pub fn bgfx_set_debug(_debug: u32);
2601}
2602extern "C" {
2603 #[doc = " Clear internal debug text buffer.\n\n @param[in] _attr Background color.\n @param[in] _small Default 8x16 or 8x8 font.\n"]
2604 pub fn bgfx_dbg_text_clear(_attr: u8, _small: bool);
2605}
2606extern "C" {
2607 #[doc = " Print formatted data to internal debug text character-buffer (VGA-compatible text mode).\n\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _attr Color palette. Where top 4-bits represent index of background, and bottom\n 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).\n @param[in] _format `printf` style format.\n @param[in]\n"]
2608 pub fn bgfx_dbg_text_printf(
2609 _x: u16,
2610 _y: u16,
2611 _attr: u8,
2612 _format: *const ::std::os::raw::c_char,
2613 ...
2614 );
2615}
2616extern "C" {
2617 #[doc = " Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).\n\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _attr Color palette. Where top 4-bits represent index of background, and bottom\n 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).\n @param[in] _format `printf` style format.\n @param[in] _argList Variable arguments list for format string.\n"]
2618 pub fn bgfx_dbg_text_vprintf(
2619 _x: u16,
2620 _y: u16,
2621 _attr: u8,
2622 _format: *const ::std::os::raw::c_char,
2623 _argList: *mut __va_list_tag,
2624 );
2625}
2626extern "C" {
2627 #[doc = " Draw image into internal debug text buffer.\n\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _width Image width.\n @param[in] _height Image height.\n @param[in] _data Raw image data (character/attribute raw encoding).\n @param[in] _pitch Image pitch in bytes.\n"]
2628 pub fn bgfx_dbg_text_image(
2629 _x: u16,
2630 _y: u16,
2631 _width: u16,
2632 _height: u16,
2633 _data: *const ::std::os::raw::c_void,
2634 _pitch: u16,
2635 );
2636}
2637extern "C" {
2638 #[doc = " Create static index buffer.\n\n @param[in] _mem Index buffer data.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic\n buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on\n index buffers.\n"]
2639 pub fn bgfx_create_index_buffer(
2640 _mem: *const bgfx_memory_t,
2641 _flags: u16,
2642 ) -> bgfx_index_buffer_handle_t;
2643}
2644extern "C" {
2645 #[doc = " Set static index buffer debug name.\n\n @param[in] _handle Static index buffer handle.\n @param[in] _name Static index buffer name.\n @param[in] _len Static index buffer name length (if length is INT32_MAX, it's expected\n that _name is zero terminated string.\n"]
2646 pub fn bgfx_set_index_buffer_name(
2647 _handle: bgfx_index_buffer_handle_t,
2648 _name: *const ::std::os::raw::c_char,
2649 _len: i32,
2650 );
2651}
2652extern "C" {
2653 #[doc = " Destroy static index buffer.\n\n @param[in] _handle Static index buffer handle.\n"]
2654 pub fn bgfx_destroy_index_buffer(_handle: bgfx_index_buffer_handle_t);
2655}
2656extern "C" {
2657 #[doc = " Create vertex layout.\n\n @param[in] _layout Vertex layout.\n"]
2658 pub fn bgfx_create_vertex_layout(
2659 _layout: *const bgfx_vertex_layout_t,
2660 ) -> bgfx_vertex_layout_handle_t;
2661}
2662extern "C" {
2663 #[doc = " Destroy vertex layout.\n\n @param[in] _layoutHandle Vertex layout handle.\n"]
2664 pub fn bgfx_destroy_vertex_layout(_layoutHandle: bgfx_vertex_layout_handle_t);
2665}
2666extern "C" {
2667 #[doc = " Create static vertex buffer.\n\n @param[in] _mem Vertex buffer data.\n @param[in] _layout Vertex layout.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.\n\n @returns Static vertex buffer handle.\n"]
2668 pub fn bgfx_create_vertex_buffer(
2669 _mem: *const bgfx_memory_t,
2670 _layout: *const bgfx_vertex_layout_t,
2671 _flags: u16,
2672 ) -> bgfx_vertex_buffer_handle_t;
2673}
2674extern "C" {
2675 #[doc = " Set static vertex buffer debug name.\n\n @param[in] _handle Static vertex buffer handle.\n @param[in] _name Static vertex buffer name.\n @param[in] _len Static vertex buffer name length (if length is INT32_MAX, it's expected\n that _name is zero terminated string.\n"]
2676 pub fn bgfx_set_vertex_buffer_name(
2677 _handle: bgfx_vertex_buffer_handle_t,
2678 _name: *const ::std::os::raw::c_char,
2679 _len: i32,
2680 );
2681}
2682extern "C" {
2683 #[doc = " Destroy static vertex buffer.\n\n @param[in] _handle Static vertex buffer handle.\n"]
2684 pub fn bgfx_destroy_vertex_buffer(_handle: bgfx_vertex_buffer_handle_t);
2685}
2686extern "C" {
2687 #[doc = " Create empty dynamic index buffer.\n\n @param[in] _num Number of indices.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic\n buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on\n index buffers.\n\n @returns Dynamic index buffer handle.\n"]
2688 pub fn bgfx_create_dynamic_index_buffer(
2689 _num: u32,
2690 _flags: u16,
2691 ) -> bgfx_dynamic_index_buffer_handle_t;
2692}
2693extern "C" {
2694 #[doc = " Create a dynamic index buffer and initialize it.\n\n @param[in] _mem Index buffer data.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic\n buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on\n index buffers.\n\n @returns Dynamic index buffer handle.\n"]
2695 pub fn bgfx_create_dynamic_index_buffer_mem(
2696 _mem: *const bgfx_memory_t,
2697 _flags: u16,
2698 ) -> bgfx_dynamic_index_buffer_handle_t;
2699}
2700extern "C" {
2701 #[doc = " Update dynamic index buffer.\n\n @param[in] _handle Dynamic index buffer handle.\n @param[in] _startIndex Start index.\n @param[in] _mem Index buffer data.\n"]
2702 pub fn bgfx_update_dynamic_index_buffer(
2703 _handle: bgfx_dynamic_index_buffer_handle_t,
2704 _startIndex: u32,
2705 _mem: *const bgfx_memory_t,
2706 );
2707}
2708extern "C" {
2709 #[doc = " Destroy dynamic index buffer.\n\n @param[in] _handle Dynamic index buffer handle.\n"]
2710 pub fn bgfx_destroy_dynamic_index_buffer(_handle: bgfx_dynamic_index_buffer_handle_t);
2711}
2712extern "C" {
2713 #[doc = " Create empty dynamic vertex buffer.\n\n @param[in] _num Number of vertices.\n @param[in] _layout Vertex layout.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic\n buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on\n index buffers.\n\n @returns Dynamic vertex buffer handle.\n"]
2714 pub fn bgfx_create_dynamic_vertex_buffer(
2715 _num: u32,
2716 _layout: *const bgfx_vertex_layout_t,
2717 _flags: u16,
2718 ) -> bgfx_dynamic_vertex_buffer_handle_t;
2719}
2720extern "C" {
2721 #[doc = " Create dynamic vertex buffer and initialize it.\n\n @param[in] _mem Vertex buffer data.\n @param[in] _layout Vertex layout.\n @param[in] _flags Buffer creation flags.\n - `BGFX_BUFFER_NONE` - No flags.\n - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.\n - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer\n is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.\n - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.\n - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of\n data is passed. If this flag is not specified, and more data is passed on update, the buffer\n will be trimmed to fit the existing buffer size. This flag has effect only on dynamic\n buffers.\n - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on\n index buffers.\n\n @returns Dynamic vertex buffer handle.\n"]
2722 pub fn bgfx_create_dynamic_vertex_buffer_mem(
2723 _mem: *const bgfx_memory_t,
2724 _layout: *const bgfx_vertex_layout_t,
2725 _flags: u16,
2726 ) -> bgfx_dynamic_vertex_buffer_handle_t;
2727}
2728extern "C" {
2729 #[doc = " Update dynamic vertex buffer.\n\n @param[in] _handle Dynamic vertex buffer handle.\n @param[in] _startVertex Start vertex.\n @param[in] _mem Vertex buffer data.\n"]
2730 pub fn bgfx_update_dynamic_vertex_buffer(
2731 _handle: bgfx_dynamic_vertex_buffer_handle_t,
2732 _startVertex: u32,
2733 _mem: *const bgfx_memory_t,
2734 );
2735}
2736extern "C" {
2737 #[doc = " Destroy dynamic vertex buffer.\n\n @param[in] _handle Dynamic vertex buffer handle.\n"]
2738 pub fn bgfx_destroy_dynamic_vertex_buffer(_handle: bgfx_dynamic_vertex_buffer_handle_t);
2739}
2740extern "C" {
2741 #[doc = " Returns number of requested or maximum available indices.\n\n @param[in] _num Number of required indices.\n @param[in] _index32 Set to `true` if input indices will be 32-bit.\n\n @returns Number of requested or maximum available indices.\n"]
2742 pub fn bgfx_get_avail_transient_index_buffer(_num: u32, _index32: bool) -> u32;
2743}
2744extern "C" {
2745 #[doc = " Returns number of requested or maximum available vertices.\n\n @param[in] _num Number of required vertices.\n @param[in] _layout Vertex layout.\n\n @returns Number of requested or maximum available vertices.\n"]
2746 pub fn bgfx_get_avail_transient_vertex_buffer(
2747 _num: u32,
2748 _layout: *const bgfx_vertex_layout_t,
2749 ) -> u32;
2750}
2751extern "C" {
2752 #[doc = " Returns number of requested or maximum available instance buffer slots.\n\n @param[in] _num Number of required instances.\n @param[in] _stride Stride per instance.\n\n @returns Number of requested or maximum available instance buffer slots.\n"]
2753 pub fn bgfx_get_avail_instance_data_buffer(_num: u32, _stride: u16) -> u32;
2754}
2755extern "C" {
2756 #[doc = " Allocate transient index buffer.\n\n @param[out] _tib TransientIndexBuffer structure will be filled, and will be valid\n for the duration of frame, and can be reused for multiple draw\n calls.\n @param[in] _num Number of indices to allocate.\n @param[in] _index32 Set to `true` if input indices will be 32-bit.\n"]
2757 pub fn bgfx_alloc_transient_index_buffer(
2758 _tib: *mut bgfx_transient_index_buffer_t,
2759 _num: u32,
2760 _index32: bool,
2761 );
2762}
2763extern "C" {
2764 #[doc = " Allocate transient vertex buffer.\n\n @param[out] _tvb TransientVertexBuffer structure will be filled, and will be valid\n for the duration of frame, and can be reused for multiple draw\n calls.\n @param[in] _num Number of vertices to allocate.\n @param[in] _layout Vertex layout.\n"]
2765 pub fn bgfx_alloc_transient_vertex_buffer(
2766 _tvb: *mut bgfx_transient_vertex_buffer_t,
2767 _num: u32,
2768 _layout: *const bgfx_vertex_layout_t,
2769 );
2770}
2771extern "C" {
2772 #[doc = " Check for required space and allocate transient vertex and index\n buffers. If both space requirements are satisfied function returns\n true.\n\n @param[out] _tvb TransientVertexBuffer structure will be filled, and will be valid\n for the duration of frame, and can be reused for multiple draw\n calls.\n @param[in] _layout Vertex layout.\n @param[in] _numVertices Number of vertices to allocate.\n @param[out] _tib TransientIndexBuffer structure will be filled, and will be valid\n for the duration of frame, and can be reused for multiple draw\n calls.\n @param[in] _numIndices Number of indices to allocate.\n @param[in] _index32 Set to `true` if input indices will be 32-bit.\n"]
2773 pub fn bgfx_alloc_transient_buffers(
2774 _tvb: *mut bgfx_transient_vertex_buffer_t,
2775 _layout: *const bgfx_vertex_layout_t,
2776 _numVertices: u32,
2777 _tib: *mut bgfx_transient_index_buffer_t,
2778 _numIndices: u32,
2779 _index32: bool,
2780 ) -> bool;
2781}
2782extern "C" {
2783 #[doc = " Allocate instance data buffer.\n\n @param[out] _idb InstanceDataBuffer structure will be filled, and will be valid\n for duration of frame, and can be reused for multiple draw\n calls.\n @param[in] _num Number of instances.\n @param[in] _stride Instance stride. Must be multiple of 16.\n"]
2784 pub fn bgfx_alloc_instance_data_buffer(
2785 _idb: *mut bgfx_instance_data_buffer_t,
2786 _num: u32,
2787 _stride: u16,
2788 );
2789}
2790extern "C" {
2791 #[doc = " Create draw indirect buffer.\n\n @param[in] _num Number of indirect calls.\n\n @returns Indirect buffer handle.\n"]
2792 pub fn bgfx_create_indirect_buffer(_num: u32) -> bgfx_indirect_buffer_handle_t;
2793}
2794extern "C" {
2795 #[doc = " Destroy draw indirect buffer.\n\n @param[in] _handle Indirect buffer handle.\n"]
2796 pub fn bgfx_destroy_indirect_buffer(_handle: bgfx_indirect_buffer_handle_t);
2797}
2798extern "C" {
2799 #[doc = " Create shader from memory buffer.\n\n @param[in] _mem Shader binary.\n\n @returns Shader handle.\n"]
2800 pub fn bgfx_create_shader(_mem: *const bgfx_memory_t) -> bgfx_shader_handle_t;
2801}
2802extern "C" {
2803 #[doc = " Returns the number of uniforms and uniform handles used inside a shader.\n @remarks\n Only non-predefined uniforms are returned.\n\n @param[in] _handle Shader handle.\n @param[out] _uniforms UniformHandle array where data will be stored.\n @param[in] _max Maximum capacity of array.\n\n @returns Number of uniforms used by shader.\n"]
2804 pub fn bgfx_get_shader_uniforms(
2805 _handle: bgfx_shader_handle_t,
2806 _uniforms: *mut bgfx_uniform_handle_t,
2807 _max: u16,
2808 ) -> u16;
2809}
2810extern "C" {
2811 #[doc = " Set shader debug name.\n\n @param[in] _handle Shader handle.\n @param[in] _name Shader name.\n @param[in] _len Shader name length (if length is INT32_MAX, it's expected\n that _name is zero terminated string).\n"]
2812 pub fn bgfx_set_shader_name(
2813 _handle: bgfx_shader_handle_t,
2814 _name: *const ::std::os::raw::c_char,
2815 _len: i32,
2816 );
2817}
2818extern "C" {
2819 #[doc = " Destroy shader.\n @remark Once a shader program is created with _handle,\n it is safe to destroy that shader.\n\n @param[in] _handle Shader handle.\n"]
2820 pub fn bgfx_destroy_shader(_handle: bgfx_shader_handle_t);
2821}
2822extern "C" {
2823 #[doc = " Create program with vertex and fragment shaders.\n\n @param[in] _vsh Vertex shader.\n @param[in] _fsh Fragment shader.\n @param[in] _destroyShaders If true, shaders will be destroyed when program is destroyed.\n\n @returns Program handle if vertex shader output and fragment shader\n input are matching, otherwise returns invalid program handle.\n"]
2824 pub fn bgfx_create_program(
2825 _vsh: bgfx_shader_handle_t,
2826 _fsh: bgfx_shader_handle_t,
2827 _destroyShaders: bool,
2828 ) -> bgfx_program_handle_t;
2829}
2830extern "C" {
2831 #[doc = " Create program with compute shader.\n\n @param[in] _csh Compute shader.\n @param[in] _destroyShaders If true, shaders will be destroyed when program is destroyed.\n\n @returns Program handle.\n"]
2832 pub fn bgfx_create_compute_program(
2833 _csh: bgfx_shader_handle_t,
2834 _destroyShaders: bool,
2835 ) -> bgfx_program_handle_t;
2836}
2837extern "C" {
2838 #[doc = " Destroy program.\n\n @param[in] _handle Program handle.\n"]
2839 pub fn bgfx_destroy_program(_handle: bgfx_program_handle_t);
2840}
2841extern "C" {
2842 #[doc = " Validate texture parameters.\n\n @param[in] _depth Depth dimension of volume texture.\n @param[in] _cubeMap Indicates that texture contains cubemap.\n @param[in] _numLayers Number of layers in texture array.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture flags. See `BGFX_TEXTURE_*`.\n\n @returns True if a texture with the same parameters can be created.\n"]
2843 pub fn bgfx_is_texture_valid(
2844 _depth: u16,
2845 _cubeMap: bool,
2846 _numLayers: u16,
2847 _format: bgfx_texture_format_t,
2848 _flags: u64,
2849 ) -> bool;
2850}
2851extern "C" {
2852 #[doc = " Validate frame buffer parameters.\n\n @param[in] _num Number of attachments.\n @param[in] _attachment Attachment texture info. See: `bgfx::Attachment`.\n\n @returns True if a frame buffer with the same parameters can be created.\n"]
2853 pub fn bgfx_is_frame_buffer_valid(_num: u8, _attachment: *const bgfx_attachment_t) -> bool;
2854}
2855extern "C" {
2856 #[doc = " Calculate amount of memory required for texture.\n\n @param[out] _info Resulting texture info structure. See: `TextureInfo`.\n @param[in] _width Width.\n @param[in] _height Height.\n @param[in] _depth Depth dimension of volume texture.\n @param[in] _cubeMap Indicates that texture contains cubemap.\n @param[in] _hasMips Indicates that texture contains full mip-map chain.\n @param[in] _numLayers Number of layers in texture array.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n"]
2857 pub fn bgfx_calc_texture_size(
2858 _info: *mut bgfx_texture_info_t,
2859 _width: u16,
2860 _height: u16,
2861 _depth: u16,
2862 _cubeMap: bool,
2863 _hasMips: bool,
2864 _numLayers: u16,
2865 _format: bgfx_texture_format_t,
2866 );
2867}
2868extern "C" {
2869 #[doc = " Create texture from memory buffer.\n\n @param[in] _mem DDS, KTX or PVR texture binary data.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n @param[in] _skip Skip top level mips when parsing texture.\n @param[out] _info When non-`NULL` is specified it returns parsed texture information.\n\n @returns Texture handle.\n"]
2870 pub fn bgfx_create_texture(
2871 _mem: *const bgfx_memory_t,
2872 _flags: u64,
2873 _skip: u8,
2874 _info: *mut bgfx_texture_info_t,
2875 ) -> bgfx_texture_handle_t;
2876}
2877extern "C" {
2878 #[doc = " Create 2D texture.\n\n @param[in] _width Width.\n @param[in] _height Height.\n @param[in] _hasMips Indicates that texture contains full mip-map chain.\n @param[in] _numLayers Number of layers in texture array. Must be 1 if caps\n `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n @param[in] _mem Texture data. If `_mem` is non-NULL, created texture will be immutable. If\n `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than\n 1, expected memory layout is texture and all mips together for each array element.\n\n @returns Texture handle.\n"]
2879 pub fn bgfx_create_texture_2d(
2880 _width: u16,
2881 _height: u16,
2882 _hasMips: bool,
2883 _numLayers: u16,
2884 _format: bgfx_texture_format_t,
2885 _flags: u64,
2886 _mem: *const bgfx_memory_t,
2887 ) -> bgfx_texture_handle_t;
2888}
2889extern "C" {
2890 #[doc = " Create texture with size based on back-buffer ratio. Texture will maintain ratio\n if back buffer resolution changes.\n\n @param[in] _ratio Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.\n @param[in] _hasMips Indicates that texture contains full mip-map chain.\n @param[in] _numLayers Number of layers in texture array. Must be 1 if caps\n `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n\n @returns Texture handle.\n"]
2891 pub fn bgfx_create_texture_2d_scaled(
2892 _ratio: bgfx_backbuffer_ratio_t,
2893 _hasMips: bool,
2894 _numLayers: u16,
2895 _format: bgfx_texture_format_t,
2896 _flags: u64,
2897 ) -> bgfx_texture_handle_t;
2898}
2899extern "C" {
2900 #[doc = " Create 3D texture.\n\n @param[in] _width Width.\n @param[in] _height Height.\n @param[in] _depth Depth.\n @param[in] _hasMips Indicates that texture contains full mip-map chain.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n @param[in] _mem Texture data. If `_mem` is non-NULL, created texture will be immutable. If\n `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than\n 1, expected memory layout is texture and all mips together for each array element.\n\n @returns Texture handle.\n"]
2901 pub fn bgfx_create_texture_3d(
2902 _width: u16,
2903 _height: u16,
2904 _depth: u16,
2905 _hasMips: bool,
2906 _format: bgfx_texture_format_t,
2907 _flags: u64,
2908 _mem: *const bgfx_memory_t,
2909 ) -> bgfx_texture_handle_t;
2910}
2911extern "C" {
2912 #[doc = " Create Cube texture.\n\n @param[in] _size Cube side size.\n @param[in] _hasMips Indicates that texture contains full mip-map chain.\n @param[in] _numLayers Number of layers in texture array. Must be 1 if caps\n `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n @param[in] _mem Texture data. If `_mem` is non-NULL, created texture will be immutable. If\n `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than\n 1, expected memory layout is texture and all mips together for each array element.\n\n @returns Texture handle.\n"]
2913 pub fn bgfx_create_texture_cube(
2914 _size: u16,
2915 _hasMips: bool,
2916 _numLayers: u16,
2917 _format: bgfx_texture_format_t,
2918 _flags: u64,
2919 _mem: *const bgfx_memory_t,
2920 ) -> bgfx_texture_handle_t;
2921}
2922extern "C" {
2923 #[doc = " Update 2D texture.\n @attention It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.\n\n @param[in] _handle Texture handle.\n @param[in] _layer Layer in texture array.\n @param[in] _mip Mip level.\n @param[in] _x X offset in texture.\n @param[in] _y Y offset in texture.\n @param[in] _width Width of texture block.\n @param[in] _height Height of texture block.\n @param[in] _mem Texture update data.\n @param[in] _pitch Pitch of input image (bytes). When _pitch is set to\n UINT16_MAX, it will be calculated internally based on _width.\n"]
2924 pub fn bgfx_update_texture_2d(
2925 _handle: bgfx_texture_handle_t,
2926 _layer: u16,
2927 _mip: u8,
2928 _x: u16,
2929 _y: u16,
2930 _width: u16,
2931 _height: u16,
2932 _mem: *const bgfx_memory_t,
2933 _pitch: u16,
2934 );
2935}
2936extern "C" {
2937 #[doc = " Update 3D texture.\n @attention It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.\n\n @param[in] _handle Texture handle.\n @param[in] _mip Mip level.\n @param[in] _x X offset in texture.\n @param[in] _y Y offset in texture.\n @param[in] _z Z offset in texture.\n @param[in] _width Width of texture block.\n @param[in] _height Height of texture block.\n @param[in] _depth Depth of texture block.\n @param[in] _mem Texture update data.\n"]
2938 pub fn bgfx_update_texture_3d(
2939 _handle: bgfx_texture_handle_t,
2940 _mip: u8,
2941 _x: u16,
2942 _y: u16,
2943 _z: u16,
2944 _width: u16,
2945 _height: u16,
2946 _depth: u16,
2947 _mem: *const bgfx_memory_t,
2948 );
2949}
2950extern "C" {
2951 #[doc = " Update Cube texture.\n @attention It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.\n\n @param[in] _handle Texture handle.\n @param[in] _layer Layer in texture array.\n @param[in] _side Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,\n where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.\n +----------+\n |-z 2|\n | ^ +y |\n | | | Unfolded cube:\n | +---->+x |\n +----------+----------+----------+----------+\n |+y 1|+y 4|+y 0|+y 5|\n | ^ -x | ^ +z | ^ +x | ^ -z |\n | | | | | | | | |\n | +---->+z | +---->+x | +---->-z | +---->-x |\n +----------+----------+----------+----------+\n |+z 3|\n | ^ -y |\n | | |\n | +---->+x |\n +----------+\n @param[in] _mip Mip level.\n @param[in] _x X offset in texture.\n @param[in] _y Y offset in texture.\n @param[in] _width Width of texture block.\n @param[in] _height Height of texture block.\n @param[in] _mem Texture update data.\n @param[in] _pitch Pitch of input image (bytes). When _pitch is set to\n UINT16_MAX, it will be calculated internally based on _width.\n"]
2952 pub fn bgfx_update_texture_cube(
2953 _handle: bgfx_texture_handle_t,
2954 _layer: u16,
2955 _side: u8,
2956 _mip: u8,
2957 _x: u16,
2958 _y: u16,
2959 _width: u16,
2960 _height: u16,
2961 _mem: *const bgfx_memory_t,
2962 _pitch: u16,
2963 );
2964}
2965extern "C" {
2966 #[doc = " Read back texture content.\n @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.\n @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.\n\n @param[in] _handle Texture handle.\n @param[in] _data Destination buffer.\n @param[in] _mip Mip level.\n\n @returns Frame number when the result will be available. See: `bgfx::frame`.\n"]
2967 pub fn bgfx_read_texture(
2968 _handle: bgfx_texture_handle_t,
2969 _data: *mut ::std::os::raw::c_void,
2970 _mip: u8,
2971 ) -> u32;
2972}
2973extern "C" {
2974 #[doc = " Set texture debug name.\n\n @param[in] _handle Texture handle.\n @param[in] _name Texture name.\n @param[in] _len Texture name length (if length is INT32_MAX, it's expected\n that _name is zero terminated string.\n"]
2975 pub fn bgfx_set_texture_name(
2976 _handle: bgfx_texture_handle_t,
2977 _name: *const ::std::os::raw::c_char,
2978 _len: i32,
2979 );
2980}
2981extern "C" {
2982 #[doc = " Returns texture direct access pointer.\n @attention Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature\n is available on GPUs that have unified memory architecture (UMA) support.\n\n @param[in] _handle Texture handle.\n\n @returns Pointer to texture memory. If returned pointer is `NULL` direct access\n is not available for this texture. If pointer is `UINTPTR_MAX` sentinel value\n it means texture is pending creation. Pointer returned can be cached and it\n will be valid until texture is destroyed.\n"]
2983 pub fn bgfx_get_direct_access_ptr(
2984 _handle: bgfx_texture_handle_t,
2985 ) -> *mut ::std::os::raw::c_void;
2986}
2987extern "C" {
2988 #[doc = " Destroy texture.\n\n @param[in] _handle Texture handle.\n"]
2989 pub fn bgfx_destroy_texture(_handle: bgfx_texture_handle_t);
2990}
2991extern "C" {
2992 #[doc = " Create frame buffer (simple).\n\n @param[in] _width Texture width.\n @param[in] _height Texture height.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _textureFlags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n\n @returns Frame buffer handle.\n"]
2993 pub fn bgfx_create_frame_buffer(
2994 _width: u16,
2995 _height: u16,
2996 _format: bgfx_texture_format_t,
2997 _textureFlags: u64,
2998 ) -> bgfx_frame_buffer_handle_t;
2999}
3000extern "C" {
3001 #[doc = " Create frame buffer with size based on back-buffer ratio. Frame buffer will maintain ratio\n if back buffer resolution changes.\n\n @param[in] _ratio Frame buffer size in respect to back-buffer size. See:\n `BackbufferRatio::Enum`.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _textureFlags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n\n @returns Frame buffer handle.\n"]
3002 pub fn bgfx_create_frame_buffer_scaled(
3003 _ratio: bgfx_backbuffer_ratio_t,
3004 _format: bgfx_texture_format_t,
3005 _textureFlags: u64,
3006 ) -> bgfx_frame_buffer_handle_t;
3007}
3008extern "C" {
3009 #[doc = " Create MRT frame buffer from texture handles (simple).\n\n @param[in] _num Number of texture handles.\n @param[in] _handles Texture attachments.\n @param[in] _destroyTexture If true, textures will be destroyed when\n frame buffer is destroyed.\n\n @returns Frame buffer handle.\n"]
3010 pub fn bgfx_create_frame_buffer_from_handles(
3011 _num: u8,
3012 _handles: *const bgfx_texture_handle_t,
3013 _destroyTexture: bool,
3014 ) -> bgfx_frame_buffer_handle_t;
3015}
3016extern "C" {
3017 #[doc = " Create MRT frame buffer from texture handles with specific layer and\n mip level.\n\n @param[in] _num Number of attachments.\n @param[in] _attachment Attachment texture info. See: `bgfx::Attachment`.\n @param[in] _destroyTexture If true, textures will be destroyed when\n frame buffer is destroyed.\n\n @returns Frame buffer handle.\n"]
3018 pub fn bgfx_create_frame_buffer_from_attachment(
3019 _num: u8,
3020 _attachment: *const bgfx_attachment_t,
3021 _destroyTexture: bool,
3022 ) -> bgfx_frame_buffer_handle_t;
3023}
3024extern "C" {
3025 #[doc = " Create frame buffer for multiple window rendering.\n @remarks\n Frame buffer cannot be used for sampling.\n @attention Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.\n\n @param[in] _nwh OS' target native window handle.\n @param[in] _width Window back buffer width.\n @param[in] _height Window back buffer height.\n @param[in] _format Window back buffer color format.\n @param[in] _depthFormat Window back buffer depth format.\n\n @returns Frame buffer handle.\n"]
3026 pub fn bgfx_create_frame_buffer_from_nwh(
3027 _nwh: *mut ::std::os::raw::c_void,
3028 _width: u16,
3029 _height: u16,
3030 _format: bgfx_texture_format_t,
3031 _depthFormat: bgfx_texture_format_t,
3032 ) -> bgfx_frame_buffer_handle_t;
3033}
3034extern "C" {
3035 #[doc = " Set frame buffer debug name.\n\n @param[in] _handle Frame buffer handle.\n @param[in] _name Frame buffer name.\n @param[in] _len Frame buffer name length (if length is INT32_MAX, it's expected\n that _name is zero terminated string.\n"]
3036 pub fn bgfx_set_frame_buffer_name(
3037 _handle: bgfx_frame_buffer_handle_t,
3038 _name: *const ::std::os::raw::c_char,
3039 _len: i32,
3040 );
3041}
3042extern "C" {
3043 #[doc = " Obtain texture handle of frame buffer attachment.\n\n @param[in] _handle Frame buffer handle.\n @param[in] _attachment\n"]
3044 pub fn bgfx_get_texture(
3045 _handle: bgfx_frame_buffer_handle_t,
3046 _attachment: u8,
3047 ) -> bgfx_texture_handle_t;
3048}
3049extern "C" {
3050 #[doc = " Destroy frame buffer.\n\n @param[in] _handle Frame buffer handle.\n"]
3051 pub fn bgfx_destroy_frame_buffer(_handle: bgfx_frame_buffer_handle_t);
3052}
3053extern "C" {
3054 #[doc = " Create shader uniform parameter.\n @remarks\n 1. Uniform names are unique. It's valid to call `bgfx::createUniform`\n multiple times with the same uniform name. The library will always\n return the same handle, but the handle reference count will be\n incremented. This means that the same number of `bgfx::destroyUniform`\n must be called to properly destroy the uniform.\n 2. Predefined uniforms (declared in `bgfx_shader.sh`):\n - `u_viewRect vec4(x, y, width, height)` - view rectangle for current\n view, in pixels.\n - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse\n width and height\n - `u_view mat4` - view matrix\n - `u_invView mat4` - inverted view matrix\n - `u_proj mat4` - projection matrix\n - `u_invProj mat4` - inverted projection matrix\n - `u_viewProj mat4` - concatenated view projection matrix\n - `u_invViewProj mat4` - concatenated inverted view projection matrix\n - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.\n - `u_modelView mat4` - concatenated model view matrix, only first\n model matrix from array is used.\n - `u_modelViewProj mat4` - concatenated model view projection matrix.\n - `u_alphaRef float` - alpha reference value for alpha test.\n\n @param[in] _name Uniform name in shader.\n @param[in] _type Type of uniform (See: `bgfx::UniformType`).\n @param[in] _num Number of elements in array.\n\n @returns Handle to uniform object.\n"]
3055 pub fn bgfx_create_uniform(
3056 _name: *const ::std::os::raw::c_char,
3057 _type: bgfx_uniform_type_t,
3058 _num: u16,
3059 ) -> bgfx_uniform_handle_t;
3060}
3061extern "C" {
3062 #[doc = " Retrieve uniform info.\n\n @param[in] _handle Handle to uniform object.\n @param[out] _info Uniform info.\n"]
3063 pub fn bgfx_get_uniform_info(_handle: bgfx_uniform_handle_t, _info: *mut bgfx_uniform_info_t);
3064}
3065extern "C" {
3066 #[doc = " Destroy shader uniform parameter.\n\n @param[in] _handle Handle to uniform object.\n"]
3067 pub fn bgfx_destroy_uniform(_handle: bgfx_uniform_handle_t);
3068}
3069extern "C" {
3070 #[doc = " Create occlusion query.\n"]
3071 pub fn bgfx_create_occlusion_query() -> bgfx_occlusion_query_handle_t;
3072}
3073extern "C" {
3074 #[doc = " Retrieve occlusion query result from previous frame.\n\n @param[in] _handle Handle to occlusion query object.\n @param[out] _result Number of pixels that passed test. This argument\n can be `NULL` if result of occlusion query is not needed.\n\n @returns Occlusion query result.\n"]
3075 pub fn bgfx_get_result(
3076 _handle: bgfx_occlusion_query_handle_t,
3077 _result: *mut i32,
3078 ) -> bgfx_occlusion_query_result_t;
3079}
3080extern "C" {
3081 #[doc = " Destroy occlusion query.\n\n @param[in] _handle Handle to occlusion query object.\n"]
3082 pub fn bgfx_destroy_occlusion_query(_handle: bgfx_occlusion_query_handle_t);
3083}
3084extern "C" {
3085 #[doc = " Set palette color value.\n\n @param[in] _index Index into palette.\n @param[in] _rgba RGBA floating point values.\n"]
3086 pub fn bgfx_set_palette_color(_index: u8, _rgba: *const f32);
3087}
3088extern "C" {
3089 #[doc = " Set palette color value.\n\n @param[in] _index Index into palette.\n @param[in] _rgba Packed 32-bit RGBA value.\n"]
3090 pub fn bgfx_set_palette_color_rgba8(_index: u8, _rgba: u32);
3091}
3092extern "C" {
3093 #[doc = " Set view name.\n @remarks\n This is debug only feature.\n In graphics debugger view name will appear as:\n \"nnnc <view name>\"\n ^ ^ ^\n | +--- compute (C)\n +------ view id\n\n @param[in] _id View id.\n @param[in] _name View name.\n"]
3094 pub fn bgfx_set_view_name(_id: bgfx_view_id_t, _name: *const ::std::os::raw::c_char);
3095}
3096extern "C" {
3097 #[doc = " Set view rectangle. Draw primitive outside view will be clipped.\n\n @param[in] _id View id.\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _width Width of view port region.\n @param[in] _height Height of view port region.\n"]
3098 pub fn bgfx_set_view_rect(_id: bgfx_view_id_t, _x: u16, _y: u16, _width: u16, _height: u16);
3099}
3100extern "C" {
3101 #[doc = " Set view rectangle. Draw primitive outside view will be clipped.\n\n @param[in] _id View id.\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _ratio Width and height will be set in respect to back-buffer size.\n See: `BackbufferRatio::Enum`.\n"]
3102 pub fn bgfx_set_view_rect_ratio(
3103 _id: bgfx_view_id_t,
3104 _x: u16,
3105 _y: u16,
3106 _ratio: bgfx_backbuffer_ratio_t,
3107 );
3108}
3109extern "C" {
3110 #[doc = " Set view scissor. Draw primitive outside view will be clipped. When\n _x, _y, _width and _height are set to 0, scissor will be disabled.\n\n @param[in] _id View id.\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _width Width of view scissor region.\n @param[in] _height Height of view scissor region.\n"]
3111 pub fn bgfx_set_view_scissor(_id: bgfx_view_id_t, _x: u16, _y: u16, _width: u16, _height: u16);
3112}
3113extern "C" {
3114 #[doc = " Set view clear flags.\n\n @param[in] _id View id.\n @param[in] _flags Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear\n operation. See: `BGFX_CLEAR_*`.\n @param[in] _rgba Color clear value.\n @param[in] _depth Depth clear value.\n @param[in] _stencil Stencil clear value.\n"]
3115 pub fn bgfx_set_view_clear(
3116 _id: bgfx_view_id_t,
3117 _flags: u16,
3118 _rgba: u32,
3119 _depth: f32,
3120 _stencil: u8,
3121 );
3122}
3123extern "C" {
3124 #[doc = " Set view clear flags with different clear color for each\n frame buffer texture. `bgfx::setPaletteColor` must be used to set up a\n clear color palette.\n\n @param[in] _id View id.\n @param[in] _flags Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear\n operation. See: `BGFX_CLEAR_*`.\n @param[in] _depth Depth clear value.\n @param[in] _stencil Stencil clear value.\n @param[in] _c0 Palette index for frame buffer attachment 0.\n @param[in] _c1 Palette index for frame buffer attachment 1.\n @param[in] _c2 Palette index for frame buffer attachment 2.\n @param[in] _c3 Palette index for frame buffer attachment 3.\n @param[in] _c4 Palette index for frame buffer attachment 4.\n @param[in] _c5 Palette index for frame buffer attachment 5.\n @param[in] _c6 Palette index for frame buffer attachment 6.\n @param[in] _c7 Palette index for frame buffer attachment 7.\n"]
3125 pub fn bgfx_set_view_clear_mrt(
3126 _id: bgfx_view_id_t,
3127 _flags: u16,
3128 _depth: f32,
3129 _stencil: u8,
3130 _c0: u8,
3131 _c1: u8,
3132 _c2: u8,
3133 _c3: u8,
3134 _c4: u8,
3135 _c5: u8,
3136 _c6: u8,
3137 _c7: u8,
3138 );
3139}
3140extern "C" {
3141 #[doc = " Set view sorting mode.\n @remarks\n View mode must be set prior calling `bgfx::submit` for the view.\n\n @param[in] _id View id.\n @param[in] _mode View sort mode. See `ViewMode::Enum`.\n"]
3142 pub fn bgfx_set_view_mode(_id: bgfx_view_id_t, _mode: bgfx_view_mode_t);
3143}
3144extern "C" {
3145 #[doc = " Set view frame buffer.\n @remarks\n Not persistent after `bgfx::reset` call.\n\n @param[in] _id View id.\n @param[in] _handle Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as\n frame buffer handle will draw primitives from this view into\n default back buffer.\n"]
3146 pub fn bgfx_set_view_frame_buffer(_id: bgfx_view_id_t, _handle: bgfx_frame_buffer_handle_t);
3147}
3148extern "C" {
3149 #[doc = " Set view's view matrix and projection matrix,\n all draw primitives in this view will use these two matrices.\n\n @param[in] _id View id.\n @param[in] _view View matrix.\n @param[in] _proj Projection matrix.\n"]
3150 pub fn bgfx_set_view_transform(
3151 _id: bgfx_view_id_t,
3152 _view: *const ::std::os::raw::c_void,
3153 _proj: *const ::std::os::raw::c_void,
3154 );
3155}
3156extern "C" {
3157 #[doc = " Post submit view reordering.\n\n @param[in] _id First view id.\n @param[in] _num Number of views to remap.\n @param[in] _order View remap id table. Passing `NULL` will reset view ids\n to default state.\n"]
3158 pub fn bgfx_set_view_order(_id: bgfx_view_id_t, _num: u16, _order: *const bgfx_view_id_t);
3159}
3160extern "C" {
3161 #[doc = " Reset all view settings to default.\n\n @param[in] _id\n"]
3162 pub fn bgfx_reset_view(_id: bgfx_view_id_t);
3163}
3164extern "C" {
3165 #[doc = " Begin submitting draw calls from thread.\n\n @param[in] _forThread Explicitly request an encoder for a worker thread.\n\n @returns Encoder.\n"]
3166 pub fn bgfx_encoder_begin(_forThread: bool) -> *mut bgfx_encoder_t;
3167}
3168extern "C" {
3169 #[doc = " End submitting draw calls from thread.\n\n @param[in] _encoder Encoder.\n"]
3170 pub fn bgfx_encoder_end(_encoder: *mut bgfx_encoder_t);
3171}
3172extern "C" {
3173 #[doc = " Sets a debug marker. This allows you to group graphics calls together for easy browsing in\n graphics debugging tools.\n\n @param[in] _marker Marker string.\n"]
3174 pub fn bgfx_encoder_set_marker(
3175 _this: *mut bgfx_encoder_t,
3176 _marker: *const ::std::os::raw::c_char,
3177 );
3178}
3179extern "C" {
3180 #[doc = " Set render states for draw primitive.\n @remarks\n 1. To set up more complex states use:\n `BGFX_STATE_ALPHA_REF(_ref)`,\n `BGFX_STATE_POINT_SIZE(_size)`,\n `BGFX_STATE_BLEND_FUNC(_src, _dst)`,\n `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,\n `BGFX_STATE_BLEND_EQUATION(_equation)`,\n `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`\n 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend\n equation is specified.\n\n @param[in] _state State flags. Default state for primitive type is\n triangles. See: `BGFX_STATE_DEFAULT`.\n - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.\n - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.\n - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.\n - `BGFX_STATE_CULL_*` - Backface culling mode.\n - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.\n - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.\n - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.\n @param[in] _rgba Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and\n `BGFX_STATE_BLEND_INV_FACTOR` blend modes.\n"]
3181 pub fn bgfx_encoder_set_state(_this: *mut bgfx_encoder_t, _state: u64, _rgba: u32);
3182}
3183extern "C" {
3184 #[doc = " Set condition for rendering.\n\n @param[in] _handle Occlusion query handle.\n @param[in] _visible Render if occlusion query is visible.\n"]
3185 pub fn bgfx_encoder_set_condition(
3186 _this: *mut bgfx_encoder_t,
3187 _handle: bgfx_occlusion_query_handle_t,
3188 _visible: bool,
3189 );
3190}
3191extern "C" {
3192 #[doc = " Set stencil test state.\n\n @param[in] _fstencil Front stencil state.\n @param[in] _bstencil Back stencil state. If back is set to `BGFX_STENCIL_NONE`\n _fstencil is applied to both front and back facing primitives.\n"]
3193 pub fn bgfx_encoder_set_stencil(_this: *mut bgfx_encoder_t, _fstencil: u32, _bstencil: u32);
3194}
3195extern "C" {
3196 #[doc = " Set scissor for draw primitive.\n @remark\n To scissor for all primitives in view see `bgfx::setViewScissor`.\n\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _width Width of view scissor region.\n @param[in] _height Height of view scissor region.\n\n @returns Scissor cache index.\n"]
3197 pub fn bgfx_encoder_set_scissor(
3198 _this: *mut bgfx_encoder_t,
3199 _x: u16,
3200 _y: u16,
3201 _width: u16,
3202 _height: u16,
3203 ) -> u16;
3204}
3205extern "C" {
3206 #[doc = " Set scissor from cache for draw primitive.\n @remark\n To scissor for all primitives in view see `bgfx::setViewScissor`.\n\n @param[in] _cache Index in scissor cache.\n"]
3207 pub fn bgfx_encoder_set_scissor_cached(_this: *mut bgfx_encoder_t, _cache: u16);
3208}
3209extern "C" {
3210 #[doc = " Set model matrix for draw primitive. If it is not called,\n the model will be rendered with an identity model matrix.\n\n @param[in] _mtx Pointer to first matrix in array.\n @param[in] _num Number of matrices in array.\n\n @returns Index into matrix cache in case the same model matrix has\n to be used for other draw primitive call.\n"]
3211 pub fn bgfx_encoder_set_transform(
3212 _this: *mut bgfx_encoder_t,
3213 _mtx: *const ::std::os::raw::c_void,
3214 _num: u16,
3215 ) -> u32;
3216}
3217extern "C" {
3218 #[doc = " Set model matrix from matrix cache for draw primitive.\n\n @param[in] _cache Index in matrix cache.\n @param[in] _num Number of matrices from cache.\n"]
3219 pub fn bgfx_encoder_set_transform_cached(_this: *mut bgfx_encoder_t, _cache: u32, _num: u16);
3220}
3221extern "C" {
3222 #[doc = " Reserve matrices in internal matrix cache.\n @attention Pointer returned can be modified until `bgfx::frame` is called.\n\n @param[out] _transform Pointer to `Transform` structure.\n @param[in] _num Number of matrices.\n\n @returns Index in matrix cache.\n"]
3223 pub fn bgfx_encoder_alloc_transform(
3224 _this: *mut bgfx_encoder_t,
3225 _transform: *mut bgfx_transform_t,
3226 _num: u16,
3227 ) -> u32;
3228}
3229extern "C" {
3230 #[doc = " Set shader uniform parameter for draw primitive.\n\n @param[in] _handle Uniform.\n @param[in] _value Pointer to uniform data.\n @param[in] _num Number of elements. Passing `UINT16_MAX` will\n use the _num passed on uniform creation.\n"]
3231 pub fn bgfx_encoder_set_uniform(
3232 _this: *mut bgfx_encoder_t,
3233 _handle: bgfx_uniform_handle_t,
3234 _value: *const ::std::os::raw::c_void,
3235 _num: u16,
3236 );
3237}
3238extern "C" {
3239 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _handle Index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3240 pub fn bgfx_encoder_set_index_buffer(
3241 _this: *mut bgfx_encoder_t,
3242 _handle: bgfx_index_buffer_handle_t,
3243 _firstIndex: u32,
3244 _numIndices: u32,
3245 );
3246}
3247extern "C" {
3248 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _handle Dynamic index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3249 pub fn bgfx_encoder_set_dynamic_index_buffer(
3250 _this: *mut bgfx_encoder_t,
3251 _handle: bgfx_dynamic_index_buffer_handle_t,
3252 _firstIndex: u32,
3253 _numIndices: u32,
3254 );
3255}
3256extern "C" {
3257 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _tib Transient index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3258 pub fn bgfx_encoder_set_transient_index_buffer(
3259 _this: *mut bgfx_encoder_t,
3260 _tib: *const bgfx_transient_index_buffer_t,
3261 _firstIndex: u32,
3262 _numIndices: u32,
3263 );
3264}
3265extern "C" {
3266 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3267 pub fn bgfx_encoder_set_vertex_buffer(
3268 _this: *mut bgfx_encoder_t,
3269 _stream: u8,
3270 _handle: bgfx_vertex_buffer_handle_t,
3271 _startVertex: u32,
3272 _numVertices: u32,
3273 );
3274}
3275extern "C" {
3276 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid\n handle is used, vertex layout used for creation\n of vertex buffer will be used.\n"]
3277 pub fn bgfx_encoder_set_vertex_buffer_with_layout(
3278 _this: *mut bgfx_encoder_t,
3279 _stream: u8,
3280 _handle: bgfx_vertex_buffer_handle_t,
3281 _startVertex: u32,
3282 _numVertices: u32,
3283 _layoutHandle: bgfx_vertex_layout_handle_t,
3284 );
3285}
3286extern "C" {
3287 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Dynamic vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3288 pub fn bgfx_encoder_set_dynamic_vertex_buffer(
3289 _this: *mut bgfx_encoder_t,
3290 _stream: u8,
3291 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3292 _startVertex: u32,
3293 _numVertices: u32,
3294 );
3295}
3296extern "C" {
3297 pub fn bgfx_encoder_set_dynamic_vertex_buffer_with_layout(
3298 _this: *mut bgfx_encoder_t,
3299 _stream: u8,
3300 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3301 _startVertex: u32,
3302 _numVertices: u32,
3303 _layoutHandle: bgfx_vertex_layout_handle_t,
3304 );
3305}
3306extern "C" {
3307 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _tvb Transient vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3308 pub fn bgfx_encoder_set_transient_vertex_buffer(
3309 _this: *mut bgfx_encoder_t,
3310 _stream: u8,
3311 _tvb: *const bgfx_transient_vertex_buffer_t,
3312 _startVertex: u32,
3313 _numVertices: u32,
3314 );
3315}
3316extern "C" {
3317 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _tvb Transient vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid\n handle is used, vertex layout used for creation\n of vertex buffer will be used.\n"]
3318 pub fn bgfx_encoder_set_transient_vertex_buffer_with_layout(
3319 _this: *mut bgfx_encoder_t,
3320 _stream: u8,
3321 _tvb: *const bgfx_transient_vertex_buffer_t,
3322 _startVertex: u32,
3323 _numVertices: u32,
3324 _layoutHandle: bgfx_vertex_layout_handle_t,
3325 );
3326}
3327extern "C" {
3328 #[doc = " Set number of vertices for auto generated vertices use in conjunction\n with gl_VertexID.\n @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.\n\n @param[in] _numVertices Number of vertices.\n"]
3329 pub fn bgfx_encoder_set_vertex_count(_this: *mut bgfx_encoder_t, _numVertices: u32);
3330}
3331extern "C" {
3332 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _idb Transient instance data buffer.\n @param[in] _start First instance data.\n @param[in] _num Number of data instances.\n"]
3333 pub fn bgfx_encoder_set_instance_data_buffer(
3334 _this: *mut bgfx_encoder_t,
3335 _idb: *const bgfx_instance_data_buffer_t,
3336 _start: u32,
3337 _num: u32,
3338 );
3339}
3340extern "C" {
3341 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First instance data.\n @param[in] _num Number of data instances.\n"]
3342 pub fn bgfx_encoder_set_instance_data_from_vertex_buffer(
3343 _this: *mut bgfx_encoder_t,
3344 _handle: bgfx_vertex_buffer_handle_t,
3345 _startVertex: u32,
3346 _num: u32,
3347 );
3348}
3349extern "C" {
3350 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _handle Dynamic vertex buffer.\n @param[in] _startVertex First instance data.\n @param[in] _num Number of data instances.\n"]
3351 pub fn bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(
3352 _this: *mut bgfx_encoder_t,
3353 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3354 _startVertex: u32,
3355 _num: u32,
3356 );
3357}
3358extern "C" {
3359 #[doc = " Set number of instances for auto generated instances use in conjunction\n with gl_InstanceID.\n @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.\n\n @param[in] _numInstances\n"]
3360 pub fn bgfx_encoder_set_instance_count(_this: *mut bgfx_encoder_t, _numInstances: u32);
3361}
3362extern "C" {
3363 #[doc = " Set texture stage for draw primitive.\n\n @param[in] _stage Texture unit.\n @param[in] _sampler Program sampler.\n @param[in] _handle Texture handle.\n @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses\n texture sampling settings from the texture.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n"]
3364 pub fn bgfx_encoder_set_texture(
3365 _this: *mut bgfx_encoder_t,
3366 _stage: u8,
3367 _sampler: bgfx_uniform_handle_t,
3368 _handle: bgfx_texture_handle_t,
3369 _flags: u32,
3370 );
3371}
3372extern "C" {
3373 #[doc = " Submit an empty primitive for rendering. Uniforms and draw state\n will be applied but no geometry will be submitted. Useful in cases\n when no other draw/compute primitive is submitted to view, but it's\n desired to execute clear view.\n @remark\n These empty draw calls will sort before ordinary draw calls.\n\n @param[in] _id View id.\n"]
3374 pub fn bgfx_encoder_touch(_this: *mut bgfx_encoder_t, _id: bgfx_view_id_t);
3375}
3376extern "C" {
3377 #[doc = " Submit primitive for rendering.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3378 pub fn bgfx_encoder_submit(
3379 _this: *mut bgfx_encoder_t,
3380 _id: bgfx_view_id_t,
3381 _program: bgfx_program_handle_t,
3382 _depth: u32,
3383 _flags: u8,
3384 );
3385}
3386extern "C" {
3387 #[doc = " Submit primitive with occlusion query for rendering.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _occlusionQuery Occlusion query.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3388 pub fn bgfx_encoder_submit_occlusion_query(
3389 _this: *mut bgfx_encoder_t,
3390 _id: bgfx_view_id_t,
3391 _program: bgfx_program_handle_t,
3392 _occlusionQuery: bgfx_occlusion_query_handle_t,
3393 _depth: u32,
3394 _flags: u8,
3395 );
3396}
3397extern "C" {
3398 #[doc = " Submit primitive for rendering with index and instance data info from\n indirect buffer.\n @attention Availability depends on: `BGFX_CAPS_DRAW_INDIRECT`.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _num Number of draws.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3399 pub fn bgfx_encoder_submit_indirect(
3400 _this: *mut bgfx_encoder_t,
3401 _id: bgfx_view_id_t,
3402 _program: bgfx_program_handle_t,
3403 _indirectHandle: bgfx_indirect_buffer_handle_t,
3404 _start: u16,
3405 _num: u16,
3406 _depth: u32,
3407 _flags: u8,
3408 );
3409}
3410extern "C" {
3411 #[doc = " Submit primitive for rendering with index and instance data info and\n draw count from indirect buffers.\n @attention Availability depends on: `BGFX_CAPS_DRAW_INDIRECT_COUNT`.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _numHandle Buffer for number of draws. Must be\n created with `BGFX_BUFFER_INDEX32` and `BGFX_BUFFER_DRAW_INDIRECT`.\n @param[in] _numIndex Element in number buffer.\n @param[in] _numMax Max number of draws.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3412 pub fn bgfx_encoder_submit_indirect_count(
3413 _this: *mut bgfx_encoder_t,
3414 _id: bgfx_view_id_t,
3415 _program: bgfx_program_handle_t,
3416 _indirectHandle: bgfx_indirect_buffer_handle_t,
3417 _start: u16,
3418 _numHandle: bgfx_index_buffer_handle_t,
3419 _numIndex: u32,
3420 _numMax: u16,
3421 _depth: u32,
3422 _flags: u8,
3423 );
3424}
3425extern "C" {
3426 #[doc = " Set compute index buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Index buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3427 pub fn bgfx_encoder_set_compute_index_buffer(
3428 _this: *mut bgfx_encoder_t,
3429 _stage: u8,
3430 _handle: bgfx_index_buffer_handle_t,
3431 _access: bgfx_access_t,
3432 );
3433}
3434extern "C" {
3435 #[doc = " Set compute vertex buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Vertex buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3436 pub fn bgfx_encoder_set_compute_vertex_buffer(
3437 _this: *mut bgfx_encoder_t,
3438 _stage: u8,
3439 _handle: bgfx_vertex_buffer_handle_t,
3440 _access: bgfx_access_t,
3441 );
3442}
3443extern "C" {
3444 #[doc = " Set compute dynamic index buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Dynamic index buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3445 pub fn bgfx_encoder_set_compute_dynamic_index_buffer(
3446 _this: *mut bgfx_encoder_t,
3447 _stage: u8,
3448 _handle: bgfx_dynamic_index_buffer_handle_t,
3449 _access: bgfx_access_t,
3450 );
3451}
3452extern "C" {
3453 #[doc = " Set compute dynamic vertex buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Dynamic vertex buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3454 pub fn bgfx_encoder_set_compute_dynamic_vertex_buffer(
3455 _this: *mut bgfx_encoder_t,
3456 _stage: u8,
3457 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3458 _access: bgfx_access_t,
3459 );
3460}
3461extern "C" {
3462 #[doc = " Set compute indirect buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Indirect buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3463 pub fn bgfx_encoder_set_compute_indirect_buffer(
3464 _this: *mut bgfx_encoder_t,
3465 _stage: u8,
3466 _handle: bgfx_indirect_buffer_handle_t,
3467 _access: bgfx_access_t,
3468 );
3469}
3470extern "C" {
3471 #[doc = " Set compute image from texture.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Texture handle.\n @param[in] _mip Mip level.\n @param[in] _access Image access. See `Access::Enum`.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n"]
3472 pub fn bgfx_encoder_set_image(
3473 _this: *mut bgfx_encoder_t,
3474 _stage: u8,
3475 _handle: bgfx_texture_handle_t,
3476 _mip: u8,
3477 _access: bgfx_access_t,
3478 _format: bgfx_texture_format_t,
3479 );
3480}
3481extern "C" {
3482 #[doc = " Dispatch compute.\n\n @param[in] _id View id.\n @param[in] _program Compute program.\n @param[in] _numX Number of groups X.\n @param[in] _numY Number of groups Y.\n @param[in] _numZ Number of groups Z.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3483 pub fn bgfx_encoder_dispatch(
3484 _this: *mut bgfx_encoder_t,
3485 _id: bgfx_view_id_t,
3486 _program: bgfx_program_handle_t,
3487 _numX: u32,
3488 _numY: u32,
3489 _numZ: u32,
3490 _flags: u8,
3491 );
3492}
3493extern "C" {
3494 #[doc = " Dispatch compute indirect.\n\n @param[in] _id View id.\n @param[in] _program Compute program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _num Number of dispatches.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3495 pub fn bgfx_encoder_dispatch_indirect(
3496 _this: *mut bgfx_encoder_t,
3497 _id: bgfx_view_id_t,
3498 _program: bgfx_program_handle_t,
3499 _indirectHandle: bgfx_indirect_buffer_handle_t,
3500 _start: u16,
3501 _num: u16,
3502 _flags: u8,
3503 );
3504}
3505extern "C" {
3506 #[doc = " Discard previously set state for draw or compute call.\n\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3507 pub fn bgfx_encoder_discard(_this: *mut bgfx_encoder_t, _flags: u8);
3508}
3509extern "C" {
3510 #[doc = " Blit 2D texture region between two 2D textures.\n @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.\n @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.\n\n @param[in] _id View id.\n @param[in] _dst Destination texture handle.\n @param[in] _dstMip Destination texture mip level.\n @param[in] _dstX Destination texture X position.\n @param[in] _dstY Destination texture Y position.\n @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube\n this argument represents destination texture cube face. For 3D texture this argument\n represents destination texture Z position.\n @param[in] _src Source texture handle.\n @param[in] _srcMip Source texture mip level.\n @param[in] _srcX Source texture X position.\n @param[in] _srcY Source texture Y position.\n @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube\n this argument represents source texture cube face. For 3D texture this argument\n represents source texture Z position.\n @param[in] _width Width of region.\n @param[in] _height Height of region.\n @param[in] _depth If texture is 3D this argument represents depth of region, otherwise it's\n unused.\n"]
3511 pub fn bgfx_encoder_blit(
3512 _this: *mut bgfx_encoder_t,
3513 _id: bgfx_view_id_t,
3514 _dst: bgfx_texture_handle_t,
3515 _dstMip: u8,
3516 _dstX: u16,
3517 _dstY: u16,
3518 _dstZ: u16,
3519 _src: bgfx_texture_handle_t,
3520 _srcMip: u8,
3521 _srcX: u16,
3522 _srcY: u16,
3523 _srcZ: u16,
3524 _width: u16,
3525 _height: u16,
3526 _depth: u16,
3527 );
3528}
3529extern "C" {
3530 #[doc = " Request screen shot of window back buffer.\n @remarks\n `bgfx::CallbackI::screenShot` must be implemented.\n @attention Frame buffer handle must be created with OS' target native window handle.\n\n @param[in] _handle Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be\n made for main window back buffer.\n @param[in] _filePath Will be passed to `bgfx::CallbackI::screenShot` callback.\n"]
3531 pub fn bgfx_request_screen_shot(
3532 _handle: bgfx_frame_buffer_handle_t,
3533 _filePath: *const ::std::os::raw::c_char,
3534 );
3535}
3536extern "C" {
3537 #[doc = " Render frame.\n @attention `bgfx::renderFrame` is blocking call. It waits for\n `bgfx::frame` to be called from API thread to process frame.\n If timeout value is passed call will timeout and return even\n if `bgfx::frame` is not called.\n @warning This call should be only used on platforms that don't\n allow creating separate rendering thread. If it is called before\n to bgfx::init, render thread won't be created by bgfx::init call.\n\n @param[in] _msecs Timeout in milliseconds.\n\n @returns Current renderer context state. See: `bgfx::RenderFrame`.\n"]
3538 pub fn bgfx_render_frame(_msecs: i32) -> bgfx_render_frame_t;
3539}
3540extern "C" {
3541 #[doc = " Set platform data.\n @warning Must be called before `bgfx::init`.\n\n @param[in] _data Platform data.\n"]
3542 pub fn bgfx_set_platform_data(_data: *const bgfx_platform_data_t);
3543}
3544extern "C" {
3545 #[doc = " Get internal data for interop.\n @attention It's expected you understand some bgfx internals before you\n use this call.\n @warning Must be called only on render thread.\n"]
3546 pub fn bgfx_get_internal_data() -> *const bgfx_internal_data_t;
3547}
3548extern "C" {
3549 #[doc = " Override internal texture with externally created texture. Previously\n created internal texture will released.\n @attention It's expected you understand some bgfx internals before you\n use this call.\n @warning Must be called only on render thread.\n\n @param[in] _handle Texture handle.\n @param[in] _ptr Native API pointer to texture.\n\n @returns Native API pointer to texture. If result is 0, texture is not created\n yet from the main thread.\n"]
3550 pub fn bgfx_override_internal_texture_ptr(_handle: bgfx_texture_handle_t, _ptr: usize)
3551 -> usize;
3552}
3553extern "C" {
3554 #[doc = " Override internal texture by creating new texture. Previously created\n internal texture will released.\n @attention It's expected you understand some bgfx internals before you\n use this call.\n @returns Native API pointer to texture. If result is 0, texture is not created yet from the\n main thread.\n @warning Must be called only on render thread.\n\n @param[in] _handle Texture handle.\n @param[in] _width Width.\n @param[in] _height Height.\n @param[in] _numMips Number of mip-maps.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n @param[in] _flags Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)\n flags. Default texture sampling mode is linear, and wrap mode is repeat.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n\n @returns Native API pointer to texture. If result is 0, texture is not created\n yet from the main thread.\n"]
3555 pub fn bgfx_override_internal_texture(
3556 _handle: bgfx_texture_handle_t,
3557 _width: u16,
3558 _height: u16,
3559 _numMips: u8,
3560 _format: bgfx_texture_format_t,
3561 _flags: u64,
3562 ) -> usize;
3563}
3564extern "C" {
3565 #[doc = " Sets a debug marker. This allows you to group graphics calls together for easy browsing in\n graphics debugging tools.\n\n @param[in] _marker Marker string.\n"]
3566 pub fn bgfx_set_marker(_marker: *const ::std::os::raw::c_char);
3567}
3568extern "C" {
3569 #[doc = " Set render states for draw primitive.\n @remarks\n 1. To set up more complex states use:\n `BGFX_STATE_ALPHA_REF(_ref)`,\n `BGFX_STATE_POINT_SIZE(_size)`,\n `BGFX_STATE_BLEND_FUNC(_src, _dst)`,\n `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,\n `BGFX_STATE_BLEND_EQUATION(_equation)`,\n `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`\n 2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend\n equation is specified.\n\n @param[in] _state State flags. Default state for primitive type is\n triangles. See: `BGFX_STATE_DEFAULT`.\n - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.\n - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.\n - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.\n - `BGFX_STATE_CULL_*` - Backface culling mode.\n - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.\n - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.\n - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.\n @param[in] _rgba Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and\n `BGFX_STATE_BLEND_INV_FACTOR` blend modes.\n"]
3570 pub fn bgfx_set_state(_state: u64, _rgba: u32);
3571}
3572extern "C" {
3573 #[doc = " Set condition for rendering.\n\n @param[in] _handle Occlusion query handle.\n @param[in] _visible Render if occlusion query is visible.\n"]
3574 pub fn bgfx_set_condition(_handle: bgfx_occlusion_query_handle_t, _visible: bool);
3575}
3576extern "C" {
3577 #[doc = " Set stencil test state.\n\n @param[in] _fstencil Front stencil state.\n @param[in] _bstencil Back stencil state. If back is set to `BGFX_STENCIL_NONE`\n _fstencil is applied to both front and back facing primitives.\n"]
3578 pub fn bgfx_set_stencil(_fstencil: u32, _bstencil: u32);
3579}
3580extern "C" {
3581 #[doc = " Set scissor for draw primitive.\n @remark\n To scissor for all primitives in view see `bgfx::setViewScissor`.\n\n @param[in] _x Position x from the left corner of the window.\n @param[in] _y Position y from the top corner of the window.\n @param[in] _width Width of view scissor region.\n @param[in] _height Height of view scissor region.\n\n @returns Scissor cache index.\n"]
3582 pub fn bgfx_set_scissor(_x: u16, _y: u16, _width: u16, _height: u16) -> u16;
3583}
3584extern "C" {
3585 #[doc = " Set scissor from cache for draw primitive.\n @remark\n To scissor for all primitives in view see `bgfx::setViewScissor`.\n\n @param[in] _cache Index in scissor cache.\n"]
3586 pub fn bgfx_set_scissor_cached(_cache: u16);
3587}
3588extern "C" {
3589 #[doc = " Set model matrix for draw primitive. If it is not called,\n the model will be rendered with an identity model matrix.\n\n @param[in] _mtx Pointer to first matrix in array.\n @param[in] _num Number of matrices in array.\n\n @returns Index into matrix cache in case the same model matrix has\n to be used for other draw primitive call.\n"]
3590 pub fn bgfx_set_transform(_mtx: *const ::std::os::raw::c_void, _num: u16) -> u32;
3591}
3592extern "C" {
3593 #[doc = " Set model matrix from matrix cache for draw primitive.\n\n @param[in] _cache Index in matrix cache.\n @param[in] _num Number of matrices from cache.\n"]
3594 pub fn bgfx_set_transform_cached(_cache: u32, _num: u16);
3595}
3596extern "C" {
3597 #[doc = " Reserve matrices in internal matrix cache.\n @attention Pointer returned can be modified until `bgfx::frame` is called.\n\n @param[out] _transform Pointer to `Transform` structure.\n @param[in] _num Number of matrices.\n\n @returns Index in matrix cache.\n"]
3598 pub fn bgfx_alloc_transform(_transform: *mut bgfx_transform_t, _num: u16) -> u32;
3599}
3600extern "C" {
3601 #[doc = " Set shader uniform parameter for draw primitive.\n\n @param[in] _handle Uniform.\n @param[in] _value Pointer to uniform data.\n @param[in] _num Number of elements. Passing `UINT16_MAX` will\n use the _num passed on uniform creation.\n"]
3602 pub fn bgfx_set_uniform(
3603 _handle: bgfx_uniform_handle_t,
3604 _value: *const ::std::os::raw::c_void,
3605 _num: u16,
3606 );
3607}
3608extern "C" {
3609 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _handle Index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3610 pub fn bgfx_set_index_buffer(
3611 _handle: bgfx_index_buffer_handle_t,
3612 _firstIndex: u32,
3613 _numIndices: u32,
3614 );
3615}
3616extern "C" {
3617 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _handle Dynamic index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3618 pub fn bgfx_set_dynamic_index_buffer(
3619 _handle: bgfx_dynamic_index_buffer_handle_t,
3620 _firstIndex: u32,
3621 _numIndices: u32,
3622 );
3623}
3624extern "C" {
3625 #[doc = " Set index buffer for draw primitive.\n\n @param[in] _tib Transient index buffer.\n @param[in] _firstIndex First index to render.\n @param[in] _numIndices Number of indices to render.\n"]
3626 pub fn bgfx_set_transient_index_buffer(
3627 _tib: *const bgfx_transient_index_buffer_t,
3628 _firstIndex: u32,
3629 _numIndices: u32,
3630 );
3631}
3632extern "C" {
3633 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3634 pub fn bgfx_set_vertex_buffer(
3635 _stream: u8,
3636 _handle: bgfx_vertex_buffer_handle_t,
3637 _startVertex: u32,
3638 _numVertices: u32,
3639 );
3640}
3641extern "C" {
3642 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid\n handle is used, vertex layout used for creation\n of vertex buffer will be used.\n"]
3643 pub fn bgfx_set_vertex_buffer_with_layout(
3644 _stream: u8,
3645 _handle: bgfx_vertex_buffer_handle_t,
3646 _startVertex: u32,
3647 _numVertices: u32,
3648 _layoutHandle: bgfx_vertex_layout_handle_t,
3649 );
3650}
3651extern "C" {
3652 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Dynamic vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3653 pub fn bgfx_set_dynamic_vertex_buffer(
3654 _stream: u8,
3655 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3656 _startVertex: u32,
3657 _numVertices: u32,
3658 );
3659}
3660extern "C" {
3661 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _handle Dynamic vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid\n handle is used, vertex layout used for creation\n of vertex buffer will be used.\n"]
3662 pub fn bgfx_set_dynamic_vertex_buffer_with_layout(
3663 _stream: u8,
3664 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3665 _startVertex: u32,
3666 _numVertices: u32,
3667 _layoutHandle: bgfx_vertex_layout_handle_t,
3668 );
3669}
3670extern "C" {
3671 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _tvb Transient vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n"]
3672 pub fn bgfx_set_transient_vertex_buffer(
3673 _stream: u8,
3674 _tvb: *const bgfx_transient_vertex_buffer_t,
3675 _startVertex: u32,
3676 _numVertices: u32,
3677 );
3678}
3679extern "C" {
3680 #[doc = " Set vertex buffer for draw primitive.\n\n @param[in] _stream Vertex stream.\n @param[in] _tvb Transient vertex buffer.\n @param[in] _startVertex First vertex to render.\n @param[in] _numVertices Number of vertices to render.\n @param[in] _layoutHandle Vertex layout for aliasing vertex buffer. If invalid\n handle is used, vertex layout used for creation\n of vertex buffer will be used.\n"]
3681 pub fn bgfx_set_transient_vertex_buffer_with_layout(
3682 _stream: u8,
3683 _tvb: *const bgfx_transient_vertex_buffer_t,
3684 _startVertex: u32,
3685 _numVertices: u32,
3686 _layoutHandle: bgfx_vertex_layout_handle_t,
3687 );
3688}
3689extern "C" {
3690 #[doc = " Set number of vertices for auto generated vertices use in conjunction\n with gl_VertexID.\n @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.\n\n @param[in] _numVertices Number of vertices.\n"]
3691 pub fn bgfx_set_vertex_count(_numVertices: u32);
3692}
3693extern "C" {
3694 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _idb Transient instance data buffer.\n @param[in] _start First instance data.\n @param[in] _num Number of data instances.\n"]
3695 pub fn bgfx_set_instance_data_buffer(
3696 _idb: *const bgfx_instance_data_buffer_t,
3697 _start: u32,
3698 _num: u32,
3699 );
3700}
3701extern "C" {
3702 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _handle Vertex buffer.\n @param[in] _startVertex First instance data.\n @param[in] _num Number of data instances.\n"]
3703 pub fn bgfx_set_instance_data_from_vertex_buffer(
3704 _handle: bgfx_vertex_buffer_handle_t,
3705 _startVertex: u32,
3706 _num: u32,
3707 );
3708}
3709extern "C" {
3710 #[doc = " Set instance data buffer for draw primitive.\n\n @param[in] _handle Dynamic vertex buffer.\n @param[in] _startVertex First instance data.\n @param[in] _num Number of data instances.\n"]
3711 pub fn bgfx_set_instance_data_from_dynamic_vertex_buffer(
3712 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3713 _startVertex: u32,
3714 _num: u32,
3715 );
3716}
3717extern "C" {
3718 #[doc = " Set number of instances for auto generated instances use in conjunction\n with gl_InstanceID.\n @attention Availability depends on: `BGFX_CAPS_VERTEX_ID`.\n\n @param[in] _numInstances\n"]
3719 pub fn bgfx_set_instance_count(_numInstances: u32);
3720}
3721extern "C" {
3722 #[doc = " Set texture stage for draw primitive.\n\n @param[in] _stage Texture unit.\n @param[in] _sampler Program sampler.\n @param[in] _handle Texture handle.\n @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses\n texture sampling settings from the texture.\n - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap\n mode.\n - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic\n sampling.\n"]
3723 pub fn bgfx_set_texture(
3724 _stage: u8,
3725 _sampler: bgfx_uniform_handle_t,
3726 _handle: bgfx_texture_handle_t,
3727 _flags: u32,
3728 );
3729}
3730extern "C" {
3731 #[doc = " Submit an empty primitive for rendering. Uniforms and draw state\n will be applied but no geometry will be submitted.\n @remark\n These empty draw calls will sort before ordinary draw calls.\n\n @param[in] _id View id.\n"]
3732 pub fn bgfx_touch(_id: bgfx_view_id_t);
3733}
3734extern "C" {
3735 #[doc = " Submit primitive for rendering.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.\n"]
3736 pub fn bgfx_submit(
3737 _id: bgfx_view_id_t,
3738 _program: bgfx_program_handle_t,
3739 _depth: u32,
3740 _flags: u8,
3741 );
3742}
3743extern "C" {
3744 #[doc = " Submit primitive with occlusion query for rendering.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _occlusionQuery Occlusion query.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.\n"]
3745 pub fn bgfx_submit_occlusion_query(
3746 _id: bgfx_view_id_t,
3747 _program: bgfx_program_handle_t,
3748 _occlusionQuery: bgfx_occlusion_query_handle_t,
3749 _depth: u32,
3750 _flags: u8,
3751 );
3752}
3753extern "C" {
3754 #[doc = " Submit primitive for rendering with index and instance data info from\n indirect buffer.\n @attention Availability depends on: `BGFX_CAPS_DRAW_INDIRECT`.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _num Number of draws.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.\n"]
3755 pub fn bgfx_submit_indirect(
3756 _id: bgfx_view_id_t,
3757 _program: bgfx_program_handle_t,
3758 _indirectHandle: bgfx_indirect_buffer_handle_t,
3759 _start: u16,
3760 _num: u16,
3761 _depth: u32,
3762 _flags: u8,
3763 );
3764}
3765extern "C" {
3766 #[doc = " Submit primitive for rendering with index and instance data info and\n draw count from indirect buffers.\n @attention Availability depends on: `BGFX_CAPS_DRAW_INDIRECT_COUNT`.\n\n @param[in] _id View id.\n @param[in] _program Program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _numHandle Buffer for number of draws. Must be\n created with `BGFX_BUFFER_INDEX32` and `BGFX_BUFFER_DRAW_INDIRECT`.\n @param[in] _numIndex Element in number buffer.\n @param[in] _numMax Max number of draws.\n @param[in] _depth Depth for sorting.\n @param[in] _flags Which states to discard for next draw. See `BGFX_DISCARD_*`.\n"]
3767 pub fn bgfx_submit_indirect_count(
3768 _id: bgfx_view_id_t,
3769 _program: bgfx_program_handle_t,
3770 _indirectHandle: bgfx_indirect_buffer_handle_t,
3771 _start: u16,
3772 _numHandle: bgfx_index_buffer_handle_t,
3773 _numIndex: u32,
3774 _numMax: u16,
3775 _depth: u32,
3776 _flags: u8,
3777 );
3778}
3779extern "C" {
3780 #[doc = " Set compute index buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Index buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3781 pub fn bgfx_set_compute_index_buffer(
3782 _stage: u8,
3783 _handle: bgfx_index_buffer_handle_t,
3784 _access: bgfx_access_t,
3785 );
3786}
3787extern "C" {
3788 #[doc = " Set compute vertex buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Vertex buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3789 pub fn bgfx_set_compute_vertex_buffer(
3790 _stage: u8,
3791 _handle: bgfx_vertex_buffer_handle_t,
3792 _access: bgfx_access_t,
3793 );
3794}
3795extern "C" {
3796 #[doc = " Set compute dynamic index buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Dynamic index buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3797 pub fn bgfx_set_compute_dynamic_index_buffer(
3798 _stage: u8,
3799 _handle: bgfx_dynamic_index_buffer_handle_t,
3800 _access: bgfx_access_t,
3801 );
3802}
3803extern "C" {
3804 #[doc = " Set compute dynamic vertex buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Dynamic vertex buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3805 pub fn bgfx_set_compute_dynamic_vertex_buffer(
3806 _stage: u8,
3807 _handle: bgfx_dynamic_vertex_buffer_handle_t,
3808 _access: bgfx_access_t,
3809 );
3810}
3811extern "C" {
3812 #[doc = " Set compute indirect buffer.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Indirect buffer handle.\n @param[in] _access Buffer access. See `Access::Enum`.\n"]
3813 pub fn bgfx_set_compute_indirect_buffer(
3814 _stage: u8,
3815 _handle: bgfx_indirect_buffer_handle_t,
3816 _access: bgfx_access_t,
3817 );
3818}
3819extern "C" {
3820 #[doc = " Set compute image from texture.\n\n @param[in] _stage Compute stage.\n @param[in] _handle Texture handle.\n @param[in] _mip Mip level.\n @param[in] _access Image access. See `Access::Enum`.\n @param[in] _format Texture format. See: `TextureFormat::Enum`.\n"]
3821 pub fn bgfx_set_image(
3822 _stage: u8,
3823 _handle: bgfx_texture_handle_t,
3824 _mip: u8,
3825 _access: bgfx_access_t,
3826 _format: bgfx_texture_format_t,
3827 );
3828}
3829extern "C" {
3830 #[doc = " Dispatch compute.\n\n @param[in] _id View id.\n @param[in] _program Compute program.\n @param[in] _numX Number of groups X.\n @param[in] _numY Number of groups Y.\n @param[in] _numZ Number of groups Z.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3831 pub fn bgfx_dispatch(
3832 _id: bgfx_view_id_t,
3833 _program: bgfx_program_handle_t,
3834 _numX: u32,
3835 _numY: u32,
3836 _numZ: u32,
3837 _flags: u8,
3838 );
3839}
3840extern "C" {
3841 #[doc = " Dispatch compute indirect.\n\n @param[in] _id View id.\n @param[in] _program Compute program.\n @param[in] _indirectHandle Indirect buffer.\n @param[in] _start First element in indirect buffer.\n @param[in] _num Number of dispatches.\n @param[in] _flags Discard or preserve states. See `BGFX_DISCARD_*`.\n"]
3842 pub fn bgfx_dispatch_indirect(
3843 _id: bgfx_view_id_t,
3844 _program: bgfx_program_handle_t,
3845 _indirectHandle: bgfx_indirect_buffer_handle_t,
3846 _start: u16,
3847 _num: u16,
3848 _flags: u8,
3849 );
3850}
3851extern "C" {
3852 #[doc = " Discard previously set state for draw or compute call.\n\n @param[in] _flags Draw/compute states to discard.\n"]
3853 pub fn bgfx_discard(_flags: u8);
3854}
3855extern "C" {
3856 #[doc = " Blit 2D texture region between two 2D textures.\n @attention Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.\n @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.\n\n @param[in] _id View id.\n @param[in] _dst Destination texture handle.\n @param[in] _dstMip Destination texture mip level.\n @param[in] _dstX Destination texture X position.\n @param[in] _dstY Destination texture Y position.\n @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube\n this argument represents destination texture cube face. For 3D texture this argument\n represents destination texture Z position.\n @param[in] _src Source texture handle.\n @param[in] _srcMip Source texture mip level.\n @param[in] _srcX Source texture X position.\n @param[in] _srcY Source texture Y position.\n @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube\n this argument represents source texture cube face. For 3D texture this argument\n represents source texture Z position.\n @param[in] _width Width of region.\n @param[in] _height Height of region.\n @param[in] _depth If texture is 3D this argument represents depth of region, otherwise it's\n unused.\n"]
3857 pub fn bgfx_blit(
3858 _id: bgfx_view_id_t,
3859 _dst: bgfx_texture_handle_t,
3860 _dstMip: u8,
3861 _dstX: u16,
3862 _dstY: u16,
3863 _dstZ: u16,
3864 _src: bgfx_texture_handle_t,
3865 _srcMip: u8,
3866 _srcX: u16,
3867 _srcY: u16,
3868 _srcZ: u16,
3869 _width: u16,
3870 _height: u16,
3871 _depth: u16,
3872 );
3873}
3874pub const BGFX_FUNCTION_ID_ATTACHMENT_INIT: bgfx_function_id = 0;
3875pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_BEGIN: bgfx_function_id = 1;
3876pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_ADD: bgfx_function_id = 2;
3877pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_DECODE: bgfx_function_id = 3;
3878pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_HAS: bgfx_function_id = 4;
3879pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_SKIP: bgfx_function_id = 5;
3880pub const BGFX_FUNCTION_ID_VERTEX_LAYOUT_END: bgfx_function_id = 6;
3881pub const BGFX_FUNCTION_ID_VERTEX_PACK: bgfx_function_id = 7;
3882pub const BGFX_FUNCTION_ID_VERTEX_UNPACK: bgfx_function_id = 8;
3883pub const BGFX_FUNCTION_ID_VERTEX_CONVERT: bgfx_function_id = 9;
3884pub const BGFX_FUNCTION_ID_WELD_VERTICES: bgfx_function_id = 10;
3885pub const BGFX_FUNCTION_ID_TOPOLOGY_CONVERT: bgfx_function_id = 11;
3886pub const BGFX_FUNCTION_ID_TOPOLOGY_SORT_TRI_LIST: bgfx_function_id = 12;
3887pub const BGFX_FUNCTION_ID_GET_SUPPORTED_RENDERERS: bgfx_function_id = 13;
3888pub const BGFX_FUNCTION_ID_GET_RENDERER_NAME: bgfx_function_id = 14;
3889pub const BGFX_FUNCTION_ID_INIT_CTOR: bgfx_function_id = 15;
3890pub const BGFX_FUNCTION_ID_INIT: bgfx_function_id = 16;
3891pub const BGFX_FUNCTION_ID_SHUTDOWN: bgfx_function_id = 17;
3892pub const BGFX_FUNCTION_ID_RESET: bgfx_function_id = 18;
3893pub const BGFX_FUNCTION_ID_FRAME: bgfx_function_id = 19;
3894pub const BGFX_FUNCTION_ID_GET_RENDERER_TYPE: bgfx_function_id = 20;
3895pub const BGFX_FUNCTION_ID_GET_CAPS: bgfx_function_id = 21;
3896pub const BGFX_FUNCTION_ID_GET_STATS: bgfx_function_id = 22;
3897pub const BGFX_FUNCTION_ID_ALLOC: bgfx_function_id = 23;
3898pub const BGFX_FUNCTION_ID_COPY: bgfx_function_id = 24;
3899pub const BGFX_FUNCTION_ID_MAKE_REF: bgfx_function_id = 25;
3900pub const BGFX_FUNCTION_ID_MAKE_REF_RELEASE: bgfx_function_id = 26;
3901pub const BGFX_FUNCTION_ID_SET_DEBUG: bgfx_function_id = 27;
3902pub const BGFX_FUNCTION_ID_DBG_TEXT_CLEAR: bgfx_function_id = 28;
3903pub const BGFX_FUNCTION_ID_DBG_TEXT_PRINTF: bgfx_function_id = 29;
3904pub const BGFX_FUNCTION_ID_DBG_TEXT_VPRINTF: bgfx_function_id = 30;
3905pub const BGFX_FUNCTION_ID_DBG_TEXT_IMAGE: bgfx_function_id = 31;
3906pub const BGFX_FUNCTION_ID_CREATE_INDEX_BUFFER: bgfx_function_id = 32;
3907pub const BGFX_FUNCTION_ID_SET_INDEX_BUFFER_NAME: bgfx_function_id = 33;
3908pub const BGFX_FUNCTION_ID_DESTROY_INDEX_BUFFER: bgfx_function_id = 34;
3909pub const BGFX_FUNCTION_ID_CREATE_VERTEX_LAYOUT: bgfx_function_id = 35;
3910pub const BGFX_FUNCTION_ID_DESTROY_VERTEX_LAYOUT: bgfx_function_id = 36;
3911pub const BGFX_FUNCTION_ID_CREATE_VERTEX_BUFFER: bgfx_function_id = 37;
3912pub const BGFX_FUNCTION_ID_SET_VERTEX_BUFFER_NAME: bgfx_function_id = 38;
3913pub const BGFX_FUNCTION_ID_DESTROY_VERTEX_BUFFER: bgfx_function_id = 39;
3914pub const BGFX_FUNCTION_ID_CREATE_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 40;
3915pub const BGFX_FUNCTION_ID_CREATE_DYNAMIC_INDEX_BUFFER_MEM: bgfx_function_id = 41;
3916pub const BGFX_FUNCTION_ID_UPDATE_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 42;
3917pub const BGFX_FUNCTION_ID_DESTROY_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 43;
3918pub const BGFX_FUNCTION_ID_CREATE_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 44;
3919pub const BGFX_FUNCTION_ID_CREATE_DYNAMIC_VERTEX_BUFFER_MEM: bgfx_function_id = 45;
3920pub const BGFX_FUNCTION_ID_UPDATE_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 46;
3921pub const BGFX_FUNCTION_ID_DESTROY_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 47;
3922pub const BGFX_FUNCTION_ID_GET_AVAIL_TRANSIENT_INDEX_BUFFER: bgfx_function_id = 48;
3923pub const BGFX_FUNCTION_ID_GET_AVAIL_TRANSIENT_VERTEX_BUFFER: bgfx_function_id = 49;
3924pub const BGFX_FUNCTION_ID_GET_AVAIL_INSTANCE_DATA_BUFFER: bgfx_function_id = 50;
3925pub const BGFX_FUNCTION_ID_ALLOC_TRANSIENT_INDEX_BUFFER: bgfx_function_id = 51;
3926pub const BGFX_FUNCTION_ID_ALLOC_TRANSIENT_VERTEX_BUFFER: bgfx_function_id = 52;
3927pub const BGFX_FUNCTION_ID_ALLOC_TRANSIENT_BUFFERS: bgfx_function_id = 53;
3928pub const BGFX_FUNCTION_ID_ALLOC_INSTANCE_DATA_BUFFER: bgfx_function_id = 54;
3929pub const BGFX_FUNCTION_ID_CREATE_INDIRECT_BUFFER: bgfx_function_id = 55;
3930pub const BGFX_FUNCTION_ID_DESTROY_INDIRECT_BUFFER: bgfx_function_id = 56;
3931pub const BGFX_FUNCTION_ID_CREATE_SHADER: bgfx_function_id = 57;
3932pub const BGFX_FUNCTION_ID_GET_SHADER_UNIFORMS: bgfx_function_id = 58;
3933pub const BGFX_FUNCTION_ID_SET_SHADER_NAME: bgfx_function_id = 59;
3934pub const BGFX_FUNCTION_ID_DESTROY_SHADER: bgfx_function_id = 60;
3935pub const BGFX_FUNCTION_ID_CREATE_PROGRAM: bgfx_function_id = 61;
3936pub const BGFX_FUNCTION_ID_CREATE_COMPUTE_PROGRAM: bgfx_function_id = 62;
3937pub const BGFX_FUNCTION_ID_DESTROY_PROGRAM: bgfx_function_id = 63;
3938pub const BGFX_FUNCTION_ID_IS_TEXTURE_VALID: bgfx_function_id = 64;
3939pub const BGFX_FUNCTION_ID_IS_FRAME_BUFFER_VALID: bgfx_function_id = 65;
3940pub const BGFX_FUNCTION_ID_CALC_TEXTURE_SIZE: bgfx_function_id = 66;
3941pub const BGFX_FUNCTION_ID_CREATE_TEXTURE: bgfx_function_id = 67;
3942pub const BGFX_FUNCTION_ID_CREATE_TEXTURE_2D: bgfx_function_id = 68;
3943pub const BGFX_FUNCTION_ID_CREATE_TEXTURE_2D_SCALED: bgfx_function_id = 69;
3944pub const BGFX_FUNCTION_ID_CREATE_TEXTURE_3D: bgfx_function_id = 70;
3945pub const BGFX_FUNCTION_ID_CREATE_TEXTURE_CUBE: bgfx_function_id = 71;
3946pub const BGFX_FUNCTION_ID_UPDATE_TEXTURE_2D: bgfx_function_id = 72;
3947pub const BGFX_FUNCTION_ID_UPDATE_TEXTURE_3D: bgfx_function_id = 73;
3948pub const BGFX_FUNCTION_ID_UPDATE_TEXTURE_CUBE: bgfx_function_id = 74;
3949pub const BGFX_FUNCTION_ID_READ_TEXTURE: bgfx_function_id = 75;
3950pub const BGFX_FUNCTION_ID_SET_TEXTURE_NAME: bgfx_function_id = 76;
3951pub const BGFX_FUNCTION_ID_GET_DIRECT_ACCESS_PTR: bgfx_function_id = 77;
3952pub const BGFX_FUNCTION_ID_DESTROY_TEXTURE: bgfx_function_id = 78;
3953pub const BGFX_FUNCTION_ID_CREATE_FRAME_BUFFER: bgfx_function_id = 79;
3954pub const BGFX_FUNCTION_ID_CREATE_FRAME_BUFFER_SCALED: bgfx_function_id = 80;
3955pub const BGFX_FUNCTION_ID_CREATE_FRAME_BUFFER_FROM_HANDLES: bgfx_function_id = 81;
3956pub const BGFX_FUNCTION_ID_CREATE_FRAME_BUFFER_FROM_ATTACHMENT: bgfx_function_id = 82;
3957pub const BGFX_FUNCTION_ID_CREATE_FRAME_BUFFER_FROM_NWH: bgfx_function_id = 83;
3958pub const BGFX_FUNCTION_ID_SET_FRAME_BUFFER_NAME: bgfx_function_id = 84;
3959pub const BGFX_FUNCTION_ID_GET_TEXTURE: bgfx_function_id = 85;
3960pub const BGFX_FUNCTION_ID_DESTROY_FRAME_BUFFER: bgfx_function_id = 86;
3961pub const BGFX_FUNCTION_ID_CREATE_UNIFORM: bgfx_function_id = 87;
3962pub const BGFX_FUNCTION_ID_GET_UNIFORM_INFO: bgfx_function_id = 88;
3963pub const BGFX_FUNCTION_ID_DESTROY_UNIFORM: bgfx_function_id = 89;
3964pub const BGFX_FUNCTION_ID_CREATE_OCCLUSION_QUERY: bgfx_function_id = 90;
3965pub const BGFX_FUNCTION_ID_GET_RESULT: bgfx_function_id = 91;
3966pub const BGFX_FUNCTION_ID_DESTROY_OCCLUSION_QUERY: bgfx_function_id = 92;
3967pub const BGFX_FUNCTION_ID_SET_PALETTE_COLOR: bgfx_function_id = 93;
3968pub const BGFX_FUNCTION_ID_SET_PALETTE_COLOR_RGBA8: bgfx_function_id = 94;
3969pub const BGFX_FUNCTION_ID_SET_VIEW_NAME: bgfx_function_id = 95;
3970pub const BGFX_FUNCTION_ID_SET_VIEW_RECT: bgfx_function_id = 96;
3971pub const BGFX_FUNCTION_ID_SET_VIEW_RECT_RATIO: bgfx_function_id = 97;
3972pub const BGFX_FUNCTION_ID_SET_VIEW_SCISSOR: bgfx_function_id = 98;
3973pub const BGFX_FUNCTION_ID_SET_VIEW_CLEAR: bgfx_function_id = 99;
3974pub const BGFX_FUNCTION_ID_SET_VIEW_CLEAR_MRT: bgfx_function_id = 100;
3975pub const BGFX_FUNCTION_ID_SET_VIEW_MODE: bgfx_function_id = 101;
3976pub const BGFX_FUNCTION_ID_SET_VIEW_FRAME_BUFFER: bgfx_function_id = 102;
3977pub const BGFX_FUNCTION_ID_SET_VIEW_TRANSFORM: bgfx_function_id = 103;
3978pub const BGFX_FUNCTION_ID_SET_VIEW_ORDER: bgfx_function_id = 104;
3979pub const BGFX_FUNCTION_ID_RESET_VIEW: bgfx_function_id = 105;
3980pub const BGFX_FUNCTION_ID_ENCODER_BEGIN: bgfx_function_id = 106;
3981pub const BGFX_FUNCTION_ID_ENCODER_END: bgfx_function_id = 107;
3982pub const BGFX_FUNCTION_ID_ENCODER_SET_MARKER: bgfx_function_id = 108;
3983pub const BGFX_FUNCTION_ID_ENCODER_SET_STATE: bgfx_function_id = 109;
3984pub const BGFX_FUNCTION_ID_ENCODER_SET_CONDITION: bgfx_function_id = 110;
3985pub const BGFX_FUNCTION_ID_ENCODER_SET_STENCIL: bgfx_function_id = 111;
3986pub const BGFX_FUNCTION_ID_ENCODER_SET_SCISSOR: bgfx_function_id = 112;
3987pub const BGFX_FUNCTION_ID_ENCODER_SET_SCISSOR_CACHED: bgfx_function_id = 113;
3988pub const BGFX_FUNCTION_ID_ENCODER_SET_TRANSFORM: bgfx_function_id = 114;
3989pub const BGFX_FUNCTION_ID_ENCODER_SET_TRANSFORM_CACHED: bgfx_function_id = 115;
3990pub const BGFX_FUNCTION_ID_ENCODER_ALLOC_TRANSFORM: bgfx_function_id = 116;
3991pub const BGFX_FUNCTION_ID_ENCODER_SET_UNIFORM: bgfx_function_id = 117;
3992pub const BGFX_FUNCTION_ID_ENCODER_SET_INDEX_BUFFER: bgfx_function_id = 118;
3993pub const BGFX_FUNCTION_ID_ENCODER_SET_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 119;
3994pub const BGFX_FUNCTION_ID_ENCODER_SET_TRANSIENT_INDEX_BUFFER: bgfx_function_id = 120;
3995pub const BGFX_FUNCTION_ID_ENCODER_SET_VERTEX_BUFFER: bgfx_function_id = 121;
3996pub const BGFX_FUNCTION_ID_ENCODER_SET_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 122;
3997pub const BGFX_FUNCTION_ID_ENCODER_SET_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 123;
3998pub const BGFX_FUNCTION_ID_ENCODER_SET_DYNAMIC_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 124;
3999pub const BGFX_FUNCTION_ID_ENCODER_SET_TRANSIENT_VERTEX_BUFFER: bgfx_function_id = 125;
4000pub const BGFX_FUNCTION_ID_ENCODER_SET_TRANSIENT_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 126;
4001pub const BGFX_FUNCTION_ID_ENCODER_SET_VERTEX_COUNT: bgfx_function_id = 127;
4002pub const BGFX_FUNCTION_ID_ENCODER_SET_INSTANCE_DATA_BUFFER: bgfx_function_id = 128;
4003pub const BGFX_FUNCTION_ID_ENCODER_SET_INSTANCE_DATA_FROM_VERTEX_BUFFER: bgfx_function_id = 129;
4004pub const BGFX_FUNCTION_ID_ENCODER_SET_INSTANCE_DATA_FROM_DYNAMIC_VERTEX_BUFFER: bgfx_function_id =
4005 130;
4006pub const BGFX_FUNCTION_ID_ENCODER_SET_INSTANCE_COUNT: bgfx_function_id = 131;
4007pub const BGFX_FUNCTION_ID_ENCODER_SET_TEXTURE: bgfx_function_id = 132;
4008pub const BGFX_FUNCTION_ID_ENCODER_TOUCH: bgfx_function_id = 133;
4009pub const BGFX_FUNCTION_ID_ENCODER_SUBMIT: bgfx_function_id = 134;
4010pub const BGFX_FUNCTION_ID_ENCODER_SUBMIT_OCCLUSION_QUERY: bgfx_function_id = 135;
4011pub const BGFX_FUNCTION_ID_ENCODER_SUBMIT_INDIRECT: bgfx_function_id = 136;
4012pub const BGFX_FUNCTION_ID_ENCODER_SUBMIT_INDIRECT_COUNT: bgfx_function_id = 137;
4013pub const BGFX_FUNCTION_ID_ENCODER_SET_COMPUTE_INDEX_BUFFER: bgfx_function_id = 138;
4014pub const BGFX_FUNCTION_ID_ENCODER_SET_COMPUTE_VERTEX_BUFFER: bgfx_function_id = 139;
4015pub const BGFX_FUNCTION_ID_ENCODER_SET_COMPUTE_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 140;
4016pub const BGFX_FUNCTION_ID_ENCODER_SET_COMPUTE_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 141;
4017pub const BGFX_FUNCTION_ID_ENCODER_SET_COMPUTE_INDIRECT_BUFFER: bgfx_function_id = 142;
4018pub const BGFX_FUNCTION_ID_ENCODER_SET_IMAGE: bgfx_function_id = 143;
4019pub const BGFX_FUNCTION_ID_ENCODER_DISPATCH: bgfx_function_id = 144;
4020pub const BGFX_FUNCTION_ID_ENCODER_DISPATCH_INDIRECT: bgfx_function_id = 145;
4021pub const BGFX_FUNCTION_ID_ENCODER_DISCARD: bgfx_function_id = 146;
4022pub const BGFX_FUNCTION_ID_ENCODER_BLIT: bgfx_function_id = 147;
4023pub const BGFX_FUNCTION_ID_REQUEST_SCREEN_SHOT: bgfx_function_id = 148;
4024pub const BGFX_FUNCTION_ID_RENDER_FRAME: bgfx_function_id = 149;
4025pub const BGFX_FUNCTION_ID_SET_PLATFORM_DATA: bgfx_function_id = 150;
4026pub const BGFX_FUNCTION_ID_GET_INTERNAL_DATA: bgfx_function_id = 151;
4027pub const BGFX_FUNCTION_ID_OVERRIDE_INTERNAL_TEXTURE_PTR: bgfx_function_id = 152;
4028pub const BGFX_FUNCTION_ID_OVERRIDE_INTERNAL_TEXTURE: bgfx_function_id = 153;
4029pub const BGFX_FUNCTION_ID_SET_MARKER: bgfx_function_id = 154;
4030pub const BGFX_FUNCTION_ID_SET_STATE: bgfx_function_id = 155;
4031pub const BGFX_FUNCTION_ID_SET_CONDITION: bgfx_function_id = 156;
4032pub const BGFX_FUNCTION_ID_SET_STENCIL: bgfx_function_id = 157;
4033pub const BGFX_FUNCTION_ID_SET_SCISSOR: bgfx_function_id = 158;
4034pub const BGFX_FUNCTION_ID_SET_SCISSOR_CACHED: bgfx_function_id = 159;
4035pub const BGFX_FUNCTION_ID_SET_TRANSFORM: bgfx_function_id = 160;
4036pub const BGFX_FUNCTION_ID_SET_TRANSFORM_CACHED: bgfx_function_id = 161;
4037pub const BGFX_FUNCTION_ID_ALLOC_TRANSFORM: bgfx_function_id = 162;
4038pub const BGFX_FUNCTION_ID_SET_UNIFORM: bgfx_function_id = 163;
4039pub const BGFX_FUNCTION_ID_SET_INDEX_BUFFER: bgfx_function_id = 164;
4040pub const BGFX_FUNCTION_ID_SET_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 165;
4041pub const BGFX_FUNCTION_ID_SET_TRANSIENT_INDEX_BUFFER: bgfx_function_id = 166;
4042pub const BGFX_FUNCTION_ID_SET_VERTEX_BUFFER: bgfx_function_id = 167;
4043pub const BGFX_FUNCTION_ID_SET_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 168;
4044pub const BGFX_FUNCTION_ID_SET_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 169;
4045pub const BGFX_FUNCTION_ID_SET_DYNAMIC_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 170;
4046pub const BGFX_FUNCTION_ID_SET_TRANSIENT_VERTEX_BUFFER: bgfx_function_id = 171;
4047pub const BGFX_FUNCTION_ID_SET_TRANSIENT_VERTEX_BUFFER_WITH_LAYOUT: bgfx_function_id = 172;
4048pub const BGFX_FUNCTION_ID_SET_VERTEX_COUNT: bgfx_function_id = 173;
4049pub const BGFX_FUNCTION_ID_SET_INSTANCE_DATA_BUFFER: bgfx_function_id = 174;
4050pub const BGFX_FUNCTION_ID_SET_INSTANCE_DATA_FROM_VERTEX_BUFFER: bgfx_function_id = 175;
4051pub const BGFX_FUNCTION_ID_SET_INSTANCE_DATA_FROM_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 176;
4052pub const BGFX_FUNCTION_ID_SET_INSTANCE_COUNT: bgfx_function_id = 177;
4053pub const BGFX_FUNCTION_ID_SET_TEXTURE: bgfx_function_id = 178;
4054pub const BGFX_FUNCTION_ID_TOUCH: bgfx_function_id = 179;
4055pub const BGFX_FUNCTION_ID_SUBMIT: bgfx_function_id = 180;
4056pub const BGFX_FUNCTION_ID_SUBMIT_OCCLUSION_QUERY: bgfx_function_id = 181;
4057pub const BGFX_FUNCTION_ID_SUBMIT_INDIRECT: bgfx_function_id = 182;
4058pub const BGFX_FUNCTION_ID_SUBMIT_INDIRECT_COUNT: bgfx_function_id = 183;
4059pub const BGFX_FUNCTION_ID_SET_COMPUTE_INDEX_BUFFER: bgfx_function_id = 184;
4060pub const BGFX_FUNCTION_ID_SET_COMPUTE_VERTEX_BUFFER: bgfx_function_id = 185;
4061pub const BGFX_FUNCTION_ID_SET_COMPUTE_DYNAMIC_INDEX_BUFFER: bgfx_function_id = 186;
4062pub const BGFX_FUNCTION_ID_SET_COMPUTE_DYNAMIC_VERTEX_BUFFER: bgfx_function_id = 187;
4063pub const BGFX_FUNCTION_ID_SET_COMPUTE_INDIRECT_BUFFER: bgfx_function_id = 188;
4064pub const BGFX_FUNCTION_ID_SET_IMAGE: bgfx_function_id = 189;
4065pub const BGFX_FUNCTION_ID_DISPATCH: bgfx_function_id = 190;
4066pub const BGFX_FUNCTION_ID_DISPATCH_INDIRECT: bgfx_function_id = 191;
4067pub const BGFX_FUNCTION_ID_DISCARD: bgfx_function_id = 192;
4068pub const BGFX_FUNCTION_ID_BLIT: bgfx_function_id = 193;
4069pub const BGFX_FUNCTION_ID_COUNT: bgfx_function_id = 194;
4070pub type bgfx_function_id = ::std::os::raw::c_uint;
4071pub use self::bgfx_function_id as bgfx_function_id_t;
4072#[repr(C)]
4073#[derive(Copy, Clone)]
4074pub struct bgfx_interface_vtbl {
4075 pub attachment_init: ::std::option::Option<
4076 unsafe extern "C" fn(
4077 _this: *mut bgfx_attachment_t,
4078 _handle: bgfx_texture_handle_t,
4079 _access: bgfx_access_t,
4080 _layer: u16,
4081 _numLayers: u16,
4082 _mip: u16,
4083 _resolve: u8,
4084 ),
4085 >,
4086 pub vertex_layout_begin: ::std::option::Option<
4087 unsafe extern "C" fn(
4088 _this: *mut bgfx_vertex_layout_t,
4089 _rendererType: bgfx_renderer_type_t,
4090 ) -> *mut bgfx_vertex_layout_t,
4091 >,
4092 pub vertex_layout_add: ::std::option::Option<
4093 unsafe extern "C" fn(
4094 _this: *mut bgfx_vertex_layout_t,
4095 _attrib: bgfx_attrib_t,
4096 _num: u8,
4097 _type: bgfx_attrib_type_t,
4098 _normalized: bool,
4099 _asInt: bool,
4100 ) -> *mut bgfx_vertex_layout_t,
4101 >,
4102 pub vertex_layout_decode: ::std::option::Option<
4103 unsafe extern "C" fn(
4104 _this: *const bgfx_vertex_layout_t,
4105 _attrib: bgfx_attrib_t,
4106 _num: *mut u8,
4107 _type: *mut bgfx_attrib_type_t,
4108 _normalized: *mut bool,
4109 _asInt: *mut bool,
4110 ),
4111 >,
4112 pub vertex_layout_has: ::std::option::Option<
4113 unsafe extern "C" fn(_this: *const bgfx_vertex_layout_t, _attrib: bgfx_attrib_t) -> bool,
4114 >,
4115 pub vertex_layout_skip: ::std::option::Option<
4116 unsafe extern "C" fn(
4117 _this: *mut bgfx_vertex_layout_t,
4118 _num: u8,
4119 ) -> *mut bgfx_vertex_layout_t,
4120 >,
4121 pub vertex_layout_end:
4122 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_vertex_layout_t)>,
4123 pub vertex_pack: ::std::option::Option<
4124 unsafe extern "C" fn(
4125 _input: *const f32,
4126 _inputNormalized: bool,
4127 _attr: bgfx_attrib_t,
4128 _layout: *const bgfx_vertex_layout_t,
4129 _data: *mut ::std::os::raw::c_void,
4130 _index: u32,
4131 ),
4132 >,
4133 pub vertex_unpack: ::std::option::Option<
4134 unsafe extern "C" fn(
4135 _output: *mut f32,
4136 _attr: bgfx_attrib_t,
4137 _layout: *const bgfx_vertex_layout_t,
4138 _data: *const ::std::os::raw::c_void,
4139 _index: u32,
4140 ),
4141 >,
4142 pub vertex_convert: ::std::option::Option<
4143 unsafe extern "C" fn(
4144 _dstLayout: *const bgfx_vertex_layout_t,
4145 _dstData: *mut ::std::os::raw::c_void,
4146 _srcLayout: *const bgfx_vertex_layout_t,
4147 _srcData: *const ::std::os::raw::c_void,
4148 _num: u32,
4149 ),
4150 >,
4151 pub weld_vertices: ::std::option::Option<
4152 unsafe extern "C" fn(
4153 _output: *mut ::std::os::raw::c_void,
4154 _layout: *const bgfx_vertex_layout_t,
4155 _data: *const ::std::os::raw::c_void,
4156 _num: u32,
4157 _index32: bool,
4158 _epsilon: f32,
4159 ) -> u32,
4160 >,
4161 pub topology_convert: ::std::option::Option<
4162 unsafe extern "C" fn(
4163 _conversion: bgfx_topology_convert_t,
4164 _dst: *mut ::std::os::raw::c_void,
4165 _dstSize: u32,
4166 _indices: *const ::std::os::raw::c_void,
4167 _numIndices: u32,
4168 _index32: bool,
4169 ) -> u32,
4170 >,
4171 pub topology_sort_tri_list: ::std::option::Option<
4172 unsafe extern "C" fn(
4173 _sort: bgfx_topology_sort_t,
4174 _dst: *mut ::std::os::raw::c_void,
4175 _dstSize: u32,
4176 _dir: *const f32,
4177 _pos: *const f32,
4178 _vertices: *const ::std::os::raw::c_void,
4179 _stride: u32,
4180 _indices: *const ::std::os::raw::c_void,
4181 _numIndices: u32,
4182 _index32: bool,
4183 ),
4184 >,
4185 pub get_supported_renderers: ::std::option::Option<
4186 unsafe extern "C" fn(_max: u8, _enum: *mut bgfx_renderer_type_t) -> u8,
4187 >,
4188 pub get_renderer_name: ::std::option::Option<
4189 unsafe extern "C" fn(_type: bgfx_renderer_type_t) -> *const ::std::os::raw::c_char,
4190 >,
4191 pub init_ctor: ::std::option::Option<unsafe extern "C" fn(_init: *mut bgfx_init_t)>,
4192 pub init: ::std::option::Option<unsafe extern "C" fn(_init: *const bgfx_init_t) -> bool>,
4193 pub shutdown: ::std::option::Option<unsafe extern "C" fn()>,
4194 pub reset: ::std::option::Option<
4195 unsafe extern "C" fn(
4196 _width: u32,
4197 _height: u32,
4198 _flags: u32,
4199 _format: bgfx_texture_format_t,
4200 ),
4201 >,
4202 pub frame: ::std::option::Option<unsafe extern "C" fn(_capture: bool) -> u32>,
4203 pub get_renderer_type: ::std::option::Option<unsafe extern "C" fn() -> bgfx_renderer_type_t>,
4204 pub get_caps: ::std::option::Option<unsafe extern "C" fn() -> *const bgfx_caps_t>,
4205 pub get_stats: ::std::option::Option<unsafe extern "C" fn() -> *const bgfx_stats_t>,
4206 pub alloc: ::std::option::Option<unsafe extern "C" fn(_size: u32) -> *const bgfx_memory_t>,
4207 pub copy: ::std::option::Option<
4208 unsafe extern "C" fn(
4209 _data: *const ::std::os::raw::c_void,
4210 _size: u32,
4211 ) -> *const bgfx_memory_t,
4212 >,
4213 pub make_ref: ::std::option::Option<
4214 unsafe extern "C" fn(
4215 _data: *const ::std::os::raw::c_void,
4216 _size: u32,
4217 ) -> *const bgfx_memory_t,
4218 >,
4219 pub make_ref_release: ::std::option::Option<
4220 unsafe extern "C" fn(
4221 _data: *const ::std::os::raw::c_void,
4222 _size: u32,
4223 _releaseFn: bgfx_release_fn_t,
4224 _userData: *mut ::std::os::raw::c_void,
4225 ) -> *const bgfx_memory_t,
4226 >,
4227 pub set_debug: ::std::option::Option<unsafe extern "C" fn(_debug: u32)>,
4228 pub dbg_text_clear: ::std::option::Option<unsafe extern "C" fn(_attr: u8, _small: bool)>,
4229 pub dbg_text_printf: ::std::option::Option<
4230 unsafe extern "C" fn(
4231 _x: u16,
4232 _y: u16,
4233 _attr: u8,
4234 _format: *const ::std::os::raw::c_char,
4235 ...
4236 ),
4237 >,
4238 pub dbg_text_vprintf: ::std::option::Option<
4239 unsafe extern "C" fn(
4240 _x: u16,
4241 _y: u16,
4242 _attr: u8,
4243 _format: *const ::std::os::raw::c_char,
4244 _argList: *mut __va_list_tag,
4245 ),
4246 >,
4247 pub dbg_text_image: ::std::option::Option<
4248 unsafe extern "C" fn(
4249 _x: u16,
4250 _y: u16,
4251 _width: u16,
4252 _height: u16,
4253 _data: *const ::std::os::raw::c_void,
4254 _pitch: u16,
4255 ),
4256 >,
4257 pub create_index_buffer: ::std::option::Option<
4258 unsafe extern "C" fn(_mem: *const bgfx_memory_t, _flags: u16) -> bgfx_index_buffer_handle_t,
4259 >,
4260 pub set_index_buffer_name: ::std::option::Option<
4261 unsafe extern "C" fn(
4262 _handle: bgfx_index_buffer_handle_t,
4263 _name: *const ::std::os::raw::c_char,
4264 _len: i32,
4265 ),
4266 >,
4267 pub destroy_index_buffer:
4268 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_index_buffer_handle_t)>,
4269 pub create_vertex_layout: ::std::option::Option<
4270 unsafe extern "C" fn(_layout: *const bgfx_vertex_layout_t) -> bgfx_vertex_layout_handle_t,
4271 >,
4272 pub destroy_vertex_layout:
4273 ::std::option::Option<unsafe extern "C" fn(_layoutHandle: bgfx_vertex_layout_handle_t)>,
4274 pub create_vertex_buffer: ::std::option::Option<
4275 unsafe extern "C" fn(
4276 _mem: *const bgfx_memory_t,
4277 _layout: *const bgfx_vertex_layout_t,
4278 _flags: u16,
4279 ) -> bgfx_vertex_buffer_handle_t,
4280 >,
4281 pub set_vertex_buffer_name: ::std::option::Option<
4282 unsafe extern "C" fn(
4283 _handle: bgfx_vertex_buffer_handle_t,
4284 _name: *const ::std::os::raw::c_char,
4285 _len: i32,
4286 ),
4287 >,
4288 pub destroy_vertex_buffer:
4289 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_vertex_buffer_handle_t)>,
4290 pub create_dynamic_index_buffer: ::std::option::Option<
4291 unsafe extern "C" fn(_num: u32, _flags: u16) -> bgfx_dynamic_index_buffer_handle_t,
4292 >,
4293 pub create_dynamic_index_buffer_mem: ::std::option::Option<
4294 unsafe extern "C" fn(
4295 _mem: *const bgfx_memory_t,
4296 _flags: u16,
4297 ) -> bgfx_dynamic_index_buffer_handle_t,
4298 >,
4299 pub update_dynamic_index_buffer: ::std::option::Option<
4300 unsafe extern "C" fn(
4301 _handle: bgfx_dynamic_index_buffer_handle_t,
4302 _startIndex: u32,
4303 _mem: *const bgfx_memory_t,
4304 ),
4305 >,
4306 pub destroy_dynamic_index_buffer:
4307 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_dynamic_index_buffer_handle_t)>,
4308 pub create_dynamic_vertex_buffer: ::std::option::Option<
4309 unsafe extern "C" fn(
4310 _num: u32,
4311 _layout: *const bgfx_vertex_layout_t,
4312 _flags: u16,
4313 ) -> bgfx_dynamic_vertex_buffer_handle_t,
4314 >,
4315 pub create_dynamic_vertex_buffer_mem: ::std::option::Option<
4316 unsafe extern "C" fn(
4317 _mem: *const bgfx_memory_t,
4318 _layout: *const bgfx_vertex_layout_t,
4319 _flags: u16,
4320 ) -> bgfx_dynamic_vertex_buffer_handle_t,
4321 >,
4322 pub update_dynamic_vertex_buffer: ::std::option::Option<
4323 unsafe extern "C" fn(
4324 _handle: bgfx_dynamic_vertex_buffer_handle_t,
4325 _startVertex: u32,
4326 _mem: *const bgfx_memory_t,
4327 ),
4328 >,
4329 pub destroy_dynamic_vertex_buffer:
4330 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_dynamic_vertex_buffer_handle_t)>,
4331 pub get_avail_transient_index_buffer:
4332 ::std::option::Option<unsafe extern "C" fn(_num: u32, _index32: bool) -> u32>,
4333 pub get_avail_transient_vertex_buffer: ::std::option::Option<
4334 unsafe extern "C" fn(_num: u32, _layout: *const bgfx_vertex_layout_t) -> u32,
4335 >,
4336 pub get_avail_instance_data_buffer:
4337 ::std::option::Option<unsafe extern "C" fn(_num: u32, _stride: u16) -> u32>,
4338 pub alloc_transient_index_buffer: ::std::option::Option<
4339 unsafe extern "C" fn(_tib: *mut bgfx_transient_index_buffer_t, _num: u32, _index32: bool),
4340 >,
4341 pub alloc_transient_vertex_buffer: ::std::option::Option<
4342 unsafe extern "C" fn(
4343 _tvb: *mut bgfx_transient_vertex_buffer_t,
4344 _num: u32,
4345 _layout: *const bgfx_vertex_layout_t,
4346 ),
4347 >,
4348 pub alloc_transient_buffers: ::std::option::Option<
4349 unsafe extern "C" fn(
4350 _tvb: *mut bgfx_transient_vertex_buffer_t,
4351 _layout: *const bgfx_vertex_layout_t,
4352 _numVertices: u32,
4353 _tib: *mut bgfx_transient_index_buffer_t,
4354 _numIndices: u32,
4355 _index32: bool,
4356 ) -> bool,
4357 >,
4358 pub alloc_instance_data_buffer: ::std::option::Option<
4359 unsafe extern "C" fn(_idb: *mut bgfx_instance_data_buffer_t, _num: u32, _stride: u16),
4360 >,
4361 pub create_indirect_buffer:
4362 ::std::option::Option<unsafe extern "C" fn(_num: u32) -> bgfx_indirect_buffer_handle_t>,
4363 pub destroy_indirect_buffer:
4364 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_indirect_buffer_handle_t)>,
4365 pub create_shader: ::std::option::Option<
4366 unsafe extern "C" fn(_mem: *const bgfx_memory_t) -> bgfx_shader_handle_t,
4367 >,
4368 pub get_shader_uniforms: ::std::option::Option<
4369 unsafe extern "C" fn(
4370 _handle: bgfx_shader_handle_t,
4371 _uniforms: *mut bgfx_uniform_handle_t,
4372 _max: u16,
4373 ) -> u16,
4374 >,
4375 pub set_shader_name: ::std::option::Option<
4376 unsafe extern "C" fn(
4377 _handle: bgfx_shader_handle_t,
4378 _name: *const ::std::os::raw::c_char,
4379 _len: i32,
4380 ),
4381 >,
4382 pub destroy_shader: ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_shader_handle_t)>,
4383 pub create_program: ::std::option::Option<
4384 unsafe extern "C" fn(
4385 _vsh: bgfx_shader_handle_t,
4386 _fsh: bgfx_shader_handle_t,
4387 _destroyShaders: bool,
4388 ) -> bgfx_program_handle_t,
4389 >,
4390 pub create_compute_program: ::std::option::Option<
4391 unsafe extern "C" fn(
4392 _csh: bgfx_shader_handle_t,
4393 _destroyShaders: bool,
4394 ) -> bgfx_program_handle_t,
4395 >,
4396 pub destroy_program:
4397 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_program_handle_t)>,
4398 pub is_texture_valid: ::std::option::Option<
4399 unsafe extern "C" fn(
4400 _depth: u16,
4401 _cubeMap: bool,
4402 _numLayers: u16,
4403 _format: bgfx_texture_format_t,
4404 _flags: u64,
4405 ) -> bool,
4406 >,
4407 pub is_frame_buffer_valid: ::std::option::Option<
4408 unsafe extern "C" fn(_num: u8, _attachment: *const bgfx_attachment_t) -> bool,
4409 >,
4410 pub calc_texture_size: ::std::option::Option<
4411 unsafe extern "C" fn(
4412 _info: *mut bgfx_texture_info_t,
4413 _width: u16,
4414 _height: u16,
4415 _depth: u16,
4416 _cubeMap: bool,
4417 _hasMips: bool,
4418 _numLayers: u16,
4419 _format: bgfx_texture_format_t,
4420 ),
4421 >,
4422 pub create_texture: ::std::option::Option<
4423 unsafe extern "C" fn(
4424 _mem: *const bgfx_memory_t,
4425 _flags: u64,
4426 _skip: u8,
4427 _info: *mut bgfx_texture_info_t,
4428 ) -> bgfx_texture_handle_t,
4429 >,
4430 pub create_texture_2d: ::std::option::Option<
4431 unsafe extern "C" fn(
4432 _width: u16,
4433 _height: u16,
4434 _hasMips: bool,
4435 _numLayers: u16,
4436 _format: bgfx_texture_format_t,
4437 _flags: u64,
4438 _mem: *const bgfx_memory_t,
4439 ) -> bgfx_texture_handle_t,
4440 >,
4441 pub create_texture_2d_scaled: ::std::option::Option<
4442 unsafe extern "C" fn(
4443 _ratio: bgfx_backbuffer_ratio_t,
4444 _hasMips: bool,
4445 _numLayers: u16,
4446 _format: bgfx_texture_format_t,
4447 _flags: u64,
4448 ) -> bgfx_texture_handle_t,
4449 >,
4450 pub create_texture_3d: ::std::option::Option<
4451 unsafe extern "C" fn(
4452 _width: u16,
4453 _height: u16,
4454 _depth: u16,
4455 _hasMips: bool,
4456 _format: bgfx_texture_format_t,
4457 _flags: u64,
4458 _mem: *const bgfx_memory_t,
4459 ) -> bgfx_texture_handle_t,
4460 >,
4461 pub create_texture_cube: ::std::option::Option<
4462 unsafe extern "C" fn(
4463 _size: u16,
4464 _hasMips: bool,
4465 _numLayers: u16,
4466 _format: bgfx_texture_format_t,
4467 _flags: u64,
4468 _mem: *const bgfx_memory_t,
4469 ) -> bgfx_texture_handle_t,
4470 >,
4471 pub update_texture_2d: ::std::option::Option<
4472 unsafe extern "C" fn(
4473 _handle: bgfx_texture_handle_t,
4474 _layer: u16,
4475 _mip: u8,
4476 _x: u16,
4477 _y: u16,
4478 _width: u16,
4479 _height: u16,
4480 _mem: *const bgfx_memory_t,
4481 _pitch: u16,
4482 ),
4483 >,
4484 pub update_texture_3d: ::std::option::Option<
4485 unsafe extern "C" fn(
4486 _handle: bgfx_texture_handle_t,
4487 _mip: u8,
4488 _x: u16,
4489 _y: u16,
4490 _z: u16,
4491 _width: u16,
4492 _height: u16,
4493 _depth: u16,
4494 _mem: *const bgfx_memory_t,
4495 ),
4496 >,
4497 pub update_texture_cube: ::std::option::Option<
4498 unsafe extern "C" fn(
4499 _handle: bgfx_texture_handle_t,
4500 _layer: u16,
4501 _side: u8,
4502 _mip: u8,
4503 _x: u16,
4504 _y: u16,
4505 _width: u16,
4506 _height: u16,
4507 _mem: *const bgfx_memory_t,
4508 _pitch: u16,
4509 ),
4510 >,
4511 pub read_texture: ::std::option::Option<
4512 unsafe extern "C" fn(
4513 _handle: bgfx_texture_handle_t,
4514 _data: *mut ::std::os::raw::c_void,
4515 _mip: u8,
4516 ) -> u32,
4517 >,
4518 pub set_texture_name: ::std::option::Option<
4519 unsafe extern "C" fn(
4520 _handle: bgfx_texture_handle_t,
4521 _name: *const ::std::os::raw::c_char,
4522 _len: i32,
4523 ),
4524 >,
4525 pub get_direct_access_ptr: ::std::option::Option<
4526 unsafe extern "C" fn(_handle: bgfx_texture_handle_t) -> *mut ::std::os::raw::c_void,
4527 >,
4528 pub destroy_texture:
4529 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_texture_handle_t)>,
4530 pub create_frame_buffer: ::std::option::Option<
4531 unsafe extern "C" fn(
4532 _width: u16,
4533 _height: u16,
4534 _format: bgfx_texture_format_t,
4535 _textureFlags: u64,
4536 ) -> bgfx_frame_buffer_handle_t,
4537 >,
4538 pub create_frame_buffer_scaled: ::std::option::Option<
4539 unsafe extern "C" fn(
4540 _ratio: bgfx_backbuffer_ratio_t,
4541 _format: bgfx_texture_format_t,
4542 _textureFlags: u64,
4543 ) -> bgfx_frame_buffer_handle_t,
4544 >,
4545 pub create_frame_buffer_from_handles: ::std::option::Option<
4546 unsafe extern "C" fn(
4547 _num: u8,
4548 _handles: *const bgfx_texture_handle_t,
4549 _destroyTexture: bool,
4550 ) -> bgfx_frame_buffer_handle_t,
4551 >,
4552 pub create_frame_buffer_from_attachment: ::std::option::Option<
4553 unsafe extern "C" fn(
4554 _num: u8,
4555 _attachment: *const bgfx_attachment_t,
4556 _destroyTexture: bool,
4557 ) -> bgfx_frame_buffer_handle_t,
4558 >,
4559 pub create_frame_buffer_from_nwh: ::std::option::Option<
4560 unsafe extern "C" fn(
4561 _nwh: *mut ::std::os::raw::c_void,
4562 _width: u16,
4563 _height: u16,
4564 _format: bgfx_texture_format_t,
4565 _depthFormat: bgfx_texture_format_t,
4566 ) -> bgfx_frame_buffer_handle_t,
4567 >,
4568 pub set_frame_buffer_name: ::std::option::Option<
4569 unsafe extern "C" fn(
4570 _handle: bgfx_frame_buffer_handle_t,
4571 _name: *const ::std::os::raw::c_char,
4572 _len: i32,
4573 ),
4574 >,
4575 pub get_texture: ::std::option::Option<
4576 unsafe extern "C" fn(
4577 _handle: bgfx_frame_buffer_handle_t,
4578 _attachment: u8,
4579 ) -> bgfx_texture_handle_t,
4580 >,
4581 pub destroy_frame_buffer:
4582 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_frame_buffer_handle_t)>,
4583 pub create_uniform: ::std::option::Option<
4584 unsafe extern "C" fn(
4585 _name: *const ::std::os::raw::c_char,
4586 _type: bgfx_uniform_type_t,
4587 _num: u16,
4588 ) -> bgfx_uniform_handle_t,
4589 >,
4590 pub get_uniform_info: ::std::option::Option<
4591 unsafe extern "C" fn(_handle: bgfx_uniform_handle_t, _info: *mut bgfx_uniform_info_t),
4592 >,
4593 pub destroy_uniform:
4594 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_uniform_handle_t)>,
4595 pub create_occlusion_query:
4596 ::std::option::Option<unsafe extern "C" fn() -> bgfx_occlusion_query_handle_t>,
4597 pub get_result: ::std::option::Option<
4598 unsafe extern "C" fn(
4599 _handle: bgfx_occlusion_query_handle_t,
4600 _result: *mut i32,
4601 ) -> bgfx_occlusion_query_result_t,
4602 >,
4603 pub destroy_occlusion_query:
4604 ::std::option::Option<unsafe extern "C" fn(_handle: bgfx_occlusion_query_handle_t)>,
4605 pub set_palette_color:
4606 ::std::option::Option<unsafe extern "C" fn(_index: u8, _rgba: *const f32)>,
4607 pub set_palette_color_rgba8:
4608 ::std::option::Option<unsafe extern "C" fn(_index: u8, _rgba: u32)>,
4609 pub set_view_name: ::std::option::Option<
4610 unsafe extern "C" fn(_id: bgfx_view_id_t, _name: *const ::std::os::raw::c_char),
4611 >,
4612 pub set_view_rect: ::std::option::Option<
4613 unsafe extern "C" fn(_id: bgfx_view_id_t, _x: u16, _y: u16, _width: u16, _height: u16),
4614 >,
4615 pub set_view_rect_ratio: ::std::option::Option<
4616 unsafe extern "C" fn(
4617 _id: bgfx_view_id_t,
4618 _x: u16,
4619 _y: u16,
4620 _ratio: bgfx_backbuffer_ratio_t,
4621 ),
4622 >,
4623 pub set_view_scissor: ::std::option::Option<
4624 unsafe extern "C" fn(_id: bgfx_view_id_t, _x: u16, _y: u16, _width: u16, _height: u16),
4625 >,
4626 pub set_view_clear: ::std::option::Option<
4627 unsafe extern "C" fn(
4628 _id: bgfx_view_id_t,
4629 _flags: u16,
4630 _rgba: u32,
4631 _depth: f32,
4632 _stencil: u8,
4633 ),
4634 >,
4635 pub set_view_clear_mrt: ::std::option::Option<
4636 unsafe extern "C" fn(
4637 _id: bgfx_view_id_t,
4638 _flags: u16,
4639 _depth: f32,
4640 _stencil: u8,
4641 _c0: u8,
4642 _c1: u8,
4643 _c2: u8,
4644 _c3: u8,
4645 _c4: u8,
4646 _c5: u8,
4647 _c6: u8,
4648 _c7: u8,
4649 ),
4650 >,
4651 pub set_view_mode:
4652 ::std::option::Option<unsafe extern "C" fn(_id: bgfx_view_id_t, _mode: bgfx_view_mode_t)>,
4653 pub set_view_frame_buffer: ::std::option::Option<
4654 unsafe extern "C" fn(_id: bgfx_view_id_t, _handle: bgfx_frame_buffer_handle_t),
4655 >,
4656 pub set_view_transform: ::std::option::Option<
4657 unsafe extern "C" fn(
4658 _id: bgfx_view_id_t,
4659 _view: *const ::std::os::raw::c_void,
4660 _proj: *const ::std::os::raw::c_void,
4661 ),
4662 >,
4663 pub set_view_order: ::std::option::Option<
4664 unsafe extern "C" fn(_id: bgfx_view_id_t, _num: u16, _order: *const bgfx_view_id_t),
4665 >,
4666 pub reset_view: ::std::option::Option<unsafe extern "C" fn(_id: bgfx_view_id_t)>,
4667 pub encoder_begin:
4668 ::std::option::Option<unsafe extern "C" fn(_forThread: bool) -> *mut bgfx_encoder_t>,
4669 pub encoder_end: ::std::option::Option<unsafe extern "C" fn(_encoder: *mut bgfx_encoder_t)>,
4670 pub encoder_set_marker: ::std::option::Option<
4671 unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _marker: *const ::std::os::raw::c_char),
4672 >,
4673 pub encoder_set_state: ::std::option::Option<
4674 unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _state: u64, _rgba: u32),
4675 >,
4676 pub encoder_set_condition: ::std::option::Option<
4677 unsafe extern "C" fn(
4678 _this: *mut bgfx_encoder_t,
4679 _handle: bgfx_occlusion_query_handle_t,
4680 _visible: bool,
4681 ),
4682 >,
4683 pub encoder_set_stencil: ::std::option::Option<
4684 unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _fstencil: u32, _bstencil: u32),
4685 >,
4686 pub encoder_set_scissor: ::std::option::Option<
4687 unsafe extern "C" fn(
4688 _this: *mut bgfx_encoder_t,
4689 _x: u16,
4690 _y: u16,
4691 _width: u16,
4692 _height: u16,
4693 ) -> u16,
4694 >,
4695 pub encoder_set_scissor_cached:
4696 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _cache: u16)>,
4697 pub encoder_set_transform: ::std::option::Option<
4698 unsafe extern "C" fn(
4699 _this: *mut bgfx_encoder_t,
4700 _mtx: *const ::std::os::raw::c_void,
4701 _num: u16,
4702 ) -> u32,
4703 >,
4704 pub encoder_set_transform_cached: ::std::option::Option<
4705 unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _cache: u32, _num: u16),
4706 >,
4707 pub encoder_alloc_transform: ::std::option::Option<
4708 unsafe extern "C" fn(
4709 _this: *mut bgfx_encoder_t,
4710 _transform: *mut bgfx_transform_t,
4711 _num: u16,
4712 ) -> u32,
4713 >,
4714 pub encoder_set_uniform: ::std::option::Option<
4715 unsafe extern "C" fn(
4716 _this: *mut bgfx_encoder_t,
4717 _handle: bgfx_uniform_handle_t,
4718 _value: *const ::std::os::raw::c_void,
4719 _num: u16,
4720 ),
4721 >,
4722 pub encoder_set_index_buffer: ::std::option::Option<
4723 unsafe extern "C" fn(
4724 _this: *mut bgfx_encoder_t,
4725 _handle: bgfx_index_buffer_handle_t,
4726 _firstIndex: u32,
4727 _numIndices: u32,
4728 ),
4729 >,
4730 pub encoder_set_dynamic_index_buffer: ::std::option::Option<
4731 unsafe extern "C" fn(
4732 _this: *mut bgfx_encoder_t,
4733 _handle: bgfx_dynamic_index_buffer_handle_t,
4734 _firstIndex: u32,
4735 _numIndices: u32,
4736 ),
4737 >,
4738 pub encoder_set_transient_index_buffer: ::std::option::Option<
4739 unsafe extern "C" fn(
4740 _this: *mut bgfx_encoder_t,
4741 _tib: *const bgfx_transient_index_buffer_t,
4742 _firstIndex: u32,
4743 _numIndices: u32,
4744 ),
4745 >,
4746 pub encoder_set_vertex_buffer: ::std::option::Option<
4747 unsafe extern "C" fn(
4748 _this: *mut bgfx_encoder_t,
4749 _stream: u8,
4750 _handle: bgfx_vertex_buffer_handle_t,
4751 _startVertex: u32,
4752 _numVertices: u32,
4753 ),
4754 >,
4755 pub encoder_set_vertex_buffer_with_layout: ::std::option::Option<
4756 unsafe extern "C" fn(
4757 _this: *mut bgfx_encoder_t,
4758 _stream: u8,
4759 _handle: bgfx_vertex_buffer_handle_t,
4760 _startVertex: u32,
4761 _numVertices: u32,
4762 _layoutHandle: bgfx_vertex_layout_handle_t,
4763 ),
4764 >,
4765 pub encoder_set_dynamic_vertex_buffer: ::std::option::Option<
4766 unsafe extern "C" fn(
4767 _this: *mut bgfx_encoder_t,
4768 _stream: u8,
4769 _handle: bgfx_dynamic_vertex_buffer_handle_t,
4770 _startVertex: u32,
4771 _numVertices: u32,
4772 ),
4773 >,
4774 pub encoder_set_dynamic_vertex_buffer_with_layout: ::std::option::Option<
4775 unsafe extern "C" fn(
4776 _this: *mut bgfx_encoder_t,
4777 _stream: u8,
4778 _handle: bgfx_dynamic_vertex_buffer_handle_t,
4779 _startVertex: u32,
4780 _numVertices: u32,
4781 _layoutHandle: bgfx_vertex_layout_handle_t,
4782 ),
4783 >,
4784 pub encoder_set_transient_vertex_buffer: ::std::option::Option<
4785 unsafe extern "C" fn(
4786 _this: *mut bgfx_encoder_t,
4787 _stream: u8,
4788 _tvb: *const bgfx_transient_vertex_buffer_t,
4789 _startVertex: u32,
4790 _numVertices: u32,
4791 ),
4792 >,
4793 pub encoder_set_transient_vertex_buffer_with_layout: ::std::option::Option<
4794 unsafe extern "C" fn(
4795 _this: *mut bgfx_encoder_t,
4796 _stream: u8,
4797 _tvb: *const bgfx_transient_vertex_buffer_t,
4798 _startVertex: u32,
4799 _numVertices: u32,
4800 _layoutHandle: bgfx_vertex_layout_handle_t,
4801 ),
4802 >,
4803 pub encoder_set_vertex_count:
4804 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _numVertices: u32)>,
4805 pub encoder_set_instance_data_buffer: ::std::option::Option<
4806 unsafe extern "C" fn(
4807 _this: *mut bgfx_encoder_t,
4808 _idb: *const bgfx_instance_data_buffer_t,
4809 _start: u32,
4810 _num: u32,
4811 ),
4812 >,
4813 pub encoder_set_instance_data_from_vertex_buffer: ::std::option::Option<
4814 unsafe extern "C" fn(
4815 _this: *mut bgfx_encoder_t,
4816 _handle: bgfx_vertex_buffer_handle_t,
4817 _startVertex: u32,
4818 _num: u32,
4819 ),
4820 >,
4821 pub encoder_set_instance_data_from_dynamic_vertex_buffer: ::std::option::Option<
4822 unsafe extern "C" fn(
4823 _this: *mut bgfx_encoder_t,
4824 _handle: bgfx_dynamic_vertex_buffer_handle_t,
4825 _startVertex: u32,
4826 _num: u32,
4827 ),
4828 >,
4829 pub encoder_set_instance_count:
4830 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _numInstances: u32)>,
4831 pub encoder_set_texture: ::std::option::Option<
4832 unsafe extern "C" fn(
4833 _this: *mut bgfx_encoder_t,
4834 _stage: u8,
4835 _sampler: bgfx_uniform_handle_t,
4836 _handle: bgfx_texture_handle_t,
4837 _flags: u32,
4838 ),
4839 >,
4840 pub encoder_touch: ::std::option::Option<
4841 unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _id: bgfx_view_id_t),
4842 >,
4843 pub encoder_submit: ::std::option::Option<
4844 unsafe extern "C" fn(
4845 _this: *mut bgfx_encoder_t,
4846 _id: bgfx_view_id_t,
4847 _program: bgfx_program_handle_t,
4848 _depth: u32,
4849 _flags: u8,
4850 ),
4851 >,
4852 pub encoder_submit_occlusion_query: ::std::option::Option<
4853 unsafe extern "C" fn(
4854 _this: *mut bgfx_encoder_t,
4855 _id: bgfx_view_id_t,
4856 _program: bgfx_program_handle_t,
4857 _occlusionQuery: bgfx_occlusion_query_handle_t,
4858 _depth: u32,
4859 _flags: u8,
4860 ),
4861 >,
4862 pub encoder_submit_indirect: ::std::option::Option<
4863 unsafe extern "C" fn(
4864 _this: *mut bgfx_encoder_t,
4865 _id: bgfx_view_id_t,
4866 _program: bgfx_program_handle_t,
4867 _indirectHandle: bgfx_indirect_buffer_handle_t,
4868 _start: u16,
4869 _num: u16,
4870 _depth: u32,
4871 _flags: u8,
4872 ),
4873 >,
4874 pub encoder_submit_indirect_count: ::std::option::Option<
4875 unsafe extern "C" fn(
4876 _this: *mut bgfx_encoder_t,
4877 _id: bgfx_view_id_t,
4878 _program: bgfx_program_handle_t,
4879 _indirectHandle: bgfx_indirect_buffer_handle_t,
4880 _start: u16,
4881 _numHandle: bgfx_index_buffer_handle_t,
4882 _numIndex: u32,
4883 _numMax: u16,
4884 _depth: u32,
4885 _flags: u8,
4886 ),
4887 >,
4888 pub encoder_set_compute_index_buffer: ::std::option::Option<
4889 unsafe extern "C" fn(
4890 _this: *mut bgfx_encoder_t,
4891 _stage: u8,
4892 _handle: bgfx_index_buffer_handle_t,
4893 _access: bgfx_access_t,
4894 ),
4895 >,
4896 pub encoder_set_compute_vertex_buffer: ::std::option::Option<
4897 unsafe extern "C" fn(
4898 _this: *mut bgfx_encoder_t,
4899 _stage: u8,
4900 _handle: bgfx_vertex_buffer_handle_t,
4901 _access: bgfx_access_t,
4902 ),
4903 >,
4904 pub encoder_set_compute_dynamic_index_buffer: ::std::option::Option<
4905 unsafe extern "C" fn(
4906 _this: *mut bgfx_encoder_t,
4907 _stage: u8,
4908 _handle: bgfx_dynamic_index_buffer_handle_t,
4909 _access: bgfx_access_t,
4910 ),
4911 >,
4912 pub encoder_set_compute_dynamic_vertex_buffer: ::std::option::Option<
4913 unsafe extern "C" fn(
4914 _this: *mut bgfx_encoder_t,
4915 _stage: u8,
4916 _handle: bgfx_dynamic_vertex_buffer_handle_t,
4917 _access: bgfx_access_t,
4918 ),
4919 >,
4920 pub encoder_set_compute_indirect_buffer: ::std::option::Option<
4921 unsafe extern "C" fn(
4922 _this: *mut bgfx_encoder_t,
4923 _stage: u8,
4924 _handle: bgfx_indirect_buffer_handle_t,
4925 _access: bgfx_access_t,
4926 ),
4927 >,
4928 pub encoder_set_image: ::std::option::Option<
4929 unsafe extern "C" fn(
4930 _this: *mut bgfx_encoder_t,
4931 _stage: u8,
4932 _handle: bgfx_texture_handle_t,
4933 _mip: u8,
4934 _access: bgfx_access_t,
4935 _format: bgfx_texture_format_t,
4936 ),
4937 >,
4938 pub encoder_dispatch: ::std::option::Option<
4939 unsafe extern "C" fn(
4940 _this: *mut bgfx_encoder_t,
4941 _id: bgfx_view_id_t,
4942 _program: bgfx_program_handle_t,
4943 _numX: u32,
4944 _numY: u32,
4945 _numZ: u32,
4946 _flags: u8,
4947 ),
4948 >,
4949 pub encoder_dispatch_indirect: ::std::option::Option<
4950 unsafe extern "C" fn(
4951 _this: *mut bgfx_encoder_t,
4952 _id: bgfx_view_id_t,
4953 _program: bgfx_program_handle_t,
4954 _indirectHandle: bgfx_indirect_buffer_handle_t,
4955 _start: u16,
4956 _num: u16,
4957 _flags: u8,
4958 ),
4959 >,
4960 pub encoder_discard:
4961 ::std::option::Option<unsafe extern "C" fn(_this: *mut bgfx_encoder_t, _flags: u8)>,
4962 pub encoder_blit: ::std::option::Option<
4963 unsafe extern "C" fn(
4964 _this: *mut bgfx_encoder_t,
4965 _id: bgfx_view_id_t,
4966 _dst: bgfx_texture_handle_t,
4967 _dstMip: u8,
4968 _dstX: u16,
4969 _dstY: u16,
4970 _dstZ: u16,
4971 _src: bgfx_texture_handle_t,
4972 _srcMip: u8,
4973 _srcX: u16,
4974 _srcY: u16,
4975 _srcZ: u16,
4976 _width: u16,
4977 _height: u16,
4978 _depth: u16,
4979 ),
4980 >,
4981 pub request_screen_shot: ::std::option::Option<
4982 unsafe extern "C" fn(
4983 _handle: bgfx_frame_buffer_handle_t,
4984 _filePath: *const ::std::os::raw::c_char,
4985 ),
4986 >,
4987 pub render_frame:
4988 ::std::option::Option<unsafe extern "C" fn(_msecs: i32) -> bgfx_render_frame_t>,
4989 pub set_platform_data:
4990 ::std::option::Option<unsafe extern "C" fn(_data: *const bgfx_platform_data_t)>,
4991 pub get_internal_data:
4992 ::std::option::Option<unsafe extern "C" fn() -> *const bgfx_internal_data_t>,
4993 pub override_internal_texture_ptr: ::std::option::Option<
4994 unsafe extern "C" fn(_handle: bgfx_texture_handle_t, _ptr: usize) -> usize,
4995 >,
4996 pub override_internal_texture: ::std::option::Option<
4997 unsafe extern "C" fn(
4998 _handle: bgfx_texture_handle_t,
4999 _width: u16,
5000 _height: u16,
5001 _numMips: u8,
5002 _format: bgfx_texture_format_t,
5003 _flags: u64,
5004 ) -> usize,
5005 >,
5006 pub set_marker:
5007 ::std::option::Option<unsafe extern "C" fn(_marker: *const ::std::os::raw::c_char)>,
5008 pub set_state: ::std::option::Option<unsafe extern "C" fn(_state: u64, _rgba: u32)>,
5009 pub set_condition: ::std::option::Option<
5010 unsafe extern "C" fn(_handle: bgfx_occlusion_query_handle_t, _visible: bool),
5011 >,
5012 pub set_stencil: ::std::option::Option<unsafe extern "C" fn(_fstencil: u32, _bstencil: u32)>,
5013 pub set_scissor: ::std::option::Option<
5014 unsafe extern "C" fn(_x: u16, _y: u16, _width: u16, _height: u16) -> u16,
5015 >,
5016 pub set_scissor_cached: ::std::option::Option<unsafe extern "C" fn(_cache: u16)>,
5017 pub set_transform: ::std::option::Option<
5018 unsafe extern "C" fn(_mtx: *const ::std::os::raw::c_void, _num: u16) -> u32,
5019 >,
5020 pub set_transform_cached: ::std::option::Option<unsafe extern "C" fn(_cache: u32, _num: u16)>,
5021 pub alloc_transform: ::std::option::Option<
5022 unsafe extern "C" fn(_transform: *mut bgfx_transform_t, _num: u16) -> u32,
5023 >,
5024 pub set_uniform: ::std::option::Option<
5025 unsafe extern "C" fn(
5026 _handle: bgfx_uniform_handle_t,
5027 _value: *const ::std::os::raw::c_void,
5028 _num: u16,
5029 ),
5030 >,
5031 pub set_index_buffer: ::std::option::Option<
5032 unsafe extern "C" fn(
5033 _handle: bgfx_index_buffer_handle_t,
5034 _firstIndex: u32,
5035 _numIndices: u32,
5036 ),
5037 >,
5038 pub set_dynamic_index_buffer: ::std::option::Option<
5039 unsafe extern "C" fn(
5040 _handle: bgfx_dynamic_index_buffer_handle_t,
5041 _firstIndex: u32,
5042 _numIndices: u32,
5043 ),
5044 >,
5045 pub set_transient_index_buffer: ::std::option::Option<
5046 unsafe extern "C" fn(
5047 _tib: *const bgfx_transient_index_buffer_t,
5048 _firstIndex: u32,
5049 _numIndices: u32,
5050 ),
5051 >,
5052 pub set_vertex_buffer: ::std::option::Option<
5053 unsafe extern "C" fn(
5054 _stream: u8,
5055 _handle: bgfx_vertex_buffer_handle_t,
5056 _startVertex: u32,
5057 _numVertices: u32,
5058 ),
5059 >,
5060 pub set_vertex_buffer_with_layout: ::std::option::Option<
5061 unsafe extern "C" fn(
5062 _stream: u8,
5063 _handle: bgfx_vertex_buffer_handle_t,
5064 _startVertex: u32,
5065 _numVertices: u32,
5066 _layoutHandle: bgfx_vertex_layout_handle_t,
5067 ),
5068 >,
5069 pub set_dynamic_vertex_buffer: ::std::option::Option<
5070 unsafe extern "C" fn(
5071 _stream: u8,
5072 _handle: bgfx_dynamic_vertex_buffer_handle_t,
5073 _startVertex: u32,
5074 _numVertices: u32,
5075 ),
5076 >,
5077 pub set_dynamic_vertex_buffer_with_layout: ::std::option::Option<
5078 unsafe extern "C" fn(
5079 _stream: u8,
5080 _handle: bgfx_dynamic_vertex_buffer_handle_t,
5081 _startVertex: u32,
5082 _numVertices: u32,
5083 _layoutHandle: bgfx_vertex_layout_handle_t,
5084 ),
5085 >,
5086 pub set_transient_vertex_buffer: ::std::option::Option<
5087 unsafe extern "C" fn(
5088 _stream: u8,
5089 _tvb: *const bgfx_transient_vertex_buffer_t,
5090 _startVertex: u32,
5091 _numVertices: u32,
5092 ),
5093 >,
5094 pub set_transient_vertex_buffer_with_layout: ::std::option::Option<
5095 unsafe extern "C" fn(
5096 _stream: u8,
5097 _tvb: *const bgfx_transient_vertex_buffer_t,
5098 _startVertex: u32,
5099 _numVertices: u32,
5100 _layoutHandle: bgfx_vertex_layout_handle_t,
5101 ),
5102 >,
5103 pub set_vertex_count: ::std::option::Option<unsafe extern "C" fn(_numVertices: u32)>,
5104 pub set_instance_data_buffer: ::std::option::Option<
5105 unsafe extern "C" fn(_idb: *const bgfx_instance_data_buffer_t, _start: u32, _num: u32),
5106 >,
5107 pub set_instance_data_from_vertex_buffer: ::std::option::Option<
5108 unsafe extern "C" fn(_handle: bgfx_vertex_buffer_handle_t, _startVertex: u32, _num: u32),
5109 >,
5110 pub set_instance_data_from_dynamic_vertex_buffer: ::std::option::Option<
5111 unsafe extern "C" fn(
5112 _handle: bgfx_dynamic_vertex_buffer_handle_t,
5113 _startVertex: u32,
5114 _num: u32,
5115 ),
5116 >,
5117 pub set_instance_count: ::std::option::Option<unsafe extern "C" fn(_numInstances: u32)>,
5118 pub set_texture: ::std::option::Option<
5119 unsafe extern "C" fn(
5120 _stage: u8,
5121 _sampler: bgfx_uniform_handle_t,
5122 _handle: bgfx_texture_handle_t,
5123 _flags: u32,
5124 ),
5125 >,
5126 pub touch: ::std::option::Option<unsafe extern "C" fn(_id: bgfx_view_id_t)>,
5127 pub submit: ::std::option::Option<
5128 unsafe extern "C" fn(
5129 _id: bgfx_view_id_t,
5130 _program: bgfx_program_handle_t,
5131 _depth: u32,
5132 _flags: u8,
5133 ),
5134 >,
5135 pub submit_occlusion_query: ::std::option::Option<
5136 unsafe extern "C" fn(
5137 _id: bgfx_view_id_t,
5138 _program: bgfx_program_handle_t,
5139 _occlusionQuery: bgfx_occlusion_query_handle_t,
5140 _depth: u32,
5141 _flags: u8,
5142 ),
5143 >,
5144 pub submit_indirect: ::std::option::Option<
5145 unsafe extern "C" fn(
5146 _id: bgfx_view_id_t,
5147 _program: bgfx_program_handle_t,
5148 _indirectHandle: bgfx_indirect_buffer_handle_t,
5149 _start: u16,
5150 _num: u16,
5151 _depth: u32,
5152 _flags: u8,
5153 ),
5154 >,
5155 pub submit_indirect_count: ::std::option::Option<
5156 unsafe extern "C" fn(
5157 _id: bgfx_view_id_t,
5158 _program: bgfx_program_handle_t,
5159 _indirectHandle: bgfx_indirect_buffer_handle_t,
5160 _start: u16,
5161 _numHandle: bgfx_index_buffer_handle_t,
5162 _numIndex: u32,
5163 _numMax: u16,
5164 _depth: u32,
5165 _flags: u8,
5166 ),
5167 >,
5168 pub set_compute_index_buffer: ::std::option::Option<
5169 unsafe extern "C" fn(
5170 _stage: u8,
5171 _handle: bgfx_index_buffer_handle_t,
5172 _access: bgfx_access_t,
5173 ),
5174 >,
5175 pub set_compute_vertex_buffer: ::std::option::Option<
5176 unsafe extern "C" fn(
5177 _stage: u8,
5178 _handle: bgfx_vertex_buffer_handle_t,
5179 _access: bgfx_access_t,
5180 ),
5181 >,
5182 pub set_compute_dynamic_index_buffer: ::std::option::Option<
5183 unsafe extern "C" fn(
5184 _stage: u8,
5185 _handle: bgfx_dynamic_index_buffer_handle_t,
5186 _access: bgfx_access_t,
5187 ),
5188 >,
5189 pub set_compute_dynamic_vertex_buffer: ::std::option::Option<
5190 unsafe extern "C" fn(
5191 _stage: u8,
5192 _handle: bgfx_dynamic_vertex_buffer_handle_t,
5193 _access: bgfx_access_t,
5194 ),
5195 >,
5196 pub set_compute_indirect_buffer: ::std::option::Option<
5197 unsafe extern "C" fn(
5198 _stage: u8,
5199 _handle: bgfx_indirect_buffer_handle_t,
5200 _access: bgfx_access_t,
5201 ),
5202 >,
5203 pub set_image: ::std::option::Option<
5204 unsafe extern "C" fn(
5205 _stage: u8,
5206 _handle: bgfx_texture_handle_t,
5207 _mip: u8,
5208 _access: bgfx_access_t,
5209 _format: bgfx_texture_format_t,
5210 ),
5211 >,
5212 pub dispatch: ::std::option::Option<
5213 unsafe extern "C" fn(
5214 _id: bgfx_view_id_t,
5215 _program: bgfx_program_handle_t,
5216 _numX: u32,
5217 _numY: u32,
5218 _numZ: u32,
5219 _flags: u8,
5220 ),
5221 >,
5222 pub dispatch_indirect: ::std::option::Option<
5223 unsafe extern "C" fn(
5224 _id: bgfx_view_id_t,
5225 _program: bgfx_program_handle_t,
5226 _indirectHandle: bgfx_indirect_buffer_handle_t,
5227 _start: u16,
5228 _num: u16,
5229 _flags: u8,
5230 ),
5231 >,
5232 pub discard: ::std::option::Option<unsafe extern "C" fn(_flags: u8)>,
5233 pub blit: ::std::option::Option<
5234 unsafe extern "C" fn(
5235 _id: bgfx_view_id_t,
5236 _dst: bgfx_texture_handle_t,
5237 _dstMip: u8,
5238 _dstX: u16,
5239 _dstY: u16,
5240 _dstZ: u16,
5241 _src: bgfx_texture_handle_t,
5242 _srcMip: u8,
5243 _srcX: u16,
5244 _srcY: u16,
5245 _srcZ: u16,
5246 _width: u16,
5247 _height: u16,
5248 _depth: u16,
5249 ),
5250 >,
5251}
5252pub type PFN_BGFX_GET_INTERFACE =
5253 ::std::option::Option<unsafe extern "C" fn(_version: u32) -> *mut bgfx_interface_vtbl_t>;
5254extern "C" {
5255 pub fn bgfx_get_interface(_version: u32) -> *mut bgfx_interface_vtbl_t;
5256}
5257pub type __builtin_va_list = [__va_list_tag; 1usize];
5258#[repr(C)]
5259#[derive(Debug, Copy, Clone)]
5260pub struct __va_list_tag {
5261 pub gp_offset: ::std::os::raw::c_uint,
5262 pub fp_offset: ::std::os::raw::c_uint,
5263 pub overflow_arg_area: *mut ::std::os::raw::c_void,
5264 pub reg_save_area: *mut ::std::os::raw::c_void,
5265}