1 /*
2  *
3  * AUTO GENERATED! DO NOT EDIT!
4  *
5  */
6 
7 module bindbc.bgfx.funcs;
8 
9 private import bindbc.bgfx.types;
10 
11 extern(C) @nogc nothrow:
12 
13 version(BindBgfx_Static)
14 {
15 	/**
16 	 * Init attachment.
17 	 * Params:
18 	 * _handle = Render target texture handle.
19 	 * _access = Access. See `Access::Enum`.
20 	 * _layer = Cubemap side or depth layer/slice to use.
21 	 * _numLayers = Number of texture layer/slice(s) in array to use.
22 	 * _mip = Mip level.
23 	 * _resolve = Resolve flags. See: `BGFX_RESOLVE_*`
24 	 */
25 	void bgfx_attachment_init(bgfx_attachment_t* _this, bgfx_texture_handle_t _handle, bgfx_access_t _access, ushort _layer, ushort _numLayers, ushort _mip, byte _resolve);
26 	
27 	/**
28 	 * Start VertexLayout.
29 	 * Params:
30 	 * _rendererType = Renderer backend type. See: `bgfx::RendererType`
31 	 */
32 	bgfx_vertex_layout_t* bgfx_vertex_layout_begin(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
33 	
34 	/**
35 	 * Add attribute to VertexLayout.
36 	 * Remarks: Must be called between begin/end.
37 	 * Params:
38 	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
39 	 * _num = Number of elements 1, 2, 3 or 4.
40 	 * _type = Element type.
41 	 * _normalized = When using fixed point AttribType (f.e. Uint8)
42 	 * value will be normalized for vertex shader usage. When normalized
43 	 * is set to true, AttribType::Uint8 value in range 0-255 will be
44 	 * in range 0.0-1.0 in vertex shader.
45 	 * _asInt = Packaging rule for vertexPack, vertexUnpack, and
46 	 * vertexConvert for AttribType::Uint8 and AttribType::Int16.
47 	 * Unpacking code must be implemented inside vertex shader.
48 	 */
49 	bgfx_vertex_layout_t* bgfx_vertex_layout_add(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, byte _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
50 	
51 	/**
52 	 * Decode attribute.
53 	 * Params:
54 	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
55 	 * _num = Number of elements.
56 	 * _type = Element type.
57 	 * _normalized = Attribute is normalized.
58 	 * _asInt = Attribute is packed as int.
59 	 */
60 	void bgfx_vertex_layout_decode(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
61 	
62 	/**
63 	 * Returns `true` if VertexLayout contains attribute.
64 	 * Params:
65 	 * _attrib = Attribute semantics. See: `bgfx::Attrib`
66 	 */
67 	bool bgfx_vertex_layout_has(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib);
68 	
69 	/**
70 	 * Skip `_num` bytes in vertex stream.
71 	 * Params:
72 	 * _num = Number of bytes to skip.
73 	 */
74 	bgfx_vertex_layout_t* bgfx_vertex_layout_skip(bgfx_vertex_layout_t* _this, byte _num);
75 	
76 	/**
77 	 * End VertexLayout.
78 	 */
79 	void bgfx_vertex_layout_end(bgfx_vertex_layout_t* _this);
80 	
81 	/**
82 	 * Pack vertex attribute into vertex stream format.
83 	 * Params:
84 	 * _input = Value to be packed into vertex stream.
85 	 * _inputNormalized = `true` if input value is already normalized.
86 	 * _attr = Attribute to pack.
87 	 * _layout = Vertex stream layout.
88 	 * _data = Destination vertex stream where data will be packed.
89 	 * _index = Vertex index that will be modified.
90 	 */
91 	void bgfx_vertex_pack(const float[4] _input, bool _inputNormalized, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, void* _data, uint _index);
92 	
93 	/**
94 	 * Unpack vertex attribute from vertex stream format.
95 	 * Params:
96 	 * _output = Result of unpacking.
97 	 * _attr = Attribute to unpack.
98 	 * _layout = Vertex stream layout.
99 	 * _data = Source vertex stream from where data will be unpacked.
100 	 * _index = Vertex index that will be unpacked.
101 	 */
102 	void bgfx_vertex_unpack(float[4] _output, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _index);
103 	
104 	/**
105 	 * Converts vertex stream data from one vertex stream format to another.
106 	 * Params:
107 	 * _dstLayout = Destination vertex stream layout.
108 	 * _dstData = Destination vertex stream.
109 	 * _srcLayout = Source vertex stream layout.
110 	 * _srcData = Source vertex stream data.
111 	 * _num = Number of vertices to convert from source to destination.
112 	 */
113 	void bgfx_vertex_convert(const(bgfx_vertex_layout_t)* _dstLayout, void* _dstData, const(bgfx_vertex_layout_t)* _srcLayout, const(void)* _srcData, uint _num);
114 	
115 	/**
116 	 * Weld vertices.
117 	 * Params:
118 	 * _output = Welded vertices remapping table. The size of buffer
119 	 * must be the same as number of vertices.
120 	 * _layout = Vertex stream layout.
121 	 * _data = Vertex stream.
122 	 * _num = Number of vertices in vertex stream.
123 	 * _index32 = Set to `true` if input indices are 32-bit.
124 	 * _epsilon = Error tolerance for vertex position comparison.
125 	 */
126 	uint bgfx_weld_vertices(void* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _num, bool _index32, float _epsilon);
127 	
128 	/**
129 	 * Convert index buffer for use with different primitive topologies.
130 	 * Params:
131 	 * _conversion = Conversion type, see `TopologyConvert::Enum`.
132 	 * _dst = Destination index buffer. If this argument is NULL
133 	 * function will return number of indices after conversion.
134 	 * _dstSize = Destination index buffer in bytes. It must be
135 	 * large enough to contain output indices. If destination size is
136 	 * insufficient index buffer will be truncated.
137 	 * _indices = Source indices.
138 	 * _numIndices = Number of input indices.
139 	 * _index32 = Set to `true` if input indices are 32-bit.
140 	 */
141 	uint bgfx_topology_convert(bgfx_topology_convert_t _conversion, void* _dst, uint _dstSize, const(void)* _indices, uint _numIndices, bool _index32);
142 	
143 	/**
144 	 * Sort indices.
145 	 * Params:
146 	 * _sort = Sort order, see `TopologySort::Enum`.
147 	 * _dst = Destination index buffer.
148 	 * _dstSize = Destination index buffer in bytes. It must be
149 	 * large enough to contain output indices. If destination size is
150 	 * insufficient index buffer will be truncated.
151 	 * _dir = Direction (vector must be normalized).
152 	 * _pos = Position.
153 	 * _vertices = Pointer to first vertex represented as
154 	 * float x, y, z. Must contain at least number of vertices
155 	 * referencende by index buffer.
156 	 * _stride = Vertex stride.
157 	 * _indices = Source indices.
158 	 * _numIndices = Number of input indices.
159 	 * _index32 = Set to `true` if input indices are 32-bit.
160 	 */
161 	void bgfx_topology_sort_tri_list(bgfx_topology_sort_t _sort, void* _dst, uint _dstSize, const float[3] _dir, const float[3] _pos, const(void)* _vertices, uint _stride, const(void)* _indices, uint _numIndices, bool _index32);
162 	
163 	/**
164 	 * Returns supported backend API renderers.
165 	 * Params:
166 	 * _max = Maximum number of elements in _enum array.
167 	 * _enum = Array where supported renderers will be written.
168 	 */
169 	byte bgfx_get_supported_renderers(byte _max, bgfx_renderer_type_t* _enum);
170 	
171 	/**
172 	 * Returns name of renderer.
173 	 * Params:
174 	 * _type = Renderer backend type. See: `bgfx::RendererType`
175 	 */
176 	const(char)* bgfx_get_renderer_name(bgfx_renderer_type_t _type);
177 	
178 	void bgfx_init_ctor(bgfx_init_t* _init);
179 	
180 	/**
181 	 * Initialize bgfx library.
182 	 * Params:
183 	 * _init = Initialization parameters. See: `bgfx::Init` for more info.
184 	 */
185 	bool bgfx_init(const(bgfx_init_t)* _init);
186 	
187 	/**
188 	 * Shutdown bgfx library.
189 	 */
190 	void bgfx_shutdown();
191 	
192 	/**
193 	 * Reset graphic settings and back-buffer size.
194 	 * Attention: This call doesn't actually change window size, it just
195 	 *   resizes back-buffer. Windowing code has to change window size.
196 	 * Params:
197 	 * _width = Back-buffer width.
198 	 * _height = Back-buffer height.
199 	 * _flags = See: `BGFX_RESET_*` for more info.
200 	 *   - `BGFX_RESET_NONE` - No reset flags.
201 	 *   - `BGFX_RESET_FULLSCREEN` - Not supported yet.
202 	 *   - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
203 	 *   - `BGFX_RESET_VSYNC` - Enable V-Sync.
204 	 *   - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.
205 	 *   - `BGFX_RESET_CAPTURE` - Begin screen capture.
206 	 *   - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
207 	 *   - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag  specifies where flip
208 	 *     occurs. Default behaviour is that flip occurs before rendering new
209 	 *     frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
210 	 *   - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
211 	 * _format = Texture format. See: `TextureFormat::Enum`.
212 	 */
213 	void bgfx_reset(uint _width, uint _height, uint _flags, bgfx_texture_format_t _format);
214 	
215 	/**
216 	 * Advance to next frame. When using multithreaded renderer, this call
217 	 * just swaps internal buffers, kicks render thread, and returns. In
218 	 * singlethreaded renderer this call does frame rendering.
219 	 * Params:
220 	 * _capture = Capture frame with graphics debugger.
221 	 */
222 	uint bgfx_frame(bool _capture);
223 	
224 	/**
225 	 * Returns current renderer backend API type.
226 	 * Remarks:
227 	 *   Library must be initialized.
228 	 */
229 	bgfx_renderer_type_t bgfx_get_renderer_type();
230 	
231 	/**
232 	 * Returns renderer capabilities.
233 	 * Remarks:
234 	 *   Library must be initialized.
235 	 */
236 	const(bgfx_caps_t)* bgfx_get_caps();
237 	
238 	/**
239 	 * Returns performance counters.
240 	 * Attention: Pointer returned is valid until `bgfx::frame` is called.
241 	 */
242 	const(bgfx_stats_t)* bgfx_get_stats();
243 	
244 	/**
245 	 * Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
246 	 * Params:
247 	 * _size = Size to allocate.
248 	 */
249 	const(bgfx_memory_t)* bgfx_alloc(uint _size);
250 	
251 	/**
252 	 * Allocate buffer and copy data into it. Data will be freed inside bgfx.
253 	 * Params:
254 	 * _data = Pointer to data to be copied.
255 	 * _size = Size of data to be copied.
256 	 */
257 	const(bgfx_memory_t)* bgfx_copy(const(void)* _data, uint _size);
258 	
259 	/**
260 	 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
261 	 * doesn't allocate memory for data. It just copies the _data pointer. You
262 	 * can pass `ReleaseFn` function pointer to release this memory after it's
263 	 * consumed, otherwise you must make sure _data is available for at least 2
264 	 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
265 	 * from any thread.
266 	 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
267 	 * Params:
268 	 * _data = Pointer to data.
269 	 * _size = Size of data.
270 	 */
271 	const(bgfx_memory_t)* bgfx_make_ref(const(void)* _data, uint _size);
272 	
273 	/**
274 	 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
275 	 * doesn't allocate memory for data. It just copies the _data pointer. You
276 	 * can pass `ReleaseFn` function pointer to release this memory after it's
277 	 * consumed, otherwise you must make sure _data is available for at least 2
278 	 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
279 	 * from any thread.
280 	 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
281 	 * Params:
282 	 * _data = Pointer to data.
283 	 * _size = Size of data.
284 	 * _releaseFn = Callback function to release memory after use.
285 	 * _userData = User data to be passed to callback function.
286 	 */
287 	const(bgfx_memory_t)* bgfx_make_ref_release(const(void)* _data, uint _size, void* _releaseFn, void* _userData);
288 	
289 	/**
290 	 * Set debug flags.
291 	 * Params:
292 	 * _debug = Available flags:
293 	 *   - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set
294 	 *     all rendering calls will be skipped. This is useful when profiling
295 	 *     to quickly assess potential bottlenecks between CPU and GPU.
296 	 *   - `BGFX_DEBUG_PROFILER` - Enable profiler.
297 	 *   - `BGFX_DEBUG_STATS` - Display internal statistics.
298 	 *   - `BGFX_DEBUG_TEXT` - Display debug text.
299 	 *   - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering
300 	 *     primitives will be rendered as lines.
301 	 */
302 	void bgfx_set_debug(uint _debug);
303 	
304 	/**
305 	 * Clear internal debug text buffer.
306 	 * Params:
307 	 * _attr = Background color.
308 	 * _small = Default 8x16 or 8x8 font.
309 	 */
310 	void bgfx_dbg_text_clear(byte _attr, bool _small);
311 	
312 	/**
313 	 * Print formatted data to internal debug text character-buffer (VGA-compatible text mode).
314 	 * Params:
315 	 * _x = Position x from the left corner of the window.
316 	 * _y = Position y from the top corner of the window.
317 	 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
318 	 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
319 	 * _format = `printf` style format.
320 	 */
321 	void bgfx_dbg_text_printf(ushort _x, ushort _y, byte _attr, const(char)* _format, ... );
322 	
323 	/**
324 	 * Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).
325 	 * Params:
326 	 * _x = Position x from the left corner of the window.
327 	 * _y = Position y from the top corner of the window.
328 	 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
329 	 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
330 	 * _format = `printf` style format.
331 	 * _argList = Variable arguments list for format string.
332 	 */
333 	void bgfx_dbg_text_vprintf(ushort _x, ushort _y, byte _attr, const(char)* _format, va_list _argList);
334 	
335 	/**
336 	 * Draw image into internal debug text buffer.
337 	 * Params:
338 	 * _x = Position x from the left corner of the window.
339 	 * _y = Position y from the top corner of the window.
340 	 * _width = Image width.
341 	 * _height = Image height.
342 	 * _data = Raw image data (character/attribute raw encoding).
343 	 * _pitch = Image pitch in bytes.
344 	 */
345 	void bgfx_dbg_text_image(ushort _x, ushort _y, ushort _width, ushort _height, const(void)* _data, ushort _pitch);
346 	
347 	/**
348 	 * Create static index buffer.
349 	 * Params:
350 	 * _mem = Index buffer data.
351 	 * _flags = Buffer creation flags.
352 	 *   - `BGFX_BUFFER_NONE` - No flags.
353 	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
354 	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
355 	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
356 	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
357 	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
358 	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
359 	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
360 	 *       buffers.
361 	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
362 	 *       index buffers.
363 	 */
364 	bgfx_index_buffer_handle_t bgfx_create_index_buffer(const(bgfx_memory_t)* _mem, ushort _flags);
365 	
366 	/**
367 	 * Set static index buffer debug name.
368 	 * Params:
369 	 * _handle = Static index buffer handle.
370 	 * _name = Static index buffer name.
371 	 * _len = Static index buffer name length (if length is INT32_MAX, it's expected
372 	 * that _name is zero terminated string.
373 	 */
374 	void bgfx_set_index_buffer_name(bgfx_index_buffer_handle_t _handle, const(char)* _name, int _len);
375 	
376 	/**
377 	 * Destroy static index buffer.
378 	 * Params:
379 	 * _handle = Static index buffer handle.
380 	 */
381 	void bgfx_destroy_index_buffer(bgfx_index_buffer_handle_t _handle);
382 	
383 	/**
384 	 * Create vertex layout.
385 	 * Params:
386 	 * _layout = Vertex layout.
387 	 */
388 	bgfx_vertex_layout_handle_t bgfx_create_vertex_layout(const(bgfx_vertex_layout_t)* _layout);
389 	
390 	/**
391 	 * Destroy vertex layout.
392 	 * Params:
393 	 * _layoutHandle = Vertex layout handle.
394 	 */
395 	void bgfx_destroy_vertex_layout(bgfx_vertex_layout_handle_t _layoutHandle);
396 	
397 	/**
398 	 * Create static vertex buffer.
399 	 * Params:
400 	 * _mem = Vertex buffer data.
401 	 * _layout = Vertex layout.
402 	 * _flags = Buffer creation flags.
403 	 *  - `BGFX_BUFFER_NONE` - No flags.
404 	 *  - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
405 	 *  - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
406 	 *      is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
407 	 *  - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
408 	 *  - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
409 	 *      data is passed. If this flag is not specified, and more data is passed on update, the buffer
410 	 *      will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
411 	 *  - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.
412 	 */
413 	bgfx_vertex_buffer_handle_t bgfx_create_vertex_buffer(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
414 	
415 	/**
416 	 * Set static vertex buffer debug name.
417 	 * Params:
418 	 * _handle = Static vertex buffer handle.
419 	 * _name = Static vertex buffer name.
420 	 * _len = Static vertex buffer name length (if length is INT32_MAX, it's expected
421 	 * that _name is zero terminated string.
422 	 */
423 	void bgfx_set_vertex_buffer_name(bgfx_vertex_buffer_handle_t _handle, const(char)* _name, int _len);
424 	
425 	/**
426 	 * Destroy static vertex buffer.
427 	 * Params:
428 	 * _handle = Static vertex buffer handle.
429 	 */
430 	void bgfx_destroy_vertex_buffer(bgfx_vertex_buffer_handle_t _handle);
431 	
432 	/**
433 	 * Create empty dynamic index buffer.
434 	 * Params:
435 	 * _num = Number of indices.
436 	 * _flags = Buffer creation flags.
437 	 *   - `BGFX_BUFFER_NONE` - No flags.
438 	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
439 	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
440 	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
441 	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
442 	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
443 	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
444 	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
445 	 *       buffers.
446 	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
447 	 *       index buffers.
448 	 */
449 	bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer(uint _num, ushort _flags);
450 	
451 	/**
452 	 * Create dynamic index buffer and initialized it.
453 	 * Params:
454 	 * _mem = Index buffer data.
455 	 * _flags = Buffer creation flags.
456 	 *   - `BGFX_BUFFER_NONE` - No flags.
457 	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
458 	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
459 	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
460 	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
461 	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
462 	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
463 	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
464 	 *       buffers.
465 	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
466 	 *       index buffers.
467 	 */
468 	bgfx_dynamic_index_buffer_handle_t bgfx_create_dynamic_index_buffer_mem(const(bgfx_memory_t)* _mem, ushort _flags);
469 	
470 	/**
471 	 * Update dynamic index buffer.
472 	 * Params:
473 	 * _handle = Dynamic index buffer handle.
474 	 * _startIndex = Start index.
475 	 * _mem = Index buffer data.
476 	 */
477 	void bgfx_update_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint _startIndex, const(bgfx_memory_t)* _mem);
478 	
479 	/**
480 	 * Destroy dynamic index buffer.
481 	 * Params:
482 	 * _handle = Dynamic index buffer handle.
483 	 */
484 	void bgfx_destroy_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle);
485 	
486 	/**
487 	 * Create empty dynamic vertex buffer.
488 	 * Params:
489 	 * _num = Number of vertices.
490 	 * _layout = Vertex layout.
491 	 * _flags = Buffer creation flags.
492 	 *   - `BGFX_BUFFER_NONE` - No flags.
493 	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
494 	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
495 	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
496 	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
497 	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
498 	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
499 	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
500 	 *       buffers.
501 	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
502 	 *       index buffers.
503 	 */
504 	bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer(uint _num, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
505 	
506 	/**
507 	 * Create dynamic vertex buffer and initialize it.
508 	 * Params:
509 	 * _mem = Vertex buffer data.
510 	 * _layout = Vertex layout.
511 	 * _flags = Buffer creation flags.
512 	 *   - `BGFX_BUFFER_NONE` - No flags.
513 	 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
514 	 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
515 	 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
516 	 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
517 	 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
518 	 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
519 	 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
520 	 *       buffers.
521 	 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
522 	 *       index buffers.
523 	 */
524 	bgfx_dynamic_vertex_buffer_handle_t bgfx_create_dynamic_vertex_buffer_mem(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
525 	
526 	/**
527 	 * Update dynamic vertex buffer.
528 	 * Params:
529 	 * _handle = Dynamic vertex buffer handle.
530 	 * _startVertex = Start vertex.
531 	 * _mem = Vertex buffer data.
532 	 */
533 	void bgfx_update_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, const(bgfx_memory_t)* _mem);
534 	
535 	/**
536 	 * Destroy dynamic vertex buffer.
537 	 * Params:
538 	 * _handle = Dynamic vertex buffer handle.
539 	 */
540 	void bgfx_destroy_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle);
541 	
542 	/**
543 	 * Returns number of requested or maximum available indices.
544 	 * Params:
545 	 * _num = Number of required indices.
546 	 * _index32 = Set to `true` if input indices will be 32-bit.
547 	 */
548 	uint bgfx_get_avail_transient_index_buffer(uint _num, bool _index32);
549 	
550 	/**
551 	 * Returns number of requested or maximum available vertices.
552 	 * Params:
553 	 * _num = Number of required vertices.
554 	 * _layout = Vertex layout.
555 	 */
556 	uint bgfx_get_avail_transient_vertex_buffer(uint _num, const(bgfx_vertex_layout_t)* _layout);
557 	
558 	/**
559 	 * Returns number of requested or maximum available instance buffer slots.
560 	 * Params:
561 	 * _num = Number of required instances.
562 	 * _stride = Stride per instance.
563 	 */
564 	uint bgfx_get_avail_instance_data_buffer(uint _num, ushort _stride);
565 	
566 	/**
567 	 * Allocate transient index buffer.
568 	 * Params:
569 	 * _tib = TransientIndexBuffer structure is filled and is valid
570 	 * for the duration of frame, and it can be reused for multiple draw
571 	 * calls.
572 	 * _num = Number of indices to allocate.
573 	 * _index32 = Set to `true` if input indices will be 32-bit.
574 	 */
575 	void bgfx_alloc_transient_index_buffer(bgfx_transient_index_buffer_t* _tib, uint _num, bool _index32);
576 	
577 	/**
578 	 * Allocate transient vertex buffer.
579 	 * Params:
580 	 * _tvb = TransientVertexBuffer structure is filled and is valid
581 	 * for the duration of frame, and it can be reused for multiple draw
582 	 * calls.
583 	 * _num = Number of vertices to allocate.
584 	 * _layout = Vertex layout.
585 	 */
586 	void bgfx_alloc_transient_vertex_buffer(bgfx_transient_vertex_buffer_t* _tvb, uint _num, const(bgfx_vertex_layout_t)* _layout);
587 	
588 	/**
589 	 * Check for required space and allocate transient vertex and index
590 	 * buffers. If both space requirements are satisfied function returns
591 	 * true.
592 	 * Params:
593 	 * _tvb = TransientVertexBuffer structure is filled and is valid
594 	 * for the duration of frame, and it can be reused for multiple draw
595 	 * calls.
596 	 * _layout = Vertex layout.
597 	 * _numVertices = Number of vertices to allocate.
598 	 * _tib = TransientIndexBuffer structure is filled and is valid
599 	 * for the duration of frame, and it can be reused for multiple draw
600 	 * calls.
601 	 * _numIndices = Number of indices to allocate.
602 	 * _index32 = Set to `true` if input indices will be 32-bit.
603 	 */
604 	bool bgfx_alloc_transient_buffers(bgfx_transient_vertex_buffer_t* _tvb, const(bgfx_vertex_layout_t)* _layout, uint _numVertices, bgfx_transient_index_buffer_t* _tib, uint _numIndices, bool _index32);
605 	
606 	/**
607 	 * Allocate instance data buffer.
608 	 * Params:
609 	 * _idb = InstanceDataBuffer structure is filled and is valid
610 	 * for duration of frame, and it can be reused for multiple draw
611 	 * calls.
612 	 * _num = Number of instances.
613 	 * _stride = Instance stride. Must be multiple of 16.
614 	 */
615 	void bgfx_alloc_instance_data_buffer(bgfx_instance_data_buffer_t* _idb, uint _num, ushort _stride);
616 	
617 	/**
618 	 * Create draw indirect buffer.
619 	 * Params:
620 	 * _num = Number of indirect calls.
621 	 */
622 	bgfx_indirect_buffer_handle_t bgfx_create_indirect_buffer(uint _num);
623 	
624 	/**
625 	 * Destroy draw indirect buffer.
626 	 * Params:
627 	 * _handle = Indirect buffer handle.
628 	 */
629 	void bgfx_destroy_indirect_buffer(bgfx_indirect_buffer_handle_t _handle);
630 	
631 	/**
632 	 * Create shader from memory buffer.
633 	 * Params:
634 	 * _mem = Shader binary.
635 	 */
636 	bgfx_shader_handle_t bgfx_create_shader(const(bgfx_memory_t)* _mem);
637 	
638 	/**
639 	 * Returns the number of uniforms and uniform handles used inside a shader.
640 	 * Remarks:
641 	 *   Only non-predefined uniforms are returned.
642 	 * Params:
643 	 * _handle = Shader handle.
644 	 * _uniforms = UniformHandle array where data will be stored.
645 	 * _max = Maximum capacity of array.
646 	 */
647 	ushort bgfx_get_shader_uniforms(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, ushort _max);
648 	
649 	/**
650 	 * Set shader debug name.
651 	 * Params:
652 	 * _handle = Shader handle.
653 	 * _name = Shader name.
654 	 * _len = Shader name length (if length is INT32_MAX, it's expected
655 	 * that _name is zero terminated string).
656 	 */
657 	void bgfx_set_shader_name(bgfx_shader_handle_t _handle, const(char)* _name, int _len);
658 	
659 	/**
660 	 * Destroy shader.
661 	 * Remarks: Once a shader program is created with _handle,
662 	 *   it is safe to destroy that shader.
663 	 * Params:
664 	 * _handle = Shader handle.
665 	 */
666 	void bgfx_destroy_shader(bgfx_shader_handle_t _handle);
667 	
668 	/**
669 	 * Create program with vertex and fragment shaders.
670 	 * Params:
671 	 * _vsh = Vertex shader.
672 	 * _fsh = Fragment shader.
673 	 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
674 	 */
675 	bgfx_program_handle_t bgfx_create_program(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders);
676 	
677 	/**
678 	 * Create program with compute shader.
679 	 * Params:
680 	 * _csh = Compute shader.
681 	 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
682 	 */
683 	bgfx_program_handle_t bgfx_create_compute_program(bgfx_shader_handle_t _csh, bool _destroyShaders);
684 	
685 	/**
686 	 * Destroy program.
687 	 * Params:
688 	 * _handle = Program handle.
689 	 */
690 	void bgfx_destroy_program(bgfx_program_handle_t _handle);
691 	
692 	/**
693 	 * Validate texture parameters.
694 	 * Params:
695 	 * _depth = Depth dimension of volume texture.
696 	 * _cubeMap = Indicates that texture contains cubemap.
697 	 * _numLayers = Number of layers in texture array.
698 	 * _format = Texture format. See: `TextureFormat::Enum`.
699 	 * _flags = Texture flags. See `BGFX_TEXTURE_*`.
700 	 */
701 	bool bgfx_is_texture_valid(ushort _depth, bool _cubeMap, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
702 	
703 	/**
704 	 * Validate frame buffer parameters.
705 	 * Params:
706 	 * _num = Number of attachments.
707 	 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
708 	 */
709 	bool bgfx_is_frame_buffer_valid(byte _num, const(bgfx_attachment_t)* _attachment);
710 	
711 	/**
712 	 * Calculate amount of memory required for texture.
713 	 * Params:
714 	 * _info = Resulting texture info structure. See: `TextureInfo`.
715 	 * _width = Width.
716 	 * _height = Height.
717 	 * _depth = Depth dimension of volume texture.
718 	 * _cubeMap = Indicates that texture contains cubemap.
719 	 * _hasMips = Indicates that texture contains full mip-map chain.
720 	 * _numLayers = Number of layers in texture array.
721 	 * _format = Texture format. See: `TextureFormat::Enum`.
722 	 */
723 	void bgfx_calc_texture_size(bgfx_texture_info_t* _info, ushort _width, ushort _height, ushort _depth, bool _cubeMap, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format);
724 	
725 	/**
726 	 * Create texture from memory buffer.
727 	 * Params:
728 	 * _mem = DDS, KTX or PVR texture binary data.
729 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
730 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
731 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
732 	 *   mode.
733 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
734 	 *   sampling.
735 	 * _skip = Skip top level mips when parsing texture.
736 	 * _info = When non-`NULL` is specified it returns parsed texture information.
737 	 */
738 	bgfx_texture_handle_t bgfx_create_texture(const(bgfx_memory_t)* _mem, ulong _flags, byte _skip, bgfx_texture_info_t* _info);
739 	
740 	/**
741 	 * Create 2D texture.
742 	 * Params:
743 	 * _width = Width.
744 	 * _height = Height.
745 	 * _hasMips = Indicates that texture contains full mip-map chain.
746 	 * _numLayers = Number of layers in texture array. Must be 1 if caps
747 	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
748 	 * _format = Texture format. See: `TextureFormat::Enum`.
749 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
750 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
751 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
752 	 *   mode.
753 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
754 	 *   sampling.
755 	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
756 	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
757 	 * 1, expected memory layout is texture and all mips together for each array element.
758 	 */
759 	bgfx_texture_handle_t bgfx_create_texture_2d(ushort _width, ushort _height, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
760 	
761 	/**
762 	 * Create texture with size based on backbuffer ratio. Texture will maintain ratio
763 	 * if back buffer resolution changes.
764 	 * Params:
765 	 * _ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
766 	 * _hasMips = Indicates that texture contains full mip-map chain.
767 	 * _numLayers = Number of layers in texture array. Must be 1 if caps
768 	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
769 	 * _format = Texture format. See: `TextureFormat::Enum`.
770 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
771 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
772 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
773 	 *   mode.
774 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
775 	 *   sampling.
776 	 */
777 	bgfx_texture_handle_t bgfx_create_texture_2d_scaled(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
778 	
779 	/**
780 	 * Create 3D texture.
781 	 * Params:
782 	 * _width = Width.
783 	 * _height = Height.
784 	 * _depth = Depth.
785 	 * _hasMips = Indicates that texture contains full mip-map chain.
786 	 * _format = Texture format. See: `TextureFormat::Enum`.
787 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
788 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
789 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
790 	 *   mode.
791 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
792 	 *   sampling.
793 	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
794 	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
795 	 * 1, expected memory layout is texture and all mips together for each array element.
796 	 */
797 	bgfx_texture_handle_t bgfx_create_texture_3d(ushort _width, ushort _height, ushort _depth, bool _hasMips, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
798 	
799 	/**
800 	 * Create Cube texture.
801 	 * Params:
802 	 * _size = Cube side size.
803 	 * _hasMips = Indicates that texture contains full mip-map chain.
804 	 * _numLayers = Number of layers in texture array. Must be 1 if caps
805 	 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
806 	 * _format = Texture format. See: `TextureFormat::Enum`.
807 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
808 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
809 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
810 	 *   mode.
811 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
812 	 *   sampling.
813 	 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
814 	 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
815 	 * 1, expected memory layout is texture and all mips together for each array element.
816 	 */
817 	bgfx_texture_handle_t bgfx_create_texture_cube(ushort _size, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
818 	
819 	/**
820 	 * Update 2D texture.
821 	 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
822 	 * Params:
823 	 * _handle = Texture handle.
824 	 * _layer = Layer in texture array.
825 	 * _mip = Mip level.
826 	 * _x = X offset in texture.
827 	 * _y = Y offset in texture.
828 	 * _width = Width of texture block.
829 	 * _height = Height of texture block.
830 	 * _mem = Texture update data.
831 	 * _pitch = Pitch of input image (bytes). When _pitch is set to
832 	 * UINT16_MAX, it will be calculated internally based on _width.
833 	 */
834 	void bgfx_update_texture_2d(bgfx_texture_handle_t _handle, ushort _layer, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
835 	
836 	/**
837 	 * Update 3D texture.
838 	 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
839 	 * Params:
840 	 * _handle = Texture handle.
841 	 * _mip = Mip level.
842 	 * _x = X offset in texture.
843 	 * _y = Y offset in texture.
844 	 * _z = Z offset in texture.
845 	 * _width = Width of texture block.
846 	 * _height = Height of texture block.
847 	 * _depth = Depth of texture block.
848 	 * _mem = Texture update data.
849 	 */
850 	void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, byte _mip, ushort _x, ushort _y, ushort _z, ushort _width, ushort _height, ushort _depth, const(bgfx_memory_t)* _mem);
851 	
852 	/**
853 	 * Update Cube texture.
854 	 * Attention: It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
855 	 * Params:
856 	 * _handle = Texture handle.
857 	 * _layer = Layer in texture array.
858 	 * _side = Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,
859 	 *   where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
860 	 *                  +----------+
861 	 *                  |-z       2|
862 	 *                  | ^  +y    |
863 	 *                  | |        |    Unfolded cube:
864 	 *                  | +---->+x |
865 	 *       +----------+----------+----------+----------+
866 	 *       |+y       1|+y       4|+y       0|+y       5|
867 	 *       | ^  -x    | ^  +z    | ^  +x    | ^  -z    |
868 	 *       | |        | |        | |        | |        |
869 	 *       | +---->+z | +---->+x | +---->-z | +---->-x |
870 	 *       +----------+----------+----------+----------+
871 	 *                  |+z       3|
872 	 *                  | ^  -y    |
873 	 *                  | |        |
874 	 *                  | +---->+x |
875 	 *                  +----------+
876 	 * _mip = Mip level.
877 	 * _x = X offset in texture.
878 	 * _y = Y offset in texture.
879 	 * _width = Width of texture block.
880 	 * _height = Height of texture block.
881 	 * _mem = Texture update data.
882 	 * _pitch = Pitch of input image (bytes). When _pitch is set to
883 	 * UINT16_MAX, it will be calculated internally based on _width.
884 	 */
885 	void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, ushort _layer, byte _side, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
886 	
887 	/**
888 	 * Read back texture content.
889 	 * Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
890 	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
891 	 * Params:
892 	 * _handle = Texture handle.
893 	 * _data = Destination buffer.
894 	 * _mip = Mip level.
895 	 */
896 	uint bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data, byte _mip);
897 	
898 	/**
899 	 * Set texture debug name.
900 	 * Params:
901 	 * _handle = Texture handle.
902 	 * _name = Texture name.
903 	 * _len = Texture name length (if length is INT32_MAX, it's expected
904 	 * that _name is zero terminated string.
905 	 */
906 	void bgfx_set_texture_name(bgfx_texture_handle_t _handle, const(char)* _name, int _len);
907 	
908 	/**
909 	 * Returns texture direct access pointer.
910 	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature
911 	 *   is available on GPUs that have unified memory architecture (UMA) support.
912 	 * Params:
913 	 * _handle = Texture handle.
914 	 */
915 	void* bgfx_get_direct_access_ptr(bgfx_texture_handle_t _handle);
916 	
917 	/**
918 	 * Destroy texture.
919 	 * Params:
920 	 * _handle = Texture handle.
921 	 */
922 	void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
923 	
924 	/**
925 	 * Create frame buffer (simple).
926 	 * Params:
927 	 * _width = Texture width.
928 	 * _height = Texture height.
929 	 * _format = Texture format. See: `TextureFormat::Enum`.
930 	 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
931 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
932 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
933 	 *   mode.
934 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
935 	 *   sampling.
936 	 */
937 	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(ushort _width, ushort _height, bgfx_texture_format_t _format, ulong _textureFlags);
938 	
939 	/**
940 	 * Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
941 	 * if back buffer resolution changes.
942 	 * Params:
943 	 * _ratio = Frame buffer size in respect to back-buffer size. See:
944 	 * `BackbufferRatio::Enum`.
945 	 * _format = Texture format. See: `TextureFormat::Enum`.
946 	 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
947 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
948 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
949 	 *   mode.
950 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
951 	 *   sampling.
952 	 */
953 	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, ulong _textureFlags);
954 	
955 	/**
956 	 * Create MRT frame buffer from texture handles (simple).
957 	 * Params:
958 	 * _num = Number of texture handles.
959 	 * _handles = Texture attachments.
960 	 * _destroyTexture = If true, textures will be destroyed when
961 	 * frame buffer is destroyed.
962 	 */
963 	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(byte _num, const(bgfx_texture_handle_t)* _handles, bool _destroyTexture);
964 	
965 	/**
966 	 * Create MRT frame buffer from texture handles with specific layer and
967 	 * mip level.
968 	 * Params:
969 	 * _num = Number of attachments.
970 	 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
971 	 * _destroyTexture = If true, textures will be destroyed when
972 	 * frame buffer is destroyed.
973 	 */
974 	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_attachment(byte _num, const(bgfx_attachment_t)* _attachment, bool _destroyTexture);
975 	
976 	/**
977 	 * Create frame buffer for multiple window rendering.
978 	 * Remarks:
979 	 *   Frame buffer cannot be used for sampling.
980 	 * Attention: Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.
981 	 * Params:
982 	 * _nwh = OS' target native window handle.
983 	 * _width = Window back buffer width.
984 	 * _height = Window back buffer height.
985 	 * _format = Window back buffer color format.
986 	 * _depthFormat = Window back buffer depth format.
987 	 */
988 	bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, ushort _width, ushort _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
989 	
990 	/**
991 	 * Set frame buffer debug name.
992 	 * Params:
993 	 * _handle = Frame buffer handle.
994 	 * _name = Frame buffer name.
995 	 * _len = Frame buffer name length (if length is INT32_MAX, it's expected
996 	 * that _name is zero terminated string.
997 	 */
998 	void bgfx_set_frame_buffer_name(bgfx_frame_buffer_handle_t _handle, const(char)* _name, int _len);
999 	
1000 	/**
1001 	 * Obtain texture handle of frame buffer attachment.
1002 	 * Params:
1003 	 * _handle = Frame buffer handle.
1004 	 */
1005 	bgfx_texture_handle_t bgfx_get_texture(bgfx_frame_buffer_handle_t _handle, byte _attachment);
1006 	
1007 	/**
1008 	 * Destroy frame buffer.
1009 	 * Params:
1010 	 * _handle = Frame buffer handle.
1011 	 */
1012 	void bgfx_destroy_frame_buffer(bgfx_frame_buffer_handle_t _handle);
1013 	
1014 	/**
1015 	 * Create shader uniform parameter.
1016 	 * Remarks:
1017 	 *   1. Uniform names are unique. It's valid to call `bgfx::createUniform`
1018 	 *      multiple times with the same uniform name. The library will always
1019 	 *      return the same handle, but the handle reference count will be
1020 	 *      incremented. This means that the same number of `bgfx::destroyUniform`
1021 	 *      must be called to properly destroy the uniform.
1022 	 *   2. Predefined uniforms (declared in `bgfx_shader.sh`):
1023 	 *      - `u_viewRect vec4(x, y, width, height)` - view rectangle for current
1024 	 *        view, in pixels.
1025 	 *      - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse
1026 	 *        width and height
1027 	 *      - `u_view mat4` - view matrix
1028 	 *      - `u_invView mat4` - inverted view matrix
1029 	 *      - `u_proj mat4` - projection matrix
1030 	 *      - `u_invProj mat4` - inverted projection matrix
1031 	 *      - `u_viewProj mat4` - concatenated view projection matrix
1032 	 *      - `u_invViewProj mat4` - concatenated inverted view projection matrix
1033 	 *      - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.
1034 	 *      - `u_modelView mat4` - concatenated model view matrix, only first
1035 	 *        model matrix from array is used.
1036 	 *      - `u_modelViewProj mat4` - concatenated model view projection matrix.
1037 	 *      - `u_alphaRef float` - alpha reference value for alpha test.
1038 	 * Params:
1039 	 * _name = Uniform name in shader.
1040 	 * _type = Type of uniform (See: `bgfx::UniformType`).
1041 	 * _num = Number of elements in array.
1042 	 */
1043 	bgfx_uniform_handle_t bgfx_create_uniform(const(char)* _name, bgfx_uniform_type_t _type, ushort _num);
1044 	
1045 	/**
1046 	 * Retrieve uniform info.
1047 	 * Params:
1048 	 * _handle = Handle to uniform object.
1049 	 * _info = Uniform info.
1050 	 */
1051 	void bgfx_get_uniform_info(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
1052 	
1053 	/**
1054 	 * Destroy shader uniform parameter.
1055 	 * Params:
1056 	 * _handle = Handle to uniform object.
1057 	 */
1058 	void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle);
1059 	
1060 	/**
1061 	 * Create occlusion query.
1062 	 */
1063 	bgfx_occlusion_query_handle_t bgfx_create_occlusion_query();
1064 	
1065 	/**
1066 	 * Retrieve occlusion query result from previous frame.
1067 	 * Params:
1068 	 * _handle = Handle to occlusion query object.
1069 	 * _result = Number of pixels that passed test. This argument
1070 	 * can be `NULL` if result of occlusion query is not needed.
1071 	 */
1072 	bgfx_occlusion_query_result_t bgfx_get_result(bgfx_occlusion_query_handle_t _handle, int* _result);
1073 	
1074 	/**
1075 	 * Destroy occlusion query.
1076 	 * Params:
1077 	 * _handle = Handle to occlusion query object.
1078 	 */
1079 	void bgfx_destroy_occlusion_query(bgfx_occlusion_query_handle_t _handle);
1080 	
1081 	/**
1082 	 * Set palette color value.
1083 	 * Params:
1084 	 * _index = Index into palette.
1085 	 * _rgba = RGBA floating point values.
1086 	 */
1087 	void bgfx_set_palette_color(byte _index, const float[4] _rgba);
1088 	
1089 	/**
1090 	 * Set palette color value.
1091 	 * Params:
1092 	 * _index = Index into palette.
1093 	 * _rgba = Packed 32-bit RGBA value.
1094 	 */
1095 	void bgfx_set_palette_color_rgba8(byte _index, uint _rgba);
1096 	
1097 	/**
1098 	 * Set view name.
1099 	 * Remarks:
1100 	 *   This is debug only feature.
1101 	 *   In graphics debugger view name will appear as:
1102 	 *       "nnnc <view name>"
1103 	 *        ^  ^ ^
1104 	 *        |  +--- compute (C)
1105 	 *        +------ view id
1106 	 * Params:
1107 	 * _id = View id.
1108 	 * _name = View name.
1109 	 */
1110 	void bgfx_set_view_name(bgfx_view_id_t _id, const(char)* _name);
1111 	
1112 	/**
1113 	 * Set view rectangle. Draw primitive outside view will be clipped.
1114 	 * Params:
1115 	 * _id = View id.
1116 	 * _x = Position x from the left corner of the window.
1117 	 * _y = Position y from the top corner of the window.
1118 	 * _width = Width of view port region.
1119 	 * _height = Height of view port region.
1120 	 */
1121 	void bgfx_set_view_rect(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
1122 	
1123 	/**
1124 	 * Set view rectangle. Draw primitive outside view will be clipped.
1125 	 * Params:
1126 	 * _id = View id.
1127 	 * _x = Position x from the left corner of the window.
1128 	 * _y = Position y from the top corner of the window.
1129 	 * _ratio = Width and height will be set in respect to back-buffer size.
1130 	 * See: `BackbufferRatio::Enum`.
1131 	 */
1132 	void bgfx_set_view_rect_ratio(bgfx_view_id_t _id, ushort _x, ushort _y, bgfx_backbuffer_ratio_t _ratio);
1133 	
1134 	/**
1135 	 * Set view scissor. Draw primitive outside view will be clipped. When
1136 	 * _x, _y, _width and _height are set to 0, scissor will be disabled.
1137 	 * Params:
1138 	 * _id = View id.
1139 	 * _x = Position x from the left corner of the window.
1140 	 * _y = Position y from the top corner of the window.
1141 	 * _width = Width of view scissor region.
1142 	 * _height = Height of view scissor region.
1143 	 */
1144 	void bgfx_set_view_scissor(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
1145 	
1146 	/**
1147 	 * Set view clear flags.
1148 	 * Params:
1149 	 * _id = View id.
1150 	 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
1151 	 * operation. See: `BGFX_CLEAR_*`.
1152 	 * _rgba = Color clear value.
1153 	 * _depth = Depth clear value.
1154 	 * _stencil = Stencil clear value.
1155 	 */
1156 	void bgfx_set_view_clear(bgfx_view_id_t _id, ushort _flags, uint _rgba, float _depth, byte _stencil);
1157 	
1158 	/**
1159 	 * Set view clear flags with different clear color for each
1160 	 * frame buffer texture. Must use `bgfx::setPaletteColor` to setup clear color
1161 	 * palette.
1162 	 * Params:
1163 	 * _id = View id.
1164 	 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
1165 	 * operation. See: `BGFX_CLEAR_*`.
1166 	 * _depth = Depth clear value.
1167 	 * _stencil = Stencil clear value.
1168 	 * _c0 = Palette index for frame buffer attachment 0.
1169 	 * _c1 = Palette index for frame buffer attachment 1.
1170 	 * _c2 = Palette index for frame buffer attachment 2.
1171 	 * _c3 = Palette index for frame buffer attachment 3.
1172 	 * _c4 = Palette index for frame buffer attachment 4.
1173 	 * _c5 = Palette index for frame buffer attachment 5.
1174 	 * _c6 = Palette index for frame buffer attachment 6.
1175 	 * _c7 = Palette index for frame buffer attachment 7.
1176 	 */
1177 	void bgfx_set_view_clear_mrt(bgfx_view_id_t _id, ushort _flags, float _depth, byte _stencil, byte _c0, byte _c1, byte _c2, byte _c3, byte _c4, byte _c5, byte _c6, byte _c7);
1178 	
1179 	/**
1180 	 * Set view sorting mode.
1181 	 * Remarks:
1182 	 *   View mode must be set prior calling `bgfx::submit` for the view.
1183 	 * Params:
1184 	 * _id = View id.
1185 	 * _mode = View sort mode. See `ViewMode::Enum`.
1186 	 */
1187 	void bgfx_set_view_mode(bgfx_view_id_t _id, bgfx_view_mode_t _mode);
1188 	
1189 	/**
1190 	 * Set view frame buffer.
1191 	 * Remarks:
1192 	 *   Not persistent after `bgfx::reset` call.
1193 	 * Params:
1194 	 * _id = View id.
1195 	 * _handle = Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as
1196 	 * frame buffer handle will draw primitives from this view into
1197 	 * default back buffer.
1198 	 */
1199 	void bgfx_set_view_frame_buffer(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle);
1200 	
1201 	/**
1202 	 * Set view view and projection matrices, all draw primitives in this
1203 	 * view will use these matrices.
1204 	 * Params:
1205 	 * _id = View id.
1206 	 * _view = View matrix.
1207 	 * _proj = Projection matrix.
1208 	 */
1209 	void bgfx_set_view_transform(bgfx_view_id_t _id, const(void)* _view, const(void)* _proj);
1210 	
1211 	/**
1212 	 * Post submit view reordering.
1213 	 * Params:
1214 	 * _id = First view id.
1215 	 * _num = Number of views to remap.
1216 	 * _order = View remap id table. Passing `NULL` will reset view ids
1217 	 * to default state.
1218 	 */
1219 	void bgfx_set_view_order(bgfx_view_id_t _id, ushort _num, const(bgfx_view_id_t)* _order);
1220 	
1221 	/**
1222 	 * Reset all view settings to default.
1223 	 */
1224 	void bgfx_reset_view(bgfx_view_id_t _id);
1225 	
1226 	/**
1227 	 * Begin submitting draw calls from thread.
1228 	 * Params:
1229 	 * _forThread = Explicitly request an encoder for a worker thread.
1230 	 */
1231 	bgfx_encoder_t* bgfx_encoder_begin(bool _forThread);
1232 	
1233 	/**
1234 	 * End submitting draw calls from thread.
1235 	 * Params:
1236 	 * _encoder = Encoder.
1237 	 */
1238 	void bgfx_encoder_end(bgfx_encoder_t* _encoder);
1239 	
1240 	/**
1241 	 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
1242 	 * graphics debugging tools.
1243 	 * Params:
1244 	 * _marker = Marker string.
1245 	 */
1246 	void bgfx_encoder_set_marker(bgfx_encoder_t* _this, const(char)* _marker);
1247 	
1248 	/**
1249 	 * Set render states for draw primitive.
1250 	 * Remarks:
1251 	 *   1. To setup more complex states use:
1252 	 *      `BGFX_STATE_ALPHA_REF(_ref)`,
1253 	 *      `BGFX_STATE_POINT_SIZE(_size)`,
1254 	 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
1255 	 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
1256 	 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
1257 	 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
1258 	 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
1259 	 *      equation is specified.
1260 	 * Params:
1261 	 * _state = State flags. Default state for primitive type is
1262 	 *   triangles. See: `BGFX_STATE_DEFAULT`.
1263 	 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
1264 	 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
1265 	 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
1266 	 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
1267 	 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
1268 	 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
1269 	 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
1270 	 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
1271 	 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
1272 	 */
1273 	void bgfx_encoder_set_state(bgfx_encoder_t* _this, ulong _state, uint _rgba);
1274 	
1275 	/**
1276 	 * Set condition for rendering.
1277 	 * Params:
1278 	 * _handle = Occlusion query handle.
1279 	 * _visible = Render if occlusion query is visible.
1280 	 */
1281 	void bgfx_encoder_set_condition(bgfx_encoder_t* _this, bgfx_occlusion_query_handle_t _handle, bool _visible);
1282 	
1283 	/**
1284 	 * Set stencil test state.
1285 	 * Params:
1286 	 * _fstencil = Front stencil state.
1287 	 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
1288 	 * _fstencil is applied to both front and back facing primitives.
1289 	 */
1290 	void bgfx_encoder_set_stencil(bgfx_encoder_t* _this, uint _fstencil, uint _bstencil);
1291 	
1292 	/**
1293 	 * Set scissor for draw primitive.
1294 	 * Remarks:
1295 	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
1296 	 * Params:
1297 	 * _x = Position x from the left corner of the window.
1298 	 * _y = Position y from the top corner of the window.
1299 	 * _width = Width of view scissor region.
1300 	 * _height = Height of view scissor region.
1301 	 */
1302 	ushort bgfx_encoder_set_scissor(bgfx_encoder_t* _this, ushort _x, ushort _y, ushort _width, ushort _height);
1303 	
1304 	/**
1305 	 * Set scissor from cache for draw primitive.
1306 	 * Remarks:
1307 	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
1308 	 * Params:
1309 	 * _cache = Index in scissor cache.
1310 	 */
1311 	void bgfx_encoder_set_scissor_cached(bgfx_encoder_t* _this, ushort _cache);
1312 	
1313 	/**
1314 	 * Set model matrix for draw primitive. If it is not called,
1315 	 * the model will be rendered with an identity model matrix.
1316 	 * Params:
1317 	 * _mtx = Pointer to first matrix in array.
1318 	 * _num = Number of matrices in array.
1319 	 */
1320 	uint bgfx_encoder_set_transform(bgfx_encoder_t* _this, const(void)* _mtx, ushort _num);
1321 	
1322 	/**
1323 	 *  Set model matrix from matrix cache for draw primitive.
1324 	 * Params:
1325 	 * _cache = Index in matrix cache.
1326 	 * _num = Number of matrices from cache.
1327 	 */
1328 	void bgfx_encoder_set_transform_cached(bgfx_encoder_t* _this, uint _cache, ushort _num);
1329 	
1330 	/**
1331 	 * Reserve matrices in internal matrix cache.
1332 	 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
1333 	 * Params:
1334 	 * _transform = Pointer to `Transform` structure.
1335 	 * _num = Number of matrices.
1336 	 */
1337 	uint bgfx_encoder_alloc_transform(bgfx_encoder_t* _this, bgfx_transform_t* _transform, ushort _num);
1338 	
1339 	/**
1340 	 * Set shader uniform parameter for draw primitive.
1341 	 * Params:
1342 	 * _handle = Uniform.
1343 	 * _value = Pointer to uniform data.
1344 	 * _num = Number of elements. Passing `UINT16_MAX` will
1345 	 * use the _num passed on uniform creation.
1346 	 */
1347 	void bgfx_encoder_set_uniform(bgfx_encoder_t* _this, bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
1348 	
1349 	/**
1350 	 * Set index buffer for draw primitive.
1351 	 * Params:
1352 	 * _handle = Index buffer.
1353 	 * _firstIndex = First index to render.
1354 	 * _numIndices = Number of indices to render.
1355 	 */
1356 	void bgfx_encoder_set_index_buffer(bgfx_encoder_t* _this, bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
1357 	
1358 	/**
1359 	 * Set index buffer for draw primitive.
1360 	 * Params:
1361 	 * _handle = Dynamic index buffer.
1362 	 * _firstIndex = First index to render.
1363 	 * _numIndices = Number of indices to render.
1364 	 */
1365 	void bgfx_encoder_set_dynamic_index_buffer(bgfx_encoder_t* _this, bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
1366 	
1367 	/**
1368 	 * Set index buffer for draw primitive.
1369 	 * Params:
1370 	 * _tib = Transient index buffer.
1371 	 * _firstIndex = First index to render.
1372 	 * _numIndices = Number of indices to render.
1373 	 */
1374 	void bgfx_encoder_set_transient_index_buffer(bgfx_encoder_t* _this, const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
1375 	
1376 	/**
1377 	 * Set vertex buffer for draw primitive.
1378 	 * Params:
1379 	 * _stream = Vertex stream.
1380 	 * _handle = Vertex buffer.
1381 	 * _startVertex = First vertex to render.
1382 	 * _numVertices = Number of vertices to render.
1383 	 */
1384 	void bgfx_encoder_set_vertex_buffer(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
1385 	
1386 	/**
1387 	 * Set vertex buffer for draw primitive.
1388 	 * Params:
1389 	 * _stream = Vertex stream.
1390 	 * _handle = Vertex buffer.
1391 	 * _startVertex = First vertex to render.
1392 	 * _numVertices = Number of vertices to render.
1393 	 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
1394 	 * handle is used, vertex layout used for creation
1395 	 * of vertex buffer will be used.
1396 	 */
1397 	void bgfx_encoder_set_vertex_buffer_with_layout(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1398 	
1399 	/**
1400 	 * Set vertex buffer for draw primitive.
1401 	 * Params:
1402 	 * _stream = Vertex stream.
1403 	 * _handle = Dynamic vertex buffer.
1404 	 * _startVertex = First vertex to render.
1405 	 * _numVertices = Number of vertices to render.
1406 	 */
1407 	void bgfx_encoder_set_dynamic_vertex_buffer(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
1408 	
1409 	void bgfx_encoder_set_dynamic_vertex_buffer_with_layout(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1410 	
1411 	/**
1412 	 * Set vertex buffer for draw primitive.
1413 	 * Params:
1414 	 * _stream = Vertex stream.
1415 	 * _tvb = Transient vertex buffer.
1416 	 * _startVertex = First vertex to render.
1417 	 * _numVertices = Number of vertices to render.
1418 	 */
1419 	void bgfx_encoder_set_transient_vertex_buffer(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
1420 	
1421 	/**
1422 	 * Set vertex buffer for draw primitive.
1423 	 * Params:
1424 	 * _stream = Vertex stream.
1425 	 * _tvb = Transient vertex buffer.
1426 	 * _startVertex = First vertex to render.
1427 	 * _numVertices = Number of vertices to render.
1428 	 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
1429 	 * handle is used, vertex layout used for creation
1430 	 * of vertex buffer will be used.
1431 	 */
1432 	void bgfx_encoder_set_transient_vertex_buffer_with_layout(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1433 	
1434 	/**
1435 	 * Set number of vertices for auto generated vertices use in conjuction
1436 	 * with gl_VertexID.
1437 	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
1438 	 * Params:
1439 	 * _numVertices = Number of vertices.
1440 	 */
1441 	void bgfx_encoder_set_vertex_count(bgfx_encoder_t* _this, uint _numVertices);
1442 	
1443 	/**
1444 	 * Set instance data buffer for draw primitive.
1445 	 * Params:
1446 	 * _idb = Transient instance data buffer.
1447 	 * _start = First instance data.
1448 	 * _num = Number of data instances.
1449 	 */
1450 	void bgfx_encoder_set_instance_data_buffer(bgfx_encoder_t* _this, const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
1451 	
1452 	/**
1453 	 * Set instance data buffer for draw primitive.
1454 	 * Params:
1455 	 * _handle = Vertex buffer.
1456 	 * _startVertex = First instance data.
1457 	 * _num = Number of data instances.
1458 	 * Set instance data buffer for draw primitive.
1459 	 */
1460 	void bgfx_encoder_set_instance_data_from_vertex_buffer(bgfx_encoder_t* _this, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
1461 	
1462 	/**
1463 	 * Set instance data buffer for draw primitive.
1464 	 * Params:
1465 	 * _handle = Dynamic vertex buffer.
1466 	 * _startVertex = First instance data.
1467 	 * _num = Number of data instances.
1468 	 */
1469 	void bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer(bgfx_encoder_t* _this, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
1470 	
1471 	/**
1472 	 * Set number of instances for auto generated instances use in conjuction
1473 	 * with gl_InstanceID.
1474 	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
1475 	 */
1476 	void bgfx_encoder_set_instance_count(bgfx_encoder_t* _this, uint _numInstances);
1477 	
1478 	/**
1479 	 * Set texture stage for draw primitive.
1480 	 * Params:
1481 	 * _stage = Texture unit.
1482 	 * _sampler = Program sampler.
1483 	 * _handle = Texture handle.
1484 	 * _flags = Texture sampling mode. Default value UINT32_MAX uses
1485 	 *   texture sampling settings from the texture.
1486 	 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
1487 	 *     mode.
1488 	 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
1489 	 *     sampling.
1490 	 */
1491 	void bgfx_encoder_set_texture(bgfx_encoder_t* _this, byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
1492 	
1493 	/**
1494 	 * Submit an empty primitive for rendering. Uniforms and draw state
1495 	 * will be applied but no geometry will be submitted. Useful in cases
1496 	 * when no other draw/compute primitive is submitted to view, but it's
1497 	 * desired to execute clear view.
1498 	 * Remarks:
1499 	 *   These empty draw calls will sort before ordinary draw calls.
1500 	 * Params:
1501 	 * _id = View id.
1502 	 */
1503 	void bgfx_encoder_touch(bgfx_encoder_t* _this, bgfx_view_id_t _id);
1504 	
1505 	/**
1506 	 * Submit primitive for rendering.
1507 	 * Params:
1508 	 * _id = View id.
1509 	 * _program = Program.
1510 	 * _depth = Depth for sorting.
1511 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1512 	 */
1513 	void bgfx_encoder_submit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
1514 	
1515 	/**
1516 	 * Submit primitive with occlusion query for rendering.
1517 	 * Params:
1518 	 * _id = View id.
1519 	 * _program = Program.
1520 	 * _occlusionQuery = Occlusion query.
1521 	 * _depth = Depth for sorting.
1522 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1523 	 */
1524 	void bgfx_encoder_submit_occlusion_query(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
1525 	
1526 	/**
1527 	 * Submit primitive for rendering with index and instance data info from
1528 	 * indirect buffer.
1529 	 * Params:
1530 	 * _id = View id.
1531 	 * _program = Program.
1532 	 * _indirectHandle = Indirect buffer.
1533 	 * _start = First element in indirect buffer.
1534 	 * _num = Number of dispatches.
1535 	 * _depth = Depth for sorting.
1536 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1537 	 */
1538 	void bgfx_encoder_submit_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
1539 	
1540 	/**
1541 	 * Set compute index buffer.
1542 	 * Params:
1543 	 * _stage = Compute stage.
1544 	 * _handle = Index buffer handle.
1545 	 * _access = Buffer access. See `Access::Enum`.
1546 	 */
1547 	void bgfx_encoder_set_compute_index_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
1548 	
1549 	/**
1550 	 * Set compute vertex buffer.
1551 	 * Params:
1552 	 * _stage = Compute stage.
1553 	 * _handle = Vertex buffer handle.
1554 	 * _access = Buffer access. See `Access::Enum`.
1555 	 */
1556 	void bgfx_encoder_set_compute_vertex_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
1557 	
1558 	/**
1559 	 * Set compute dynamic index buffer.
1560 	 * Params:
1561 	 * _stage = Compute stage.
1562 	 * _handle = Dynamic index buffer handle.
1563 	 * _access = Buffer access. See `Access::Enum`.
1564 	 */
1565 	void bgfx_encoder_set_compute_dynamic_index_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
1566 	
1567 	/**
1568 	 * Set compute dynamic vertex buffer.
1569 	 * Params:
1570 	 * _stage = Compute stage.
1571 	 * _handle = Dynamic vertex buffer handle.
1572 	 * _access = Buffer access. See `Access::Enum`.
1573 	 */
1574 	void bgfx_encoder_set_compute_dynamic_vertex_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
1575 	
1576 	/**
1577 	 * Set compute indirect buffer.
1578 	 * Params:
1579 	 * _stage = Compute stage.
1580 	 * _handle = Indirect buffer handle.
1581 	 * _access = Buffer access. See `Access::Enum`.
1582 	 */
1583 	void bgfx_encoder_set_compute_indirect_buffer(bgfx_encoder_t* _this, byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
1584 	
1585 	/**
1586 	 * Set compute image from texture.
1587 	 * Params:
1588 	 * _stage = Compute stage.
1589 	 * _handle = Texture handle.
1590 	 * _mip = Mip level.
1591 	 * _access = Image access. See `Access::Enum`.
1592 	 * _format = Texture format. See: `TextureFormat::Enum`.
1593 	 */
1594 	void bgfx_encoder_set_image(bgfx_encoder_t* _this, byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
1595 	
1596 	/**
1597 	 * Dispatch compute.
1598 	 * Params:
1599 	 * _id = View id.
1600 	 * _program = Compute program.
1601 	 * _numX = Number of groups X.
1602 	 * _numY = Number of groups Y.
1603 	 * _numZ = Number of groups Z.
1604 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1605 	 */
1606 	void bgfx_encoder_dispatch(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ, byte _flags);
1607 	
1608 	/**
1609 	 * Dispatch compute indirect.
1610 	 * Params:
1611 	 * _id = View id.
1612 	 * _program = Compute program.
1613 	 * _indirectHandle = Indirect buffer.
1614 	 * _start = First element in indirect buffer.
1615 	 * _num = Number of dispatches.
1616 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1617 	 */
1618 	void bgfx_encoder_dispatch_indirect(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, byte _flags);
1619 	
1620 	/**
1621 	 * Discard previously set state for draw or compute call.
1622 	 * Params:
1623 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
1624 	 */
1625 	void bgfx_encoder_discard(bgfx_encoder_t* _this, byte _flags);
1626 	
1627 	/**
1628 	 * Blit 2D texture region between two 2D textures.
1629 	 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
1630 	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
1631 	 * Params:
1632 	 * _id = View id.
1633 	 * _dst = Destination texture handle.
1634 	 * _dstMip = Destination texture mip level.
1635 	 * _dstX = Destination texture X position.
1636 	 * _dstY = Destination texture Y position.
1637 	 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
1638 	 * this argument represents destination texture cube face. For 3D texture this argument
1639 	 * represents destination texture Z position.
1640 	 * _src = Source texture handle.
1641 	 * _srcMip = Source texture mip level.
1642 	 * _srcX = Source texture X position.
1643 	 * _srcY = Source texture Y position.
1644 	 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
1645 	 * this argument represents source texture cube face. For 3D texture this argument
1646 	 * represents source texture Z position.
1647 	 * _width = Width of region.
1648 	 * _height = Height of region.
1649 	 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
1650 	 * unused.
1651 	 */
1652 	void bgfx_encoder_blit(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
1653 	
1654 	/**
1655 	 * Request screen shot of window back buffer.
1656 	 * Remarks:
1657 	 *   `bgfx::CallbackI::screenShot` must be implemented.
1658 	 * Attention: Frame buffer handle must be created with OS' target native window handle.
1659 	 * Params:
1660 	 * _handle = Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be
1661 	 * made for main window back buffer.
1662 	 * _filePath = Will be passed to `bgfx::CallbackI::screenShot` callback.
1663 	 */
1664 	void bgfx_request_screen_shot(bgfx_frame_buffer_handle_t _handle, const(char)* _filePath);
1665 	
1666 	/**
1667 	 * Render frame.
1668 	 * Attention: `bgfx::renderFrame` is blocking call. It waits for
1669 	 *   `bgfx::frame` to be called from API thread to process frame.
1670 	 *   If timeout value is passed call will timeout and return even
1671 	 *   if `bgfx::frame` is not called.
1672 	 * Warning: This call should be only used on platforms that don't
1673 	 *   allow creating separate rendering thread. If it is called before
1674 	 *   to bgfx::init, render thread won't be created by bgfx::init call.
1675 	 * Params:
1676 	 * _msecs = Timeout in milliseconds.
1677 	 */
1678 	bgfx_render_frame_t bgfx_render_frame(int _msecs);
1679 	
1680 	/**
1681 	 * Set platform data.
1682 	 * Warning: Must be called before `bgfx::init`.
1683 	 * Params:
1684 	 * _data = Platform data.
1685 	 */
1686 	void bgfx_set_platform_data(const(bgfx_platform_data_t)* _data);
1687 	
1688 	/**
1689 	 * Get internal data for interop.
1690 	 * Attention: It's expected you understand some bgfx internals before you
1691 	 *   use this call.
1692 	 * Warning: Must be called only on render thread.
1693 	 */
1694 	const(bgfx_internal_data_t)* bgfx_get_internal_data();
1695 	
1696 	/**
1697 	 * Override internal texture with externally created texture. Previously
1698 	 * created internal texture will released.
1699 	 * Attention: It's expected you understand some bgfx internals before you
1700 	 *   use this call.
1701 	 * Warning: Must be called only on render thread.
1702 	 * Params:
1703 	 * _handle = Texture handle.
1704 	 * _ptr = Native API pointer to texture.
1705 	 */
1706 	ulong bgfx_override_internal_texture_ptr(bgfx_texture_handle_t _handle, ulong _ptr);
1707 	
1708 	/**
1709 	 * Override internal texture by creating new texture. Previously created
1710 	 * internal texture will released.
1711 	 * Attention: It's expected you understand some bgfx internals before you
1712 	 *   use this call.
1713 	 * Returns: Native API pointer to texture. If result is 0, texture is not created yet from the
1714 	 *   main thread.
1715 	 * Warning: Must be called only on render thread.
1716 	 * Params:
1717 	 * _handle = Texture handle.
1718 	 * _width = Width.
1719 	 * _height = Height.
1720 	 * _numMips = Number of mip-maps.
1721 	 * _format = Texture format. See: `TextureFormat::Enum`.
1722 	 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
1723 	 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
1724 	 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
1725 	 *   mode.
1726 	 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
1727 	 *   sampling.
1728 	 */
1729 	ulong bgfx_override_internal_texture(bgfx_texture_handle_t _handle, ushort _width, ushort _height, byte _numMips, bgfx_texture_format_t _format, ulong _flags);
1730 	
1731 	/**
1732 	 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
1733 	 * graphics debugging tools.
1734 	 * Params:
1735 	 * _marker = Marker string.
1736 	 */
1737 	void bgfx_set_marker(const(char)* _marker);
1738 	
1739 	/**
1740 	 * Set render states for draw primitive.
1741 	 * Remarks:
1742 	 *   1. To setup more complex states use:
1743 	 *      `BGFX_STATE_ALPHA_REF(_ref)`,
1744 	 *      `BGFX_STATE_POINT_SIZE(_size)`,
1745 	 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
1746 	 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
1747 	 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
1748 	 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
1749 	 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
1750 	 *      equation is specified.
1751 	 * Params:
1752 	 * _state = State flags. Default state for primitive type is
1753 	 *   triangles. See: `BGFX_STATE_DEFAULT`.
1754 	 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
1755 	 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
1756 	 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
1757 	 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
1758 	 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
1759 	 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
1760 	 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
1761 	 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
1762 	 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
1763 	 */
1764 	void bgfx_set_state(ulong _state, uint _rgba);
1765 	
1766 	/**
1767 	 * Set condition for rendering.
1768 	 * Params:
1769 	 * _handle = Occlusion query handle.
1770 	 * _visible = Render if occlusion query is visible.
1771 	 */
1772 	void bgfx_set_condition(bgfx_occlusion_query_handle_t _handle, bool _visible);
1773 	
1774 	/**
1775 	 * Set stencil test state.
1776 	 * Params:
1777 	 * _fstencil = Front stencil state.
1778 	 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
1779 	 * _fstencil is applied to both front and back facing primitives.
1780 	 */
1781 	void bgfx_set_stencil(uint _fstencil, uint _bstencil);
1782 	
1783 	/**
1784 	 * Set scissor for draw primitive.
1785 	 * Remarks:
1786 	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
1787 	 * Params:
1788 	 * _x = Position x from the left corner of the window.
1789 	 * _y = Position y from the top corner of the window.
1790 	 * _width = Width of view scissor region.
1791 	 * _height = Height of view scissor region.
1792 	 */
1793 	ushort bgfx_set_scissor(ushort _x, ushort _y, ushort _width, ushort _height);
1794 	
1795 	/**
1796 	 * Set scissor from cache for draw primitive.
1797 	 * Remarks:
1798 	 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
1799 	 * Params:
1800 	 * _cache = Index in scissor cache.
1801 	 */
1802 	void bgfx_set_scissor_cached(ushort _cache);
1803 	
1804 	/**
1805 	 * Set model matrix for draw primitive. If it is not called,
1806 	 * the model will be rendered with an identity model matrix.
1807 	 * Params:
1808 	 * _mtx = Pointer to first matrix in array.
1809 	 * _num = Number of matrices in array.
1810 	 */
1811 	uint bgfx_set_transform(const(void)* _mtx, ushort _num);
1812 	
1813 	/**
1814 	 *  Set model matrix from matrix cache for draw primitive.
1815 	 * Params:
1816 	 * _cache = Index in matrix cache.
1817 	 * _num = Number of matrices from cache.
1818 	 */
1819 	void bgfx_set_transform_cached(uint _cache, ushort _num);
1820 	
1821 	/**
1822 	 * Reserve matrices in internal matrix cache.
1823 	 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
1824 	 * Params:
1825 	 * _transform = Pointer to `Transform` structure.
1826 	 * _num = Number of matrices.
1827 	 */
1828 	uint bgfx_alloc_transform(bgfx_transform_t* _transform, ushort _num);
1829 	
1830 	/**
1831 	 * Set shader uniform parameter for draw primitive.
1832 	 * Params:
1833 	 * _handle = Uniform.
1834 	 * _value = Pointer to uniform data.
1835 	 * _num = Number of elements. Passing `UINT16_MAX` will
1836 	 * use the _num passed on uniform creation.
1837 	 */
1838 	void bgfx_set_uniform(bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
1839 	
1840 	/**
1841 	 * Set index buffer for draw primitive.
1842 	 * Params:
1843 	 * _handle = Index buffer.
1844 	 * _firstIndex = First index to render.
1845 	 * _numIndices = Number of indices to render.
1846 	 */
1847 	void bgfx_set_index_buffer(bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
1848 	
1849 	/**
1850 	 * Set index buffer for draw primitive.
1851 	 * Params:
1852 	 * _handle = Dynamic index buffer.
1853 	 * _firstIndex = First index to render.
1854 	 * _numIndices = Number of indices to render.
1855 	 */
1856 	void bgfx_set_dynamic_index_buffer(bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
1857 	
1858 	/**
1859 	 * Set index buffer for draw primitive.
1860 	 * Params:
1861 	 * _tib = Transient index buffer.
1862 	 * _firstIndex = First index to render.
1863 	 * _numIndices = Number of indices to render.
1864 	 */
1865 	void bgfx_set_transient_index_buffer(const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
1866 	
1867 	/**
1868 	 * Set vertex buffer for draw primitive.
1869 	 * Params:
1870 	 * _stream = Vertex stream.
1871 	 * _handle = Vertex buffer.
1872 	 * _startVertex = First vertex to render.
1873 	 * _numVertices = Number of vertices to render.
1874 	 */
1875 	void bgfx_set_vertex_buffer(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
1876 	
1877 	/**
1878 	 * Set vertex buffer for draw primitive.
1879 	 * Params:
1880 	 * _stream = Vertex stream.
1881 	 * _handle = Vertex buffer.
1882 	 * _startVertex = First vertex to render.
1883 	 * _numVertices = Number of vertices to render.
1884 	 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
1885 	 * handle is used, vertex layout used for creation
1886 	 * of vertex buffer will be used.
1887 	 */
1888 	void bgfx_set_vertex_buffer_with_layout(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1889 	
1890 	/**
1891 	 * Set vertex buffer for draw primitive.
1892 	 * Params:
1893 	 * _stream = Vertex stream.
1894 	 * _handle = Dynamic vertex buffer.
1895 	 * _startVertex = First vertex to render.
1896 	 * _numVertices = Number of vertices to render.
1897 	 */
1898 	void bgfx_set_dynamic_vertex_buffer(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
1899 	
1900 	/**
1901 	 * Set vertex buffer for draw primitive.
1902 	 * Params:
1903 	 * _stream = Vertex stream.
1904 	 * _handle = Dynamic vertex buffer.
1905 	 * _startVertex = First vertex to render.
1906 	 * _numVertices = Number of vertices to render.
1907 	 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
1908 	 * handle is used, vertex layout used for creation
1909 	 * of vertex buffer will be used.
1910 	 */
1911 	void bgfx_set_dynamic_vertex_buffer_with_layout(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1912 	
1913 	/**
1914 	 * Set vertex buffer for draw primitive.
1915 	 * Params:
1916 	 * _stream = Vertex stream.
1917 	 * _tvb = Transient vertex buffer.
1918 	 * _startVertex = First vertex to render.
1919 	 * _numVertices = Number of vertices to render.
1920 	 */
1921 	void bgfx_set_transient_vertex_buffer(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
1922 	
1923 	/**
1924 	 * Set vertex buffer for draw primitive.
1925 	 * Params:
1926 	 * _stream = Vertex stream.
1927 	 * _tvb = Transient vertex buffer.
1928 	 * _startVertex = First vertex to render.
1929 	 * _numVertices = Number of vertices to render.
1930 	 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
1931 	 * handle is used, vertex layout used for creation
1932 	 * of vertex buffer will be used.
1933 	 */
1934 	void bgfx_set_transient_vertex_buffer_with_layout(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
1935 	
1936 	/**
1937 	 * Set number of vertices for auto generated vertices use in conjuction
1938 	 * with gl_VertexID.
1939 	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
1940 	 * Params:
1941 	 * _numVertices = Number of vertices.
1942 	 */
1943 	void bgfx_set_vertex_count(uint _numVertices);
1944 	
1945 	/**
1946 	 * Set instance data buffer for draw primitive.
1947 	 * Params:
1948 	 * _idb = Transient instance data buffer.
1949 	 * _start = First instance data.
1950 	 * _num = Number of data instances.
1951 	 */
1952 	void bgfx_set_instance_data_buffer(const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
1953 	
1954 	/**
1955 	 * Set instance data buffer for draw primitive.
1956 	 * Params:
1957 	 * _handle = Vertex buffer.
1958 	 * _startVertex = First instance data.
1959 	 * _num = Number of data instances.
1960 	 * Set instance data buffer for draw primitive.
1961 	 */
1962 	void bgfx_set_instance_data_from_vertex_buffer(bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
1963 	
1964 	/**
1965 	 * Set instance data buffer for draw primitive.
1966 	 * Params:
1967 	 * _handle = Dynamic vertex buffer.
1968 	 * _startVertex = First instance data.
1969 	 * _num = Number of data instances.
1970 	 */
1971 	void bgfx_set_instance_data_from_dynamic_vertex_buffer(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
1972 	
1973 	/**
1974 	 * Set number of instances for auto generated instances use in conjuction
1975 	 * with gl_InstanceID.
1976 	 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
1977 	 */
1978 	void bgfx_set_instance_count(uint _numInstances);
1979 	
1980 	/**
1981 	 * Set texture stage for draw primitive.
1982 	 * Params:
1983 	 * _stage = Texture unit.
1984 	 * _sampler = Program sampler.
1985 	 * _handle = Texture handle.
1986 	 * _flags = Texture sampling mode. Default value UINT32_MAX uses
1987 	 *   texture sampling settings from the texture.
1988 	 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
1989 	 *     mode.
1990 	 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
1991 	 *     sampling.
1992 	 */
1993 	void bgfx_set_texture(byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
1994 	
1995 	/**
1996 	 * Submit an empty primitive for rendering. Uniforms and draw state
1997 	 * will be applied but no geometry will be submitted.
1998 	 * Remarks:
1999 	 *   These empty draw calls will sort before ordinary draw calls.
2000 	 * Params:
2001 	 * _id = View id.
2002 	 */
2003 	void bgfx_touch(bgfx_view_id_t _id);
2004 	
2005 	/**
2006 	 * Submit primitive for rendering.
2007 	 * Params:
2008 	 * _id = View id.
2009 	 * _program = Program.
2010 	 * _depth = Depth for sorting.
2011 	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
2012 	 */
2013 	void bgfx_submit(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
2014 	
2015 	/**
2016 	 * Submit primitive with occlusion query for rendering.
2017 	 * Params:
2018 	 * _id = View id.
2019 	 * _program = Program.
2020 	 * _occlusionQuery = Occlusion query.
2021 	 * _depth = Depth for sorting.
2022 	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
2023 	 */
2024 	void bgfx_submit_occlusion_query(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
2025 	
2026 	/**
2027 	 * Submit primitive for rendering with index and instance data info from
2028 	 * indirect buffer.
2029 	 * Params:
2030 	 * _id = View id.
2031 	 * _program = Program.
2032 	 * _indirectHandle = Indirect buffer.
2033 	 * _start = First element in indirect buffer.
2034 	 * _num = Number of dispatches.
2035 	 * _depth = Depth for sorting.
2036 	 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
2037 	 */
2038 	void bgfx_submit_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
2039 	
2040 	/**
2041 	 * Set compute index buffer.
2042 	 * Params:
2043 	 * _stage = Compute stage.
2044 	 * _handle = Index buffer handle.
2045 	 * _access = Buffer access. See `Access::Enum`.
2046 	 */
2047 	void bgfx_set_compute_index_buffer(byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
2048 	
2049 	/**
2050 	 * Set compute vertex buffer.
2051 	 * Params:
2052 	 * _stage = Compute stage.
2053 	 * _handle = Vertex buffer handle.
2054 	 * _access = Buffer access. See `Access::Enum`.
2055 	 */
2056 	void bgfx_set_compute_vertex_buffer(byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
2057 	
2058 	/**
2059 	 * Set compute dynamic index buffer.
2060 	 * Params:
2061 	 * _stage = Compute stage.
2062 	 * _handle = Dynamic index buffer handle.
2063 	 * _access = Buffer access. See `Access::Enum`.
2064 	 */
2065 	void bgfx_set_compute_dynamic_index_buffer(byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
2066 	
2067 	/**
2068 	 * Set compute dynamic vertex buffer.
2069 	 * Params:
2070 	 * _stage = Compute stage.
2071 	 * _handle = Dynamic vertex buffer handle.
2072 	 * _access = Buffer access. See `Access::Enum`.
2073 	 */
2074 	void bgfx_set_compute_dynamic_vertex_buffer(byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
2075 	
2076 	/**
2077 	 * Set compute indirect buffer.
2078 	 * Params:
2079 	 * _stage = Compute stage.
2080 	 * _handle = Indirect buffer handle.
2081 	 * _access = Buffer access. See `Access::Enum`.
2082 	 */
2083 	void bgfx_set_compute_indirect_buffer(byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
2084 	
2085 	/**
2086 	 * Set compute image from texture.
2087 	 * Params:
2088 	 * _stage = Compute stage.
2089 	 * _handle = Texture handle.
2090 	 * _mip = Mip level.
2091 	 * _access = Image access. See `Access::Enum`.
2092 	 * _format = Texture format. See: `TextureFormat::Enum`.
2093 	 */
2094 	void bgfx_set_image(byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
2095 	
2096 	/**
2097 	 * Dispatch compute.
2098 	 * Params:
2099 	 * _id = View id.
2100 	 * _program = Compute program.
2101 	 * _numX = Number of groups X.
2102 	 * _numY = Number of groups Y.
2103 	 * _numZ = Number of groups Z.
2104 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
2105 	 */
2106 	void bgfx_dispatch(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ, byte _flags);
2107 	
2108 	/**
2109 	 * Dispatch compute indirect.
2110 	 * Params:
2111 	 * _id = View id.
2112 	 * _program = Compute program.
2113 	 * _indirectHandle = Indirect buffer.
2114 	 * _start = First element in indirect buffer.
2115 	 * _num = Number of dispatches.
2116 	 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
2117 	 */
2118 	void bgfx_dispatch_indirect(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, byte _flags);
2119 	
2120 	/**
2121 	 * Discard previously set state for draw or compute call.
2122 	 * Params:
2123 	 * _flags = Draw/compute states to discard.
2124 	 */
2125 	void bgfx_discard(byte _flags);
2126 	
2127 	/**
2128 	 * Blit 2D texture region between two 2D textures.
2129 	 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
2130 	 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
2131 	 * Params:
2132 	 * _id = View id.
2133 	 * _dst = Destination texture handle.
2134 	 * _dstMip = Destination texture mip level.
2135 	 * _dstX = Destination texture X position.
2136 	 * _dstY = Destination texture Y position.
2137 	 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
2138 	 * this argument represents destination texture cube face. For 3D texture this argument
2139 	 * represents destination texture Z position.
2140 	 * _src = Source texture handle.
2141 	 * _srcMip = Source texture mip level.
2142 	 * _srcX = Source texture X position.
2143 	 * _srcY = Source texture Y position.
2144 	 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
2145 	 * this argument represents source texture cube face. For 3D texture this argument
2146 	 * represents source texture Z position.
2147 	 * _width = Width of region.
2148 	 * _height = Height of region.
2149 	 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
2150 	 * unused.
2151 	 */
2152 	void bgfx_blit(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
2153 	
2154 }
2155 else
2156 {
2157 	__gshared
2158 	{
2159 		/**
2160 		 * Init attachment.
2161 		 * Params:
2162 		 * _handle = Render target texture handle.
2163 		 * _access = Access. See `Access::Enum`.
2164 		 * _layer = Cubemap side or depth layer/slice to use.
2165 		 * _numLayers = Number of texture layer/slice(s) in array to use.
2166 		 * _mip = Mip level.
2167 		 * _resolve = Resolve flags. See: `BGFX_RESOLVE_*`
2168 		 */
2169 		alias da_bgfx_attachment_init = void function(bgfx_attachment_t* _this, bgfx_texture_handle_t _handle, bgfx_access_t _access, ushort _layer, ushort _numLayers, ushort _mip, byte _resolve);
2170 		da_bgfx_attachment_init bgfx_attachment_init;
2171 		
2172 		/**
2173 		 * Start VertexLayout.
2174 		 * Params:
2175 		 * _rendererType = Renderer backend type. See: `bgfx::RendererType`
2176 		 */
2177 		alias da_bgfx_vertex_layout_begin = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_renderer_type_t _rendererType);
2178 		da_bgfx_vertex_layout_begin bgfx_vertex_layout_begin;
2179 		
2180 		/**
2181 		 * Add attribute to VertexLayout.
2182 		 * Remarks: Must be called between begin/end.
2183 		 * Params:
2184 		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
2185 		 * _num = Number of elements 1, 2, 3 or 4.
2186 		 * _type = Element type.
2187 		 * _normalized = When using fixed point AttribType (f.e. Uint8)
2188 		 * value will be normalized for vertex shader usage. When normalized
2189 		 * is set to true, AttribType::Uint8 value in range 0-255 will be
2190 		 * in range 0.0-1.0 in vertex shader.
2191 		 * _asInt = Packaging rule for vertexPack, vertexUnpack, and
2192 		 * vertexConvert for AttribType::Uint8 and AttribType::Int16.
2193 		 * Unpacking code must be implemented inside vertex shader.
2194 		 */
2195 		alias da_bgfx_vertex_layout_add = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, bgfx_attrib_t _attrib, byte _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt);
2196 		da_bgfx_vertex_layout_add bgfx_vertex_layout_add;
2197 		
2198 		/**
2199 		 * Decode attribute.
2200 		 * Params:
2201 		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
2202 		 * _num = Number of elements.
2203 		 * _type = Element type.
2204 		 * _normalized = Attribute is normalized.
2205 		 * _asInt = Attribute is packed as int.
2206 		 */
2207 		alias da_bgfx_vertex_layout_decode = void function(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib, byte* _num, bgfx_attrib_type_t* _type, bool* _normalized, bool* _asInt);
2208 		da_bgfx_vertex_layout_decode bgfx_vertex_layout_decode;
2209 		
2210 		/**
2211 		 * Returns `true` if VertexLayout contains attribute.
2212 		 * Params:
2213 		 * _attrib = Attribute semantics. See: `bgfx::Attrib`
2214 		 */
2215 		alias da_bgfx_vertex_layout_has = bool function(const(bgfx_vertex_layout_t)* _this, bgfx_attrib_t _attrib);
2216 		da_bgfx_vertex_layout_has bgfx_vertex_layout_has;
2217 		
2218 		/**
2219 		 * Skip `_num` bytes in vertex stream.
2220 		 * Params:
2221 		 * _num = Number of bytes to skip.
2222 		 */
2223 		alias da_bgfx_vertex_layout_skip = bgfx_vertex_layout_t* function(bgfx_vertex_layout_t* _this, byte _num);
2224 		da_bgfx_vertex_layout_skip bgfx_vertex_layout_skip;
2225 		
2226 		/**
2227 		 * End VertexLayout.
2228 		 */
2229 		alias da_bgfx_vertex_layout_end = void function(bgfx_vertex_layout_t* _this);
2230 		da_bgfx_vertex_layout_end bgfx_vertex_layout_end;
2231 		
2232 		/**
2233 		 * Pack vertex attribute into vertex stream format.
2234 		 * Params:
2235 		 * _input = Value to be packed into vertex stream.
2236 		 * _inputNormalized = `true` if input value is already normalized.
2237 		 * _attr = Attribute to pack.
2238 		 * _layout = Vertex stream layout.
2239 		 * _data = Destination vertex stream where data will be packed.
2240 		 * _index = Vertex index that will be modified.
2241 		 */
2242 		alias da_bgfx_vertex_pack = void function(const float[4] _input, bool _inputNormalized, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, void* _data, uint _index);
2243 		da_bgfx_vertex_pack bgfx_vertex_pack;
2244 		
2245 		/**
2246 		 * Unpack vertex attribute from vertex stream format.
2247 		 * Params:
2248 		 * _output = Result of unpacking.
2249 		 * _attr = Attribute to unpack.
2250 		 * _layout = Vertex stream layout.
2251 		 * _data = Source vertex stream from where data will be unpacked.
2252 		 * _index = Vertex index that will be unpacked.
2253 		 */
2254 		alias da_bgfx_vertex_unpack = void function(float[4] _output, bgfx_attrib_t _attr, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _index);
2255 		da_bgfx_vertex_unpack bgfx_vertex_unpack;
2256 		
2257 		/**
2258 		 * Converts vertex stream data from one vertex stream format to another.
2259 		 * Params:
2260 		 * _dstLayout = Destination vertex stream layout.
2261 		 * _dstData = Destination vertex stream.
2262 		 * _srcLayout = Source vertex stream layout.
2263 		 * _srcData = Source vertex stream data.
2264 		 * _num = Number of vertices to convert from source to destination.
2265 		 */
2266 		alias da_bgfx_vertex_convert = void function(const(bgfx_vertex_layout_t)* _dstLayout, void* _dstData, const(bgfx_vertex_layout_t)* _srcLayout, const(void)* _srcData, uint _num);
2267 		da_bgfx_vertex_convert bgfx_vertex_convert;
2268 		
2269 		/**
2270 		 * Weld vertices.
2271 		 * Params:
2272 		 * _output = Welded vertices remapping table. The size of buffer
2273 		 * must be the same as number of vertices.
2274 		 * _layout = Vertex stream layout.
2275 		 * _data = Vertex stream.
2276 		 * _num = Number of vertices in vertex stream.
2277 		 * _index32 = Set to `true` if input indices are 32-bit.
2278 		 * _epsilon = Error tolerance for vertex position comparison.
2279 		 */
2280 		alias da_bgfx_weld_vertices = uint function(void* _output, const(bgfx_vertex_layout_t)* _layout, const(void)* _data, uint _num, bool _index32, float _epsilon);
2281 		da_bgfx_weld_vertices bgfx_weld_vertices;
2282 		
2283 		/**
2284 		 * Convert index buffer for use with different primitive topologies.
2285 		 * Params:
2286 		 * _conversion = Conversion type, see `TopologyConvert::Enum`.
2287 		 * _dst = Destination index buffer. If this argument is NULL
2288 		 * function will return number of indices after conversion.
2289 		 * _dstSize = Destination index buffer in bytes. It must be
2290 		 * large enough to contain output indices. If destination size is
2291 		 * insufficient index buffer will be truncated.
2292 		 * _indices = Source indices.
2293 		 * _numIndices = Number of input indices.
2294 		 * _index32 = Set to `true` if input indices are 32-bit.
2295 		 */
2296 		alias da_bgfx_topology_convert = uint function(bgfx_topology_convert_t _conversion, void* _dst, uint _dstSize, const(void)* _indices, uint _numIndices, bool _index32);
2297 		da_bgfx_topology_convert bgfx_topology_convert;
2298 		
2299 		/**
2300 		 * Sort indices.
2301 		 * Params:
2302 		 * _sort = Sort order, see `TopologySort::Enum`.
2303 		 * _dst = Destination index buffer.
2304 		 * _dstSize = Destination index buffer in bytes. It must be
2305 		 * large enough to contain output indices. If destination size is
2306 		 * insufficient index buffer will be truncated.
2307 		 * _dir = Direction (vector must be normalized).
2308 		 * _pos = Position.
2309 		 * _vertices = Pointer to first vertex represented as
2310 		 * float x, y, z. Must contain at least number of vertices
2311 		 * referencende by index buffer.
2312 		 * _stride = Vertex stride.
2313 		 * _indices = Source indices.
2314 		 * _numIndices = Number of input indices.
2315 		 * _index32 = Set to `true` if input indices are 32-bit.
2316 		 */
2317 		alias da_bgfx_topology_sort_tri_list = void function(bgfx_topology_sort_t _sort, void* _dst, uint _dstSize, const float[3] _dir, const float[3] _pos, const(void)* _vertices, uint _stride, const(void)* _indices, uint _numIndices, bool _index32);
2318 		da_bgfx_topology_sort_tri_list bgfx_topology_sort_tri_list;
2319 		
2320 		/**
2321 		 * Returns supported backend API renderers.
2322 		 * Params:
2323 		 * _max = Maximum number of elements in _enum array.
2324 		 * _enum = Array where supported renderers will be written.
2325 		 */
2326 		alias da_bgfx_get_supported_renderers = byte function(byte _max, bgfx_renderer_type_t* _enum);
2327 		da_bgfx_get_supported_renderers bgfx_get_supported_renderers;
2328 		
2329 		/**
2330 		 * Returns name of renderer.
2331 		 * Params:
2332 		 * _type = Renderer backend type. See: `bgfx::RendererType`
2333 		 */
2334 		alias da_bgfx_get_renderer_name = const(char)* function(bgfx_renderer_type_t _type);
2335 		da_bgfx_get_renderer_name bgfx_get_renderer_name;
2336 		
2337 		alias da_bgfx_init_ctor = void function(bgfx_init_t* _init);
2338 		da_bgfx_init_ctor bgfx_init_ctor;
2339 		
2340 		/**
2341 		 * Initialize bgfx library.
2342 		 * Params:
2343 		 * _init = Initialization parameters. See: `bgfx::Init` for more info.
2344 		 */
2345 		alias da_bgfx_init = bool function(const(bgfx_init_t)* _init);
2346 		da_bgfx_init bgfx_init;
2347 		
2348 		/**
2349 		 * Shutdown bgfx library.
2350 		 */
2351 		alias da_bgfx_shutdown = void function();
2352 		da_bgfx_shutdown bgfx_shutdown;
2353 		
2354 		/**
2355 		 * Reset graphic settings and back-buffer size.
2356 		 * Attention: This call doesn't actually change window size, it just
2357 		 *   resizes back-buffer. Windowing code has to change window size.
2358 		 * Params:
2359 		 * _width = Back-buffer width.
2360 		 * _height = Back-buffer height.
2361 		 * _flags = See: `BGFX_RESET_*` for more info.
2362 		 *   - `BGFX_RESET_NONE` - No reset flags.
2363 		 *   - `BGFX_RESET_FULLSCREEN` - Not supported yet.
2364 		 *   - `BGFX_RESET_MSAA_X[2/4/8/16]` - Enable 2, 4, 8 or 16 x MSAA.
2365 		 *   - `BGFX_RESET_VSYNC` - Enable V-Sync.
2366 		 *   - `BGFX_RESET_MAXANISOTROPY` - Turn on/off max anisotropy.
2367 		 *   - `BGFX_RESET_CAPTURE` - Begin screen capture.
2368 		 *   - `BGFX_RESET_FLUSH_AFTER_RENDER` - Flush rendering after submitting to GPU.
2369 		 *   - `BGFX_RESET_FLIP_AFTER_RENDER` - This flag  specifies where flip
2370 		 *     occurs. Default behaviour is that flip occurs before rendering new
2371 		 *     frame. This flag only has effect when `BGFX_CONFIG_MULTITHREADED=0`.
2372 		 *   - `BGFX_RESET_SRGB_BACKBUFFER` - Enable sRGB backbuffer.
2373 		 * _format = Texture format. See: `TextureFormat::Enum`.
2374 		 */
2375 		alias da_bgfx_reset = void function(uint _width, uint _height, uint _flags, bgfx_texture_format_t _format);
2376 		da_bgfx_reset bgfx_reset;
2377 		
2378 		/**
2379 		 * Advance to next frame. When using multithreaded renderer, this call
2380 		 * just swaps internal buffers, kicks render thread, and returns. In
2381 		 * singlethreaded renderer this call does frame rendering.
2382 		 * Params:
2383 		 * _capture = Capture frame with graphics debugger.
2384 		 */
2385 		alias da_bgfx_frame = uint function(bool _capture);
2386 		da_bgfx_frame bgfx_frame;
2387 		
2388 		/**
2389 		 * Returns current renderer backend API type.
2390 		 * Remarks:
2391 		 *   Library must be initialized.
2392 		 */
2393 		alias da_bgfx_get_renderer_type = bgfx_renderer_type_t function();
2394 		da_bgfx_get_renderer_type bgfx_get_renderer_type;
2395 		
2396 		/**
2397 		 * Returns renderer capabilities.
2398 		 * Remarks:
2399 		 *   Library must be initialized.
2400 		 */
2401 		alias da_bgfx_get_caps = const(bgfx_caps_t)* function();
2402 		da_bgfx_get_caps bgfx_get_caps;
2403 		
2404 		/**
2405 		 * Returns performance counters.
2406 		 * Attention: Pointer returned is valid until `bgfx::frame` is called.
2407 		 */
2408 		alias da_bgfx_get_stats = const(bgfx_stats_t)* function();
2409 		da_bgfx_get_stats bgfx_get_stats;
2410 		
2411 		/**
2412 		 * Allocate buffer to pass to bgfx calls. Data will be freed inside bgfx.
2413 		 * Params:
2414 		 * _size = Size to allocate.
2415 		 */
2416 		alias da_bgfx_alloc = const(bgfx_memory_t)* function(uint _size);
2417 		da_bgfx_alloc bgfx_alloc;
2418 		
2419 		/**
2420 		 * Allocate buffer and copy data into it. Data will be freed inside bgfx.
2421 		 * Params:
2422 		 * _data = Pointer to data to be copied.
2423 		 * _size = Size of data to be copied.
2424 		 */
2425 		alias da_bgfx_copy = const(bgfx_memory_t)* function(const(void)* _data, uint _size);
2426 		da_bgfx_copy bgfx_copy;
2427 		
2428 		/**
2429 		 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
2430 		 * doesn't allocate memory for data. It just copies the _data pointer. You
2431 		 * can pass `ReleaseFn` function pointer to release this memory after it's
2432 		 * consumed, otherwise you must make sure _data is available for at least 2
2433 		 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
2434 		 * from any thread.
2435 		 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
2436 		 * Params:
2437 		 * _data = Pointer to data.
2438 		 * _size = Size of data.
2439 		 */
2440 		alias da_bgfx_make_ref = const(bgfx_memory_t)* function(const(void)* _data, uint _size);
2441 		da_bgfx_make_ref bgfx_make_ref;
2442 		
2443 		/**
2444 		 * Make reference to data to pass to bgfx. Unlike `bgfx::alloc`, this call
2445 		 * doesn't allocate memory for data. It just copies the _data pointer. You
2446 		 * can pass `ReleaseFn` function pointer to release this memory after it's
2447 		 * consumed, otherwise you must make sure _data is available for at least 2
2448 		 * `bgfx::frame` calls. `ReleaseFn` function must be able to be called
2449 		 * from any thread.
2450 		 * Attention: Data passed must be available for at least 2 `bgfx::frame` calls.
2451 		 * Params:
2452 		 * _data = Pointer to data.
2453 		 * _size = Size of data.
2454 		 * _releaseFn = Callback function to release memory after use.
2455 		 * _userData = User data to be passed to callback function.
2456 		 */
2457 		alias da_bgfx_make_ref_release = const(bgfx_memory_t)* function(const(void)* _data, uint _size, void* _releaseFn, void* _userData);
2458 		da_bgfx_make_ref_release bgfx_make_ref_release;
2459 		
2460 		/**
2461 		 * Set debug flags.
2462 		 * Params:
2463 		 * _debug = Available flags:
2464 		 *   - `BGFX_DEBUG_IFH` - Infinitely fast hardware. When this flag is set
2465 		 *     all rendering calls will be skipped. This is useful when profiling
2466 		 *     to quickly assess potential bottlenecks between CPU and GPU.
2467 		 *   - `BGFX_DEBUG_PROFILER` - Enable profiler.
2468 		 *   - `BGFX_DEBUG_STATS` - Display internal statistics.
2469 		 *   - `BGFX_DEBUG_TEXT` - Display debug text.
2470 		 *   - `BGFX_DEBUG_WIREFRAME` - Wireframe rendering. All rendering
2471 		 *     primitives will be rendered as lines.
2472 		 */
2473 		alias da_bgfx_set_debug = void function(uint _debug);
2474 		da_bgfx_set_debug bgfx_set_debug;
2475 		
2476 		/**
2477 		 * Clear internal debug text buffer.
2478 		 * Params:
2479 		 * _attr = Background color.
2480 		 * _small = Default 8x16 or 8x8 font.
2481 		 */
2482 		alias da_bgfx_dbg_text_clear = void function(byte _attr, bool _small);
2483 		da_bgfx_dbg_text_clear bgfx_dbg_text_clear;
2484 		
2485 		/**
2486 		 * Print formatted data to internal debug text character-buffer (VGA-compatible text mode).
2487 		 * Params:
2488 		 * _x = Position x from the left corner of the window.
2489 		 * _y = Position y from the top corner of the window.
2490 		 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
2491 		 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
2492 		 * _format = `printf` style format.
2493 		 */
2494 		alias da_bgfx_dbg_text_printf = void function(ushort _x, ushort _y, byte _attr, const(char)* _format, ... );
2495 		da_bgfx_dbg_text_printf bgfx_dbg_text_printf;
2496 		
2497 		/**
2498 		 * Print formatted data from variable argument list to internal debug text character-buffer (VGA-compatible text mode).
2499 		 * Params:
2500 		 * _x = Position x from the left corner of the window.
2501 		 * _y = Position y from the top corner of the window.
2502 		 * _attr = Color palette. Where top 4-bits represent index of background, and bottom
2503 		 * 4-bits represent foreground color from standard VGA text palette (ANSI escape codes).
2504 		 * _format = `printf` style format.
2505 		 * _argList = Variable arguments list for format string.
2506 		 */
2507 		alias da_bgfx_dbg_text_vprintf = void function(ushort _x, ushort _y, byte _attr, const(char)* _format, va_list _argList);
2508 		da_bgfx_dbg_text_vprintf bgfx_dbg_text_vprintf;
2509 		
2510 		/**
2511 		 * Draw image into internal debug text buffer.
2512 		 * Params:
2513 		 * _x = Position x from the left corner of the window.
2514 		 * _y = Position y from the top corner of the window.
2515 		 * _width = Image width.
2516 		 * _height = Image height.
2517 		 * _data = Raw image data (character/attribute raw encoding).
2518 		 * _pitch = Image pitch in bytes.
2519 		 */
2520 		alias da_bgfx_dbg_text_image = void function(ushort _x, ushort _y, ushort _width, ushort _height, const(void)* _data, ushort _pitch);
2521 		da_bgfx_dbg_text_image bgfx_dbg_text_image;
2522 		
2523 		/**
2524 		 * Create static index buffer.
2525 		 * Params:
2526 		 * _mem = Index buffer data.
2527 		 * _flags = Buffer creation flags.
2528 		 *   - `BGFX_BUFFER_NONE` - No flags.
2529 		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2530 		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2531 		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2532 		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2533 		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2534 		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
2535 		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
2536 		 *       buffers.
2537 		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
2538 		 *       index buffers.
2539 		 */
2540 		alias da_bgfx_create_index_buffer = bgfx_index_buffer_handle_t function(const(bgfx_memory_t)* _mem, ushort _flags);
2541 		da_bgfx_create_index_buffer bgfx_create_index_buffer;
2542 		
2543 		/**
2544 		 * Set static index buffer debug name.
2545 		 * Params:
2546 		 * _handle = Static index buffer handle.
2547 		 * _name = Static index buffer name.
2548 		 * _len = Static index buffer name length (if length is INT32_MAX, it's expected
2549 		 * that _name is zero terminated string.
2550 		 */
2551 		alias da_bgfx_set_index_buffer_name = void function(bgfx_index_buffer_handle_t _handle, const(char)* _name, int _len);
2552 		da_bgfx_set_index_buffer_name bgfx_set_index_buffer_name;
2553 		
2554 		/**
2555 		 * Destroy static index buffer.
2556 		 * Params:
2557 		 * _handle = Static index buffer handle.
2558 		 */
2559 		alias da_bgfx_destroy_index_buffer = void function(bgfx_index_buffer_handle_t _handle);
2560 		da_bgfx_destroy_index_buffer bgfx_destroy_index_buffer;
2561 		
2562 		/**
2563 		 * Create vertex layout.
2564 		 * Params:
2565 		 * _layout = Vertex layout.
2566 		 */
2567 		alias da_bgfx_create_vertex_layout = bgfx_vertex_layout_handle_t function(const(bgfx_vertex_layout_t)* _layout);
2568 		da_bgfx_create_vertex_layout bgfx_create_vertex_layout;
2569 		
2570 		/**
2571 		 * Destroy vertex layout.
2572 		 * Params:
2573 		 * _layoutHandle = Vertex layout handle.
2574 		 */
2575 		alias da_bgfx_destroy_vertex_layout = void function(bgfx_vertex_layout_handle_t _layoutHandle);
2576 		da_bgfx_destroy_vertex_layout bgfx_destroy_vertex_layout;
2577 		
2578 		/**
2579 		 * Create static vertex buffer.
2580 		 * Params:
2581 		 * _mem = Vertex buffer data.
2582 		 * _layout = Vertex layout.
2583 		 * _flags = Buffer creation flags.
2584 		 *  - `BGFX_BUFFER_NONE` - No flags.
2585 		 *  - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2586 		 *  - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2587 		 *      is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2588 		 *  - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2589 		 *  - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2590 		 *      data is passed. If this flag is not specified, and more data is passed on update, the buffer
2591 		 *      will be trimmed to fit the existing buffer size. This flag has effect only on dynamic buffers.
2592 		 *  - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on index buffers.
2593 		 */
2594 		alias da_bgfx_create_vertex_buffer = bgfx_vertex_buffer_handle_t function(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
2595 		da_bgfx_create_vertex_buffer bgfx_create_vertex_buffer;
2596 		
2597 		/**
2598 		 * Set static vertex buffer debug name.
2599 		 * Params:
2600 		 * _handle = Static vertex buffer handle.
2601 		 * _name = Static vertex buffer name.
2602 		 * _len = Static vertex buffer name length (if length is INT32_MAX, it's expected
2603 		 * that _name is zero terminated string.
2604 		 */
2605 		alias da_bgfx_set_vertex_buffer_name = void function(bgfx_vertex_buffer_handle_t _handle, const(char)* _name, int _len);
2606 		da_bgfx_set_vertex_buffer_name bgfx_set_vertex_buffer_name;
2607 		
2608 		/**
2609 		 * Destroy static vertex buffer.
2610 		 * Params:
2611 		 * _handle = Static vertex buffer handle.
2612 		 */
2613 		alias da_bgfx_destroy_vertex_buffer = void function(bgfx_vertex_buffer_handle_t _handle);
2614 		da_bgfx_destroy_vertex_buffer bgfx_destroy_vertex_buffer;
2615 		
2616 		/**
2617 		 * Create empty dynamic index buffer.
2618 		 * Params:
2619 		 * _num = Number of indices.
2620 		 * _flags = Buffer creation flags.
2621 		 *   - `BGFX_BUFFER_NONE` - No flags.
2622 		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2623 		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2624 		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2625 		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2626 		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2627 		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
2628 		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
2629 		 *       buffers.
2630 		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
2631 		 *       index buffers.
2632 		 */
2633 		alias da_bgfx_create_dynamic_index_buffer = bgfx_dynamic_index_buffer_handle_t function(uint _num, ushort _flags);
2634 		da_bgfx_create_dynamic_index_buffer bgfx_create_dynamic_index_buffer;
2635 		
2636 		/**
2637 		 * Create dynamic index buffer and initialized it.
2638 		 * Params:
2639 		 * _mem = Index buffer data.
2640 		 * _flags = Buffer creation flags.
2641 		 *   - `BGFX_BUFFER_NONE` - No flags.
2642 		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2643 		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2644 		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2645 		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2646 		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2647 		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
2648 		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
2649 		 *       buffers.
2650 		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
2651 		 *       index buffers.
2652 		 */
2653 		alias da_bgfx_create_dynamic_index_buffer_mem = bgfx_dynamic_index_buffer_handle_t function(const(bgfx_memory_t)* _mem, ushort _flags);
2654 		da_bgfx_create_dynamic_index_buffer_mem bgfx_create_dynamic_index_buffer_mem;
2655 		
2656 		/**
2657 		 * Update dynamic index buffer.
2658 		 * Params:
2659 		 * _handle = Dynamic index buffer handle.
2660 		 * _startIndex = Start index.
2661 		 * _mem = Index buffer data.
2662 		 */
2663 		alias da_bgfx_update_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle, uint _startIndex, const(bgfx_memory_t)* _mem);
2664 		da_bgfx_update_dynamic_index_buffer bgfx_update_dynamic_index_buffer;
2665 		
2666 		/**
2667 		 * Destroy dynamic index buffer.
2668 		 * Params:
2669 		 * _handle = Dynamic index buffer handle.
2670 		 */
2671 		alias da_bgfx_destroy_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle);
2672 		da_bgfx_destroy_dynamic_index_buffer bgfx_destroy_dynamic_index_buffer;
2673 		
2674 		/**
2675 		 * Create empty dynamic vertex buffer.
2676 		 * Params:
2677 		 * _num = Number of vertices.
2678 		 * _layout = Vertex layout.
2679 		 * _flags = Buffer creation flags.
2680 		 *   - `BGFX_BUFFER_NONE` - No flags.
2681 		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2682 		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2683 		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2684 		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2685 		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2686 		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
2687 		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
2688 		 *       buffers.
2689 		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
2690 		 *       index buffers.
2691 		 */
2692 		alias da_bgfx_create_dynamic_vertex_buffer = bgfx_dynamic_vertex_buffer_handle_t function(uint _num, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
2693 		da_bgfx_create_dynamic_vertex_buffer bgfx_create_dynamic_vertex_buffer;
2694 		
2695 		/**
2696 		 * Create dynamic vertex buffer and initialize it.
2697 		 * Params:
2698 		 * _mem = Vertex buffer data.
2699 		 * _layout = Vertex layout.
2700 		 * _flags = Buffer creation flags.
2701 		 *   - `BGFX_BUFFER_NONE` - No flags.
2702 		 *   - `BGFX_BUFFER_COMPUTE_READ` - Buffer will be read from by compute shader.
2703 		 *   - `BGFX_BUFFER_COMPUTE_WRITE` - Buffer will be written into by compute shader. When buffer
2704 		 *       is created with `BGFX_BUFFER_COMPUTE_WRITE` flag it cannot be updated from CPU.
2705 		 *   - `BGFX_BUFFER_COMPUTE_READ_WRITE` - Buffer will be used for read/write by compute shader.
2706 		 *   - `BGFX_BUFFER_ALLOW_RESIZE` - Buffer will resize on buffer update if a different amount of
2707 		 *       data is passed. If this flag is not specified, and more data is passed on update, the buffer
2708 		 *       will be trimmed to fit the existing buffer size. This flag has effect only on dynamic
2709 		 *       buffers.
2710 		 *   - `BGFX_BUFFER_INDEX32` - Buffer is using 32-bit indices. This flag has effect only on
2711 		 *       index buffers.
2712 		 */
2713 		alias da_bgfx_create_dynamic_vertex_buffer_mem = bgfx_dynamic_vertex_buffer_handle_t function(const(bgfx_memory_t)* _mem, const(bgfx_vertex_layout_t)* _layout, ushort _flags);
2714 		da_bgfx_create_dynamic_vertex_buffer_mem bgfx_create_dynamic_vertex_buffer_mem;
2715 		
2716 		/**
2717 		 * Update dynamic vertex buffer.
2718 		 * Params:
2719 		 * _handle = Dynamic vertex buffer handle.
2720 		 * _startVertex = Start vertex.
2721 		 * _mem = Vertex buffer data.
2722 		 */
2723 		alias da_bgfx_update_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, const(bgfx_memory_t)* _mem);
2724 		da_bgfx_update_dynamic_vertex_buffer bgfx_update_dynamic_vertex_buffer;
2725 		
2726 		/**
2727 		 * Destroy dynamic vertex buffer.
2728 		 * Params:
2729 		 * _handle = Dynamic vertex buffer handle.
2730 		 */
2731 		alias da_bgfx_destroy_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle);
2732 		da_bgfx_destroy_dynamic_vertex_buffer bgfx_destroy_dynamic_vertex_buffer;
2733 		
2734 		/**
2735 		 * Returns number of requested or maximum available indices.
2736 		 * Params:
2737 		 * _num = Number of required indices.
2738 		 * _index32 = Set to `true` if input indices will be 32-bit.
2739 		 */
2740 		alias da_bgfx_get_avail_transient_index_buffer = uint function(uint _num, bool _index32);
2741 		da_bgfx_get_avail_transient_index_buffer bgfx_get_avail_transient_index_buffer;
2742 		
2743 		/**
2744 		 * Returns number of requested or maximum available vertices.
2745 		 * Params:
2746 		 * _num = Number of required vertices.
2747 		 * _layout = Vertex layout.
2748 		 */
2749 		alias da_bgfx_get_avail_transient_vertex_buffer = uint function(uint _num, const(bgfx_vertex_layout_t)* _layout);
2750 		da_bgfx_get_avail_transient_vertex_buffer bgfx_get_avail_transient_vertex_buffer;
2751 		
2752 		/**
2753 		 * Returns number of requested or maximum available instance buffer slots.
2754 		 * Params:
2755 		 * _num = Number of required instances.
2756 		 * _stride = Stride per instance.
2757 		 */
2758 		alias da_bgfx_get_avail_instance_data_buffer = uint function(uint _num, ushort _stride);
2759 		da_bgfx_get_avail_instance_data_buffer bgfx_get_avail_instance_data_buffer;
2760 		
2761 		/**
2762 		 * Allocate transient index buffer.
2763 		 * Params:
2764 		 * _tib = TransientIndexBuffer structure is filled and is valid
2765 		 * for the duration of frame, and it can be reused for multiple draw
2766 		 * calls.
2767 		 * _num = Number of indices to allocate.
2768 		 * _index32 = Set to `true` if input indices will be 32-bit.
2769 		 */
2770 		alias da_bgfx_alloc_transient_index_buffer = void function(bgfx_transient_index_buffer_t* _tib, uint _num, bool _index32);
2771 		da_bgfx_alloc_transient_index_buffer bgfx_alloc_transient_index_buffer;
2772 		
2773 		/**
2774 		 * Allocate transient vertex buffer.
2775 		 * Params:
2776 		 * _tvb = TransientVertexBuffer structure is filled and is valid
2777 		 * for the duration of frame, and it can be reused for multiple draw
2778 		 * calls.
2779 		 * _num = Number of vertices to allocate.
2780 		 * _layout = Vertex layout.
2781 		 */
2782 		alias da_bgfx_alloc_transient_vertex_buffer = void function(bgfx_transient_vertex_buffer_t* _tvb, uint _num, const(bgfx_vertex_layout_t)* _layout);
2783 		da_bgfx_alloc_transient_vertex_buffer bgfx_alloc_transient_vertex_buffer;
2784 		
2785 		/**
2786 		 * Check for required space and allocate transient vertex and index
2787 		 * buffers. If both space requirements are satisfied function returns
2788 		 * true.
2789 		 * Params:
2790 		 * _tvb = TransientVertexBuffer structure is filled and is valid
2791 		 * for the duration of frame, and it can be reused for multiple draw
2792 		 * calls.
2793 		 * _layout = Vertex layout.
2794 		 * _numVertices = Number of vertices to allocate.
2795 		 * _tib = TransientIndexBuffer structure is filled and is valid
2796 		 * for the duration of frame, and it can be reused for multiple draw
2797 		 * calls.
2798 		 * _numIndices = Number of indices to allocate.
2799 		 * _index32 = Set to `true` if input indices will be 32-bit.
2800 		 */
2801 		alias da_bgfx_alloc_transient_buffers = bool function(bgfx_transient_vertex_buffer_t* _tvb, const(bgfx_vertex_layout_t)* _layout, uint _numVertices, bgfx_transient_index_buffer_t* _tib, uint _numIndices, bool _index32);
2802 		da_bgfx_alloc_transient_buffers bgfx_alloc_transient_buffers;
2803 		
2804 		/**
2805 		 * Allocate instance data buffer.
2806 		 * Params:
2807 		 * _idb = InstanceDataBuffer structure is filled and is valid
2808 		 * for duration of frame, and it can be reused for multiple draw
2809 		 * calls.
2810 		 * _num = Number of instances.
2811 		 * _stride = Instance stride. Must be multiple of 16.
2812 		 */
2813 		alias da_bgfx_alloc_instance_data_buffer = void function(bgfx_instance_data_buffer_t* _idb, uint _num, ushort _stride);
2814 		da_bgfx_alloc_instance_data_buffer bgfx_alloc_instance_data_buffer;
2815 		
2816 		/**
2817 		 * Create draw indirect buffer.
2818 		 * Params:
2819 		 * _num = Number of indirect calls.
2820 		 */
2821 		alias da_bgfx_create_indirect_buffer = bgfx_indirect_buffer_handle_t function(uint _num);
2822 		da_bgfx_create_indirect_buffer bgfx_create_indirect_buffer;
2823 		
2824 		/**
2825 		 * Destroy draw indirect buffer.
2826 		 * Params:
2827 		 * _handle = Indirect buffer handle.
2828 		 */
2829 		alias da_bgfx_destroy_indirect_buffer = void function(bgfx_indirect_buffer_handle_t _handle);
2830 		da_bgfx_destroy_indirect_buffer bgfx_destroy_indirect_buffer;
2831 		
2832 		/**
2833 		 * Create shader from memory buffer.
2834 		 * Params:
2835 		 * _mem = Shader binary.
2836 		 */
2837 		alias da_bgfx_create_shader = bgfx_shader_handle_t function(const(bgfx_memory_t)* _mem);
2838 		da_bgfx_create_shader bgfx_create_shader;
2839 		
2840 		/**
2841 		 * Returns the number of uniforms and uniform handles used inside a shader.
2842 		 * Remarks:
2843 		 *   Only non-predefined uniforms are returned.
2844 		 * Params:
2845 		 * _handle = Shader handle.
2846 		 * _uniforms = UniformHandle array where data will be stored.
2847 		 * _max = Maximum capacity of array.
2848 		 */
2849 		alias da_bgfx_get_shader_uniforms = ushort function(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, ushort _max);
2850 		da_bgfx_get_shader_uniforms bgfx_get_shader_uniforms;
2851 		
2852 		/**
2853 		 * Set shader debug name.
2854 		 * Params:
2855 		 * _handle = Shader handle.
2856 		 * _name = Shader name.
2857 		 * _len = Shader name length (if length is INT32_MAX, it's expected
2858 		 * that _name is zero terminated string).
2859 		 */
2860 		alias da_bgfx_set_shader_name = void function(bgfx_shader_handle_t _handle, const(char)* _name, int _len);
2861 		da_bgfx_set_shader_name bgfx_set_shader_name;
2862 		
2863 		/**
2864 		 * Destroy shader.
2865 		 * Remarks: Once a shader program is created with _handle,
2866 		 *   it is safe to destroy that shader.
2867 		 * Params:
2868 		 * _handle = Shader handle.
2869 		 */
2870 		alias da_bgfx_destroy_shader = void function(bgfx_shader_handle_t _handle);
2871 		da_bgfx_destroy_shader bgfx_destroy_shader;
2872 		
2873 		/**
2874 		 * Create program with vertex and fragment shaders.
2875 		 * Params:
2876 		 * _vsh = Vertex shader.
2877 		 * _fsh = Fragment shader.
2878 		 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
2879 		 */
2880 		alias da_bgfx_create_program = bgfx_program_handle_t function(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders);
2881 		da_bgfx_create_program bgfx_create_program;
2882 		
2883 		/**
2884 		 * Create program with compute shader.
2885 		 * Params:
2886 		 * _csh = Compute shader.
2887 		 * _destroyShaders = If true, shaders will be destroyed when program is destroyed.
2888 		 */
2889 		alias da_bgfx_create_compute_program = bgfx_program_handle_t function(bgfx_shader_handle_t _csh, bool _destroyShaders);
2890 		da_bgfx_create_compute_program bgfx_create_compute_program;
2891 		
2892 		/**
2893 		 * Destroy program.
2894 		 * Params:
2895 		 * _handle = Program handle.
2896 		 */
2897 		alias da_bgfx_destroy_program = void function(bgfx_program_handle_t _handle);
2898 		da_bgfx_destroy_program bgfx_destroy_program;
2899 		
2900 		/**
2901 		 * Validate texture parameters.
2902 		 * Params:
2903 		 * _depth = Depth dimension of volume texture.
2904 		 * _cubeMap = Indicates that texture contains cubemap.
2905 		 * _numLayers = Number of layers in texture array.
2906 		 * _format = Texture format. See: `TextureFormat::Enum`.
2907 		 * _flags = Texture flags. See `BGFX_TEXTURE_*`.
2908 		 */
2909 		alias da_bgfx_is_texture_valid = bool function(ushort _depth, bool _cubeMap, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
2910 		da_bgfx_is_texture_valid bgfx_is_texture_valid;
2911 		
2912 		/**
2913 		 * Validate frame buffer parameters.
2914 		 * Params:
2915 		 * _num = Number of attachments.
2916 		 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
2917 		 */
2918 		alias da_bgfx_is_frame_buffer_valid = bool function(byte _num, const(bgfx_attachment_t)* _attachment);
2919 		da_bgfx_is_frame_buffer_valid bgfx_is_frame_buffer_valid;
2920 		
2921 		/**
2922 		 * Calculate amount of memory required for texture.
2923 		 * Params:
2924 		 * _info = Resulting texture info structure. See: `TextureInfo`.
2925 		 * _width = Width.
2926 		 * _height = Height.
2927 		 * _depth = Depth dimension of volume texture.
2928 		 * _cubeMap = Indicates that texture contains cubemap.
2929 		 * _hasMips = Indicates that texture contains full mip-map chain.
2930 		 * _numLayers = Number of layers in texture array.
2931 		 * _format = Texture format. See: `TextureFormat::Enum`.
2932 		 */
2933 		alias da_bgfx_calc_texture_size = void function(bgfx_texture_info_t* _info, ushort _width, ushort _height, ushort _depth, bool _cubeMap, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format);
2934 		da_bgfx_calc_texture_size bgfx_calc_texture_size;
2935 		
2936 		/**
2937 		 * Create texture from memory buffer.
2938 		 * Params:
2939 		 * _mem = DDS, KTX or PVR texture binary data.
2940 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
2941 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
2942 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
2943 		 *   mode.
2944 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
2945 		 *   sampling.
2946 		 * _skip = Skip top level mips when parsing texture.
2947 		 * _info = When non-`NULL` is specified it returns parsed texture information.
2948 		 */
2949 		alias da_bgfx_create_texture = bgfx_texture_handle_t function(const(bgfx_memory_t)* _mem, ulong _flags, byte _skip, bgfx_texture_info_t* _info);
2950 		da_bgfx_create_texture bgfx_create_texture;
2951 		
2952 		/**
2953 		 * Create 2D texture.
2954 		 * Params:
2955 		 * _width = Width.
2956 		 * _height = Height.
2957 		 * _hasMips = Indicates that texture contains full mip-map chain.
2958 		 * _numLayers = Number of layers in texture array. Must be 1 if caps
2959 		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
2960 		 * _format = Texture format. See: `TextureFormat::Enum`.
2961 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
2962 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
2963 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
2964 		 *   mode.
2965 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
2966 		 *   sampling.
2967 		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
2968 		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
2969 		 * 1, expected memory layout is texture and all mips together for each array element.
2970 		 */
2971 		alias da_bgfx_create_texture_2d = bgfx_texture_handle_t function(ushort _width, ushort _height, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
2972 		da_bgfx_create_texture_2d bgfx_create_texture_2d;
2973 		
2974 		/**
2975 		 * Create texture with size based on backbuffer ratio. Texture will maintain ratio
2976 		 * if back buffer resolution changes.
2977 		 * Params:
2978 		 * _ratio = Texture size in respect to back-buffer size. See: `BackbufferRatio::Enum`.
2979 		 * _hasMips = Indicates that texture contains full mip-map chain.
2980 		 * _numLayers = Number of layers in texture array. Must be 1 if caps
2981 		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
2982 		 * _format = Texture format. See: `TextureFormat::Enum`.
2983 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
2984 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
2985 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
2986 		 *   mode.
2987 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
2988 		 *   sampling.
2989 		 */
2990 		alias da_bgfx_create_texture_2d_scaled = bgfx_texture_handle_t function(bgfx_backbuffer_ratio_t _ratio, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags);
2991 		da_bgfx_create_texture_2d_scaled bgfx_create_texture_2d_scaled;
2992 		
2993 		/**
2994 		 * Create 3D texture.
2995 		 * Params:
2996 		 * _width = Width.
2997 		 * _height = Height.
2998 		 * _depth = Depth.
2999 		 * _hasMips = Indicates that texture contains full mip-map chain.
3000 		 * _format = Texture format. See: `TextureFormat::Enum`.
3001 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
3002 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
3003 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
3004 		 *   mode.
3005 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
3006 		 *   sampling.
3007 		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
3008 		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
3009 		 * 1, expected memory layout is texture and all mips together for each array element.
3010 		 */
3011 		alias da_bgfx_create_texture_3d = bgfx_texture_handle_t function(ushort _width, ushort _height, ushort _depth, bool _hasMips, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
3012 		da_bgfx_create_texture_3d bgfx_create_texture_3d;
3013 		
3014 		/**
3015 		 * Create Cube texture.
3016 		 * Params:
3017 		 * _size = Cube side size.
3018 		 * _hasMips = Indicates that texture contains full mip-map chain.
3019 		 * _numLayers = Number of layers in texture array. Must be 1 if caps
3020 		 * `BGFX_CAPS_TEXTURE_2D_ARRAY` flag is not set.
3021 		 * _format = Texture format. See: `TextureFormat::Enum`.
3022 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
3023 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
3024 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
3025 		 *   mode.
3026 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
3027 		 *   sampling.
3028 		 * _mem = Texture data. If `_mem` is non-NULL, created texture will be immutable. If
3029 		 * `_mem` is NULL content of the texture is uninitialized. When `_numLayers` is more than
3030 		 * 1, expected memory layout is texture and all mips together for each array element.
3031 		 */
3032 		alias da_bgfx_create_texture_cube = bgfx_texture_handle_t function(ushort _size, bool _hasMips, ushort _numLayers, bgfx_texture_format_t _format, ulong _flags, const(bgfx_memory_t)* _mem);
3033 		da_bgfx_create_texture_cube bgfx_create_texture_cube;
3034 		
3035 		/**
3036 		 * Update 2D texture.
3037 		 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture2D` for more info.
3038 		 * Params:
3039 		 * _handle = Texture handle.
3040 		 * _layer = Layer in texture array.
3041 		 * _mip = Mip level.
3042 		 * _x = X offset in texture.
3043 		 * _y = Y offset in texture.
3044 		 * _width = Width of texture block.
3045 		 * _height = Height of texture block.
3046 		 * _mem = Texture update data.
3047 		 * _pitch = Pitch of input image (bytes). When _pitch is set to
3048 		 * UINT16_MAX, it will be calculated internally based on _width.
3049 		 */
3050 		alias da_bgfx_update_texture_2d = void function(bgfx_texture_handle_t _handle, ushort _layer, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
3051 		da_bgfx_update_texture_2d bgfx_update_texture_2d;
3052 		
3053 		/**
3054 		 * Update 3D texture.
3055 		 * Attention: It's valid to update only mutable texture. See `bgfx::createTexture3D` for more info.
3056 		 * Params:
3057 		 * _handle = Texture handle.
3058 		 * _mip = Mip level.
3059 		 * _x = X offset in texture.
3060 		 * _y = Y offset in texture.
3061 		 * _z = Z offset in texture.
3062 		 * _width = Width of texture block.
3063 		 * _height = Height of texture block.
3064 		 * _depth = Depth of texture block.
3065 		 * _mem = Texture update data.
3066 		 */
3067 		alias da_bgfx_update_texture_3d = void function(bgfx_texture_handle_t _handle, byte _mip, ushort _x, ushort _y, ushort _z, ushort _width, ushort _height, ushort _depth, const(bgfx_memory_t)* _mem);
3068 		da_bgfx_update_texture_3d bgfx_update_texture_3d;
3069 		
3070 		/**
3071 		 * Update Cube texture.
3072 		 * Attention: It's valid to update only mutable texture. See `bgfx::createTextureCube` for more info.
3073 		 * Params:
3074 		 * _handle = Texture handle.
3075 		 * _layer = Layer in texture array.
3076 		 * _side = Cubemap side `BGFX_CUBE_MAP_<POSITIVE or NEGATIVE>_<X, Y or Z>`,
3077 		 *   where 0 is +X, 1 is -X, 2 is +Y, 3 is -Y, 4 is +Z, and 5 is -Z.
3078 		 *                  +----------+
3079 		 *                  |-z       2|
3080 		 *                  | ^  +y    |
3081 		 *                  | |        |    Unfolded cube:
3082 		 *                  | +---->+x |
3083 		 *       +----------+----------+----------+----------+
3084 		 *       |+y       1|+y       4|+y       0|+y       5|
3085 		 *       | ^  -x    | ^  +z    | ^  +x    | ^  -z    |
3086 		 *       | |        | |        | |        | |        |
3087 		 *       | +---->+z | +---->+x | +---->-z | +---->-x |
3088 		 *       +----------+----------+----------+----------+
3089 		 *                  |+z       3|
3090 		 *                  | ^  -y    |
3091 		 *                  | |        |
3092 		 *                  | +---->+x |
3093 		 *                  +----------+
3094 		 * _mip = Mip level.
3095 		 * _x = X offset in texture.
3096 		 * _y = Y offset in texture.
3097 		 * _width = Width of texture block.
3098 		 * _height = Height of texture block.
3099 		 * _mem = Texture update data.
3100 		 * _pitch = Pitch of input image (bytes). When _pitch is set to
3101 		 * UINT16_MAX, it will be calculated internally based on _width.
3102 		 */
3103 		alias da_bgfx_update_texture_cube = void function(bgfx_texture_handle_t _handle, ushort _layer, byte _side, byte _mip, ushort _x, ushort _y, ushort _width, ushort _height, const(bgfx_memory_t)* _mem, ushort _pitch);
3104 		da_bgfx_update_texture_cube bgfx_update_texture_cube;
3105 		
3106 		/**
3107 		 * Read back texture content.
3108 		 * Attention: Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
3109 		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
3110 		 * Params:
3111 		 * _handle = Texture handle.
3112 		 * _data = Destination buffer.
3113 		 * _mip = Mip level.
3114 		 */
3115 		alias da_bgfx_read_texture = uint function(bgfx_texture_handle_t _handle, void* _data, byte _mip);
3116 		da_bgfx_read_texture bgfx_read_texture;
3117 		
3118 		/**
3119 		 * Set texture debug name.
3120 		 * Params:
3121 		 * _handle = Texture handle.
3122 		 * _name = Texture name.
3123 		 * _len = Texture name length (if length is INT32_MAX, it's expected
3124 		 * that _name is zero terminated string.
3125 		 */
3126 		alias da_bgfx_set_texture_name = void function(bgfx_texture_handle_t _handle, const(char)* _name, int _len);
3127 		da_bgfx_set_texture_name bgfx_set_texture_name;
3128 		
3129 		/**
3130 		 * Returns texture direct access pointer.
3131 		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_DIRECT_ACCESS`. This feature
3132 		 *   is available on GPUs that have unified memory architecture (UMA) support.
3133 		 * Params:
3134 		 * _handle = Texture handle.
3135 		 */
3136 		alias da_bgfx_get_direct_access_ptr = void* function(bgfx_texture_handle_t _handle);
3137 		da_bgfx_get_direct_access_ptr bgfx_get_direct_access_ptr;
3138 		
3139 		/**
3140 		 * Destroy texture.
3141 		 * Params:
3142 		 * _handle = Texture handle.
3143 		 */
3144 		alias da_bgfx_destroy_texture = void function(bgfx_texture_handle_t _handle);
3145 		da_bgfx_destroy_texture bgfx_destroy_texture;
3146 		
3147 		/**
3148 		 * Create frame buffer (simple).
3149 		 * Params:
3150 		 * _width = Texture width.
3151 		 * _height = Texture height.
3152 		 * _format = Texture format. See: `TextureFormat::Enum`.
3153 		 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
3154 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
3155 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
3156 		 *   mode.
3157 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
3158 		 *   sampling.
3159 		 */
3160 		alias da_bgfx_create_frame_buffer = bgfx_frame_buffer_handle_t function(ushort _width, ushort _height, bgfx_texture_format_t _format, ulong _textureFlags);
3161 		da_bgfx_create_frame_buffer bgfx_create_frame_buffer;
3162 		
3163 		/**
3164 		 * Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
3165 		 * if back buffer resolution changes.
3166 		 * Params:
3167 		 * _ratio = Frame buffer size in respect to back-buffer size. See:
3168 		 * `BackbufferRatio::Enum`.
3169 		 * _format = Texture format. See: `TextureFormat::Enum`.
3170 		 * _textureFlags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
3171 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
3172 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
3173 		 *   mode.
3174 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
3175 		 *   sampling.
3176 		 */
3177 		alias da_bgfx_create_frame_buffer_scaled = bgfx_frame_buffer_handle_t function(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, ulong _textureFlags);
3178 		da_bgfx_create_frame_buffer_scaled bgfx_create_frame_buffer_scaled;
3179 		
3180 		/**
3181 		 * Create MRT frame buffer from texture handles (simple).
3182 		 * Params:
3183 		 * _num = Number of texture handles.
3184 		 * _handles = Texture attachments.
3185 		 * _destroyTexture = If true, textures will be destroyed when
3186 		 * frame buffer is destroyed.
3187 		 */
3188 		alias da_bgfx_create_frame_buffer_from_handles = bgfx_frame_buffer_handle_t function(byte _num, const(bgfx_texture_handle_t)* _handles, bool _destroyTexture);
3189 		da_bgfx_create_frame_buffer_from_handles bgfx_create_frame_buffer_from_handles;
3190 		
3191 		/**
3192 		 * Create MRT frame buffer from texture handles with specific layer and
3193 		 * mip level.
3194 		 * Params:
3195 		 * _num = Number of attachments.
3196 		 * _attachment = Attachment texture info. See: `bgfx::Attachment`.
3197 		 * _destroyTexture = If true, textures will be destroyed when
3198 		 * frame buffer is destroyed.
3199 		 */
3200 		alias da_bgfx_create_frame_buffer_from_attachment = bgfx_frame_buffer_handle_t function(byte _num, const(bgfx_attachment_t)* _attachment, bool _destroyTexture);
3201 		da_bgfx_create_frame_buffer_from_attachment bgfx_create_frame_buffer_from_attachment;
3202 		
3203 		/**
3204 		 * Create frame buffer for multiple window rendering.
3205 		 * Remarks:
3206 		 *   Frame buffer cannot be used for sampling.
3207 		 * Attention: Availability depends on: `BGFX_CAPS_SWAP_CHAIN`.
3208 		 * Params:
3209 		 * _nwh = OS' target native window handle.
3210 		 * _width = Window back buffer width.
3211 		 * _height = Window back buffer height.
3212 		 * _format = Window back buffer color format.
3213 		 * _depthFormat = Window back buffer depth format.
3214 		 */
3215 		alias da_bgfx_create_frame_buffer_from_nwh = bgfx_frame_buffer_handle_t function(void* _nwh, ushort _width, ushort _height, bgfx_texture_format_t _format, bgfx_texture_format_t _depthFormat);
3216 		da_bgfx_create_frame_buffer_from_nwh bgfx_create_frame_buffer_from_nwh;
3217 		
3218 		/**
3219 		 * Set frame buffer debug name.
3220 		 * Params:
3221 		 * _handle = Frame buffer handle.
3222 		 * _name = Frame buffer name.
3223 		 * _len = Frame buffer name length (if length is INT32_MAX, it's expected
3224 		 * that _name is zero terminated string.
3225 		 */
3226 		alias da_bgfx_set_frame_buffer_name = void function(bgfx_frame_buffer_handle_t _handle, const(char)* _name, int _len);
3227 		da_bgfx_set_frame_buffer_name bgfx_set_frame_buffer_name;
3228 		
3229 		/**
3230 		 * Obtain texture handle of frame buffer attachment.
3231 		 * Params:
3232 		 * _handle = Frame buffer handle.
3233 		 */
3234 		alias da_bgfx_get_texture = bgfx_texture_handle_t function(bgfx_frame_buffer_handle_t _handle, byte _attachment);
3235 		da_bgfx_get_texture bgfx_get_texture;
3236 		
3237 		/**
3238 		 * Destroy frame buffer.
3239 		 * Params:
3240 		 * _handle = Frame buffer handle.
3241 		 */
3242 		alias da_bgfx_destroy_frame_buffer = void function(bgfx_frame_buffer_handle_t _handle);
3243 		da_bgfx_destroy_frame_buffer bgfx_destroy_frame_buffer;
3244 		
3245 		/**
3246 		 * Create shader uniform parameter.
3247 		 * Remarks:
3248 		 *   1. Uniform names are unique. It's valid to call `bgfx::createUniform`
3249 		 *      multiple times with the same uniform name. The library will always
3250 		 *      return the same handle, but the handle reference count will be
3251 		 *      incremented. This means that the same number of `bgfx::destroyUniform`
3252 		 *      must be called to properly destroy the uniform.
3253 		 *   2. Predefined uniforms (declared in `bgfx_shader.sh`):
3254 		 *      - `u_viewRect vec4(x, y, width, height)` - view rectangle for current
3255 		 *        view, in pixels.
3256 		 *      - `u_viewTexel vec4(1.0/width, 1.0/height, undef, undef)` - inverse
3257 		 *        width and height
3258 		 *      - `u_view mat4` - view matrix
3259 		 *      - `u_invView mat4` - inverted view matrix
3260 		 *      - `u_proj mat4` - projection matrix
3261 		 *      - `u_invProj mat4` - inverted projection matrix
3262 		 *      - `u_viewProj mat4` - concatenated view projection matrix
3263 		 *      - `u_invViewProj mat4` - concatenated inverted view projection matrix
3264 		 *      - `u_model mat4[BGFX_CONFIG_MAX_BONES]` - array of model matrices.
3265 		 *      - `u_modelView mat4` - concatenated model view matrix, only first
3266 		 *        model matrix from array is used.
3267 		 *      - `u_modelViewProj mat4` - concatenated model view projection matrix.
3268 		 *      - `u_alphaRef float` - alpha reference value for alpha test.
3269 		 * Params:
3270 		 * _name = Uniform name in shader.
3271 		 * _type = Type of uniform (See: `bgfx::UniformType`).
3272 		 * _num = Number of elements in array.
3273 		 */
3274 		alias da_bgfx_create_uniform = bgfx_uniform_handle_t function(const(char)* _name, bgfx_uniform_type_t _type, ushort _num);
3275 		da_bgfx_create_uniform bgfx_create_uniform;
3276 		
3277 		/**
3278 		 * Retrieve uniform info.
3279 		 * Params:
3280 		 * _handle = Handle to uniform object.
3281 		 * _info = Uniform info.
3282 		 */
3283 		alias da_bgfx_get_uniform_info = void function(bgfx_uniform_handle_t _handle, bgfx_uniform_info_t* _info);
3284 		da_bgfx_get_uniform_info bgfx_get_uniform_info;
3285 		
3286 		/**
3287 		 * Destroy shader uniform parameter.
3288 		 * Params:
3289 		 * _handle = Handle to uniform object.
3290 		 */
3291 		alias da_bgfx_destroy_uniform = void function(bgfx_uniform_handle_t _handle);
3292 		da_bgfx_destroy_uniform bgfx_destroy_uniform;
3293 		
3294 		/**
3295 		 * Create occlusion query.
3296 		 */
3297 		alias da_bgfx_create_occlusion_query = bgfx_occlusion_query_handle_t function();
3298 		da_bgfx_create_occlusion_query bgfx_create_occlusion_query;
3299 		
3300 		/**
3301 		 * Retrieve occlusion query result from previous frame.
3302 		 * Params:
3303 		 * _handle = Handle to occlusion query object.
3304 		 * _result = Number of pixels that passed test. This argument
3305 		 * can be `NULL` if result of occlusion query is not needed.
3306 		 */
3307 		alias da_bgfx_get_result = bgfx_occlusion_query_result_t function(bgfx_occlusion_query_handle_t _handle, int* _result);
3308 		da_bgfx_get_result bgfx_get_result;
3309 		
3310 		/**
3311 		 * Destroy occlusion query.
3312 		 * Params:
3313 		 * _handle = Handle to occlusion query object.
3314 		 */
3315 		alias da_bgfx_destroy_occlusion_query = void function(bgfx_occlusion_query_handle_t _handle);
3316 		da_bgfx_destroy_occlusion_query bgfx_destroy_occlusion_query;
3317 		
3318 		/**
3319 		 * Set palette color value.
3320 		 * Params:
3321 		 * _index = Index into palette.
3322 		 * _rgba = RGBA floating point values.
3323 		 */
3324 		alias da_bgfx_set_palette_color = void function(byte _index, const float[4] _rgba);
3325 		da_bgfx_set_palette_color bgfx_set_palette_color;
3326 		
3327 		/**
3328 		 * Set palette color value.
3329 		 * Params:
3330 		 * _index = Index into palette.
3331 		 * _rgba = Packed 32-bit RGBA value.
3332 		 */
3333 		alias da_bgfx_set_palette_color_rgba8 = void function(byte _index, uint _rgba);
3334 		da_bgfx_set_palette_color_rgba8 bgfx_set_palette_color_rgba8;
3335 		
3336 		/**
3337 		 * Set view name.
3338 		 * Remarks:
3339 		 *   This is debug only feature.
3340 		 *   In graphics debugger view name will appear as:
3341 		 *       "nnnc <view name>"
3342 		 *        ^  ^ ^
3343 		 *        |  +--- compute (C)
3344 		 *        +------ view id
3345 		 * Params:
3346 		 * _id = View id.
3347 		 * _name = View name.
3348 		 */
3349 		alias da_bgfx_set_view_name = void function(bgfx_view_id_t _id, const(char)* _name);
3350 		da_bgfx_set_view_name bgfx_set_view_name;
3351 		
3352 		/**
3353 		 * Set view rectangle. Draw primitive outside view will be clipped.
3354 		 * Params:
3355 		 * _id = View id.
3356 		 * _x = Position x from the left corner of the window.
3357 		 * _y = Position y from the top corner of the window.
3358 		 * _width = Width of view port region.
3359 		 * _height = Height of view port region.
3360 		 */
3361 		alias da_bgfx_set_view_rect = void function(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
3362 		da_bgfx_set_view_rect bgfx_set_view_rect;
3363 		
3364 		/**
3365 		 * Set view rectangle. Draw primitive outside view will be clipped.
3366 		 * Params:
3367 		 * _id = View id.
3368 		 * _x = Position x from the left corner of the window.
3369 		 * _y = Position y from the top corner of the window.
3370 		 * _ratio = Width and height will be set in respect to back-buffer size.
3371 		 * See: `BackbufferRatio::Enum`.
3372 		 */
3373 		alias da_bgfx_set_view_rect_ratio = void function(bgfx_view_id_t _id, ushort _x, ushort _y, bgfx_backbuffer_ratio_t _ratio);
3374 		da_bgfx_set_view_rect_ratio bgfx_set_view_rect_ratio;
3375 		
3376 		/**
3377 		 * Set view scissor. Draw primitive outside view will be clipped. When
3378 		 * _x, _y, _width and _height are set to 0, scissor will be disabled.
3379 		 * Params:
3380 		 * _id = View id.
3381 		 * _x = Position x from the left corner of the window.
3382 		 * _y = Position y from the top corner of the window.
3383 		 * _width = Width of view scissor region.
3384 		 * _height = Height of view scissor region.
3385 		 */
3386 		alias da_bgfx_set_view_scissor = void function(bgfx_view_id_t _id, ushort _x, ushort _y, ushort _width, ushort _height);
3387 		da_bgfx_set_view_scissor bgfx_set_view_scissor;
3388 		
3389 		/**
3390 		 * Set view clear flags.
3391 		 * Params:
3392 		 * _id = View id.
3393 		 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
3394 		 * operation. See: `BGFX_CLEAR_*`.
3395 		 * _rgba = Color clear value.
3396 		 * _depth = Depth clear value.
3397 		 * _stencil = Stencil clear value.
3398 		 */
3399 		alias da_bgfx_set_view_clear = void function(bgfx_view_id_t _id, ushort _flags, uint _rgba, float _depth, byte _stencil);
3400 		da_bgfx_set_view_clear bgfx_set_view_clear;
3401 		
3402 		/**
3403 		 * Set view clear flags with different clear color for each
3404 		 * frame buffer texture. Must use `bgfx::setPaletteColor` to setup clear color
3405 		 * palette.
3406 		 * Params:
3407 		 * _id = View id.
3408 		 * _flags = Clear flags. Use `BGFX_CLEAR_NONE` to remove any clear
3409 		 * operation. See: `BGFX_CLEAR_*`.
3410 		 * _depth = Depth clear value.
3411 		 * _stencil = Stencil clear value.
3412 		 * _c0 = Palette index for frame buffer attachment 0.
3413 		 * _c1 = Palette index for frame buffer attachment 1.
3414 		 * _c2 = Palette index for frame buffer attachment 2.
3415 		 * _c3 = Palette index for frame buffer attachment 3.
3416 		 * _c4 = Palette index for frame buffer attachment 4.
3417 		 * _c5 = Palette index for frame buffer attachment 5.
3418 		 * _c6 = Palette index for frame buffer attachment 6.
3419 		 * _c7 = Palette index for frame buffer attachment 7.
3420 		 */
3421 		alias da_bgfx_set_view_clear_mrt = void function(bgfx_view_id_t _id, ushort _flags, float _depth, byte _stencil, byte _c0, byte _c1, byte _c2, byte _c3, byte _c4, byte _c5, byte _c6, byte _c7);
3422 		da_bgfx_set_view_clear_mrt bgfx_set_view_clear_mrt;
3423 		
3424 		/**
3425 		 * Set view sorting mode.
3426 		 * Remarks:
3427 		 *   View mode must be set prior calling `bgfx::submit` for the view.
3428 		 * Params:
3429 		 * _id = View id.
3430 		 * _mode = View sort mode. See `ViewMode::Enum`.
3431 		 */
3432 		alias da_bgfx_set_view_mode = void function(bgfx_view_id_t _id, bgfx_view_mode_t _mode);
3433 		da_bgfx_set_view_mode bgfx_set_view_mode;
3434 		
3435 		/**
3436 		 * Set view frame buffer.
3437 		 * Remarks:
3438 		 *   Not persistent after `bgfx::reset` call.
3439 		 * Params:
3440 		 * _id = View id.
3441 		 * _handle = Frame buffer handle. Passing `BGFX_INVALID_HANDLE` as
3442 		 * frame buffer handle will draw primitives from this view into
3443 		 * default back buffer.
3444 		 */
3445 		alias da_bgfx_set_view_frame_buffer = void function(bgfx_view_id_t _id, bgfx_frame_buffer_handle_t _handle);
3446 		da_bgfx_set_view_frame_buffer bgfx_set_view_frame_buffer;
3447 		
3448 		/**
3449 		 * Set view view and projection matrices, all draw primitives in this
3450 		 * view will use these matrices.
3451 		 * Params:
3452 		 * _id = View id.
3453 		 * _view = View matrix.
3454 		 * _proj = Projection matrix.
3455 		 */
3456 		alias da_bgfx_set_view_transform = void function(bgfx_view_id_t _id, const(void)* _view, const(void)* _proj);
3457 		da_bgfx_set_view_transform bgfx_set_view_transform;
3458 		
3459 		/**
3460 		 * Post submit view reordering.
3461 		 * Params:
3462 		 * _id = First view id.
3463 		 * _num = Number of views to remap.
3464 		 * _order = View remap id table. Passing `NULL` will reset view ids
3465 		 * to default state.
3466 		 */
3467 		alias da_bgfx_set_view_order = void function(bgfx_view_id_t _id, ushort _num, const(bgfx_view_id_t)* _order);
3468 		da_bgfx_set_view_order bgfx_set_view_order;
3469 		
3470 		/**
3471 		 * Reset all view settings to default.
3472 		 */
3473 		alias da_bgfx_reset_view = void function(bgfx_view_id_t _id);
3474 		da_bgfx_reset_view bgfx_reset_view;
3475 		
3476 		/**
3477 		 * Begin submitting draw calls from thread.
3478 		 * Params:
3479 		 * _forThread = Explicitly request an encoder for a worker thread.
3480 		 */
3481 		alias da_bgfx_encoder_begin = bgfx_encoder_t* function(bool _forThread);
3482 		da_bgfx_encoder_begin bgfx_encoder_begin;
3483 		
3484 		/**
3485 		 * End submitting draw calls from thread.
3486 		 * Params:
3487 		 * _encoder = Encoder.
3488 		 */
3489 		alias da_bgfx_encoder_end = void function(bgfx_encoder_t* _encoder);
3490 		da_bgfx_encoder_end bgfx_encoder_end;
3491 		
3492 		/**
3493 		 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
3494 		 * graphics debugging tools.
3495 		 * Params:
3496 		 * _marker = Marker string.
3497 		 */
3498 		alias da_bgfx_encoder_set_marker = void function(bgfx_encoder_t* _this, const(char)* _marker);
3499 		da_bgfx_encoder_set_marker bgfx_encoder_set_marker;
3500 		
3501 		/**
3502 		 * Set render states for draw primitive.
3503 		 * Remarks:
3504 		 *   1. To setup more complex states use:
3505 		 *      `BGFX_STATE_ALPHA_REF(_ref)`,
3506 		 *      `BGFX_STATE_POINT_SIZE(_size)`,
3507 		 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
3508 		 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
3509 		 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
3510 		 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
3511 		 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
3512 		 *      equation is specified.
3513 		 * Params:
3514 		 * _state = State flags. Default state for primitive type is
3515 		 *   triangles. See: `BGFX_STATE_DEFAULT`.
3516 		 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
3517 		 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
3518 		 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
3519 		 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
3520 		 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
3521 		 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
3522 		 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
3523 		 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
3524 		 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
3525 		 */
3526 		alias da_bgfx_encoder_set_state = void function(bgfx_encoder_t* _this, ulong _state, uint _rgba);
3527 		da_bgfx_encoder_set_state bgfx_encoder_set_state;
3528 		
3529 		/**
3530 		 * Set condition for rendering.
3531 		 * Params:
3532 		 * _handle = Occlusion query handle.
3533 		 * _visible = Render if occlusion query is visible.
3534 		 */
3535 		alias da_bgfx_encoder_set_condition = void function(bgfx_encoder_t* _this, bgfx_occlusion_query_handle_t _handle, bool _visible);
3536 		da_bgfx_encoder_set_condition bgfx_encoder_set_condition;
3537 		
3538 		/**
3539 		 * Set stencil test state.
3540 		 * Params:
3541 		 * _fstencil = Front stencil state.
3542 		 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
3543 		 * _fstencil is applied to both front and back facing primitives.
3544 		 */
3545 		alias da_bgfx_encoder_set_stencil = void function(bgfx_encoder_t* _this, uint _fstencil, uint _bstencil);
3546 		da_bgfx_encoder_set_stencil bgfx_encoder_set_stencil;
3547 		
3548 		/**
3549 		 * Set scissor for draw primitive.
3550 		 * Remarks:
3551 		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
3552 		 * Params:
3553 		 * _x = Position x from the left corner of the window.
3554 		 * _y = Position y from the top corner of the window.
3555 		 * _width = Width of view scissor region.
3556 		 * _height = Height of view scissor region.
3557 		 */
3558 		alias da_bgfx_encoder_set_scissor = ushort function(bgfx_encoder_t* _this, ushort _x, ushort _y, ushort _width, ushort _height);
3559 		da_bgfx_encoder_set_scissor bgfx_encoder_set_scissor;
3560 		
3561 		/**
3562 		 * Set scissor from cache for draw primitive.
3563 		 * Remarks:
3564 		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
3565 		 * Params:
3566 		 * _cache = Index in scissor cache.
3567 		 */
3568 		alias da_bgfx_encoder_set_scissor_cached = void function(bgfx_encoder_t* _this, ushort _cache);
3569 		da_bgfx_encoder_set_scissor_cached bgfx_encoder_set_scissor_cached;
3570 		
3571 		/**
3572 		 * Set model matrix for draw primitive. If it is not called,
3573 		 * the model will be rendered with an identity model matrix.
3574 		 * Params:
3575 		 * _mtx = Pointer to first matrix in array.
3576 		 * _num = Number of matrices in array.
3577 		 */
3578 		alias da_bgfx_encoder_set_transform = uint function(bgfx_encoder_t* _this, const(void)* _mtx, ushort _num);
3579 		da_bgfx_encoder_set_transform bgfx_encoder_set_transform;
3580 		
3581 		/**
3582 		 *  Set model matrix from matrix cache for draw primitive.
3583 		 * Params:
3584 		 * _cache = Index in matrix cache.
3585 		 * _num = Number of matrices from cache.
3586 		 */
3587 		alias da_bgfx_encoder_set_transform_cached = void function(bgfx_encoder_t* _this, uint _cache, ushort _num);
3588 		da_bgfx_encoder_set_transform_cached bgfx_encoder_set_transform_cached;
3589 		
3590 		/**
3591 		 * Reserve matrices in internal matrix cache.
3592 		 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
3593 		 * Params:
3594 		 * _transform = Pointer to `Transform` structure.
3595 		 * _num = Number of matrices.
3596 		 */
3597 		alias da_bgfx_encoder_alloc_transform = uint function(bgfx_encoder_t* _this, bgfx_transform_t* _transform, ushort _num);
3598 		da_bgfx_encoder_alloc_transform bgfx_encoder_alloc_transform;
3599 		
3600 		/**
3601 		 * Set shader uniform parameter for draw primitive.
3602 		 * Params:
3603 		 * _handle = Uniform.
3604 		 * _value = Pointer to uniform data.
3605 		 * _num = Number of elements. Passing `UINT16_MAX` will
3606 		 * use the _num passed on uniform creation.
3607 		 */
3608 		alias da_bgfx_encoder_set_uniform = void function(bgfx_encoder_t* _this, bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
3609 		da_bgfx_encoder_set_uniform bgfx_encoder_set_uniform;
3610 		
3611 		/**
3612 		 * Set index buffer for draw primitive.
3613 		 * Params:
3614 		 * _handle = Index buffer.
3615 		 * _firstIndex = First index to render.
3616 		 * _numIndices = Number of indices to render.
3617 		 */
3618 		alias da_bgfx_encoder_set_index_buffer = void function(bgfx_encoder_t* _this, bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
3619 		da_bgfx_encoder_set_index_buffer bgfx_encoder_set_index_buffer;
3620 		
3621 		/**
3622 		 * Set index buffer for draw primitive.
3623 		 * Params:
3624 		 * _handle = Dynamic index buffer.
3625 		 * _firstIndex = First index to render.
3626 		 * _numIndices = Number of indices to render.
3627 		 */
3628 		alias da_bgfx_encoder_set_dynamic_index_buffer = void function(bgfx_encoder_t* _this, bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
3629 		da_bgfx_encoder_set_dynamic_index_buffer bgfx_encoder_set_dynamic_index_buffer;
3630 		
3631 		/**
3632 		 * Set index buffer for draw primitive.
3633 		 * Params:
3634 		 * _tib = Transient index buffer.
3635 		 * _firstIndex = First index to render.
3636 		 * _numIndices = Number of indices to render.
3637 		 */
3638 		alias da_bgfx_encoder_set_transient_index_buffer = void function(bgfx_encoder_t* _this, const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
3639 		da_bgfx_encoder_set_transient_index_buffer bgfx_encoder_set_transient_index_buffer;
3640 		
3641 		/**
3642 		 * Set vertex buffer for draw primitive.
3643 		 * Params:
3644 		 * _stream = Vertex stream.
3645 		 * _handle = Vertex buffer.
3646 		 * _startVertex = First vertex to render.
3647 		 * _numVertices = Number of vertices to render.
3648 		 */
3649 		alias da_bgfx_encoder_set_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
3650 		da_bgfx_encoder_set_vertex_buffer bgfx_encoder_set_vertex_buffer;
3651 		
3652 		/**
3653 		 * Set vertex buffer for draw primitive.
3654 		 * Params:
3655 		 * _stream = Vertex stream.
3656 		 * _handle = Vertex buffer.
3657 		 * _startVertex = First vertex to render.
3658 		 * _numVertices = Number of vertices to render.
3659 		 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
3660 		 * handle is used, vertex layout used for creation
3661 		 * of vertex buffer will be used.
3662 		 */
3663 		alias da_bgfx_encoder_set_vertex_buffer_with_layout = void function(bgfx_encoder_t* _this, byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
3664 		da_bgfx_encoder_set_vertex_buffer_with_layout bgfx_encoder_set_vertex_buffer_with_layout;
3665 		
3666 		/**
3667 		 * Set vertex buffer for draw primitive.
3668 		 * Params:
3669 		 * _stream = Vertex stream.
3670 		 * _handle = Dynamic vertex buffer.
3671 		 * _startVertex = First vertex to render.
3672 		 * _numVertices = Number of vertices to render.
3673 		 */
3674 		alias da_bgfx_encoder_set_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
3675 		da_bgfx_encoder_set_dynamic_vertex_buffer bgfx_encoder_set_dynamic_vertex_buffer;
3676 		
3677 		alias da_bgfx_encoder_set_dynamic_vertex_buffer_with_layout = void function(bgfx_encoder_t* _this, byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
3678 		da_bgfx_encoder_set_dynamic_vertex_buffer_with_layout bgfx_encoder_set_dynamic_vertex_buffer_with_layout;
3679 		
3680 		/**
3681 		 * Set vertex buffer for draw primitive.
3682 		 * Params:
3683 		 * _stream = Vertex stream.
3684 		 * _tvb = Transient vertex buffer.
3685 		 * _startVertex = First vertex to render.
3686 		 * _numVertices = Number of vertices to render.
3687 		 */
3688 		alias da_bgfx_encoder_set_transient_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
3689 		da_bgfx_encoder_set_transient_vertex_buffer bgfx_encoder_set_transient_vertex_buffer;
3690 		
3691 		/**
3692 		 * Set vertex buffer for draw primitive.
3693 		 * Params:
3694 		 * _stream = Vertex stream.
3695 		 * _tvb = Transient vertex buffer.
3696 		 * _startVertex = First vertex to render.
3697 		 * _numVertices = Number of vertices to render.
3698 		 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
3699 		 * handle is used, vertex layout used for creation
3700 		 * of vertex buffer will be used.
3701 		 */
3702 		alias da_bgfx_encoder_set_transient_vertex_buffer_with_layout = void function(bgfx_encoder_t* _this, byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
3703 		da_bgfx_encoder_set_transient_vertex_buffer_with_layout bgfx_encoder_set_transient_vertex_buffer_with_layout;
3704 		
3705 		/**
3706 		 * Set number of vertices for auto generated vertices use in conjuction
3707 		 * with gl_VertexID.
3708 		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
3709 		 * Params:
3710 		 * _numVertices = Number of vertices.
3711 		 */
3712 		alias da_bgfx_encoder_set_vertex_count = void function(bgfx_encoder_t* _this, uint _numVertices);
3713 		da_bgfx_encoder_set_vertex_count bgfx_encoder_set_vertex_count;
3714 		
3715 		/**
3716 		 * Set instance data buffer for draw primitive.
3717 		 * Params:
3718 		 * _idb = Transient instance data buffer.
3719 		 * _start = First instance data.
3720 		 * _num = Number of data instances.
3721 		 */
3722 		alias da_bgfx_encoder_set_instance_data_buffer = void function(bgfx_encoder_t* _this, const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
3723 		da_bgfx_encoder_set_instance_data_buffer bgfx_encoder_set_instance_data_buffer;
3724 		
3725 		/**
3726 		 * Set instance data buffer for draw primitive.
3727 		 * Params:
3728 		 * _handle = Vertex buffer.
3729 		 * _startVertex = First instance data.
3730 		 * _num = Number of data instances.
3731 		 * Set instance data buffer for draw primitive.
3732 		 */
3733 		alias da_bgfx_encoder_set_instance_data_from_vertex_buffer = void function(bgfx_encoder_t* _this, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
3734 		da_bgfx_encoder_set_instance_data_from_vertex_buffer bgfx_encoder_set_instance_data_from_vertex_buffer;
3735 		
3736 		/**
3737 		 * Set instance data buffer for draw primitive.
3738 		 * Params:
3739 		 * _handle = Dynamic vertex buffer.
3740 		 * _startVertex = First instance data.
3741 		 * _num = Number of data instances.
3742 		 */
3743 		alias da_bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
3744 		da_bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer;
3745 		
3746 		/**
3747 		 * Set number of instances for auto generated instances use in conjuction
3748 		 * with gl_InstanceID.
3749 		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
3750 		 */
3751 		alias da_bgfx_encoder_set_instance_count = void function(bgfx_encoder_t* _this, uint _numInstances);
3752 		da_bgfx_encoder_set_instance_count bgfx_encoder_set_instance_count;
3753 		
3754 		/**
3755 		 * Set texture stage for draw primitive.
3756 		 * Params:
3757 		 * _stage = Texture unit.
3758 		 * _sampler = Program sampler.
3759 		 * _handle = Texture handle.
3760 		 * _flags = Texture sampling mode. Default value UINT32_MAX uses
3761 		 *   texture sampling settings from the texture.
3762 		 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
3763 		 *     mode.
3764 		 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
3765 		 *     sampling.
3766 		 */
3767 		alias da_bgfx_encoder_set_texture = void function(bgfx_encoder_t* _this, byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
3768 		da_bgfx_encoder_set_texture bgfx_encoder_set_texture;
3769 		
3770 		/**
3771 		 * Submit an empty primitive for rendering. Uniforms and draw state
3772 		 * will be applied but no geometry will be submitted. Useful in cases
3773 		 * when no other draw/compute primitive is submitted to view, but it's
3774 		 * desired to execute clear view.
3775 		 * Remarks:
3776 		 *   These empty draw calls will sort before ordinary draw calls.
3777 		 * Params:
3778 		 * _id = View id.
3779 		 */
3780 		alias da_bgfx_encoder_touch = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id);
3781 		da_bgfx_encoder_touch bgfx_encoder_touch;
3782 		
3783 		/**
3784 		 * Submit primitive for rendering.
3785 		 * Params:
3786 		 * _id = View id.
3787 		 * _program = Program.
3788 		 * _depth = Depth for sorting.
3789 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3790 		 */
3791 		alias da_bgfx_encoder_submit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
3792 		da_bgfx_encoder_submit bgfx_encoder_submit;
3793 		
3794 		/**
3795 		 * Submit primitive with occlusion query for rendering.
3796 		 * Params:
3797 		 * _id = View id.
3798 		 * _program = Program.
3799 		 * _occlusionQuery = Occlusion query.
3800 		 * _depth = Depth for sorting.
3801 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3802 		 */
3803 		alias da_bgfx_encoder_submit_occlusion_query = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
3804 		da_bgfx_encoder_submit_occlusion_query bgfx_encoder_submit_occlusion_query;
3805 		
3806 		/**
3807 		 * Submit primitive for rendering with index and instance data info from
3808 		 * indirect buffer.
3809 		 * Params:
3810 		 * _id = View id.
3811 		 * _program = Program.
3812 		 * _indirectHandle = Indirect buffer.
3813 		 * _start = First element in indirect buffer.
3814 		 * _num = Number of dispatches.
3815 		 * _depth = Depth for sorting.
3816 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3817 		 */
3818 		alias da_bgfx_encoder_submit_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
3819 		da_bgfx_encoder_submit_indirect bgfx_encoder_submit_indirect;
3820 		
3821 		/**
3822 		 * Set compute index buffer.
3823 		 * Params:
3824 		 * _stage = Compute stage.
3825 		 * _handle = Index buffer handle.
3826 		 * _access = Buffer access. See `Access::Enum`.
3827 		 */
3828 		alias da_bgfx_encoder_set_compute_index_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
3829 		da_bgfx_encoder_set_compute_index_buffer bgfx_encoder_set_compute_index_buffer;
3830 		
3831 		/**
3832 		 * Set compute vertex buffer.
3833 		 * Params:
3834 		 * _stage = Compute stage.
3835 		 * _handle = Vertex buffer handle.
3836 		 * _access = Buffer access. See `Access::Enum`.
3837 		 */
3838 		alias da_bgfx_encoder_set_compute_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
3839 		da_bgfx_encoder_set_compute_vertex_buffer bgfx_encoder_set_compute_vertex_buffer;
3840 		
3841 		/**
3842 		 * Set compute dynamic index buffer.
3843 		 * Params:
3844 		 * _stage = Compute stage.
3845 		 * _handle = Dynamic index buffer handle.
3846 		 * _access = Buffer access. See `Access::Enum`.
3847 		 */
3848 		alias da_bgfx_encoder_set_compute_dynamic_index_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
3849 		da_bgfx_encoder_set_compute_dynamic_index_buffer bgfx_encoder_set_compute_dynamic_index_buffer;
3850 		
3851 		/**
3852 		 * Set compute dynamic vertex buffer.
3853 		 * Params:
3854 		 * _stage = Compute stage.
3855 		 * _handle = Dynamic vertex buffer handle.
3856 		 * _access = Buffer access. See `Access::Enum`.
3857 		 */
3858 		alias da_bgfx_encoder_set_compute_dynamic_vertex_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
3859 		da_bgfx_encoder_set_compute_dynamic_vertex_buffer bgfx_encoder_set_compute_dynamic_vertex_buffer;
3860 		
3861 		/**
3862 		 * Set compute indirect buffer.
3863 		 * Params:
3864 		 * _stage = Compute stage.
3865 		 * _handle = Indirect buffer handle.
3866 		 * _access = Buffer access. See `Access::Enum`.
3867 		 */
3868 		alias da_bgfx_encoder_set_compute_indirect_buffer = void function(bgfx_encoder_t* _this, byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
3869 		da_bgfx_encoder_set_compute_indirect_buffer bgfx_encoder_set_compute_indirect_buffer;
3870 		
3871 		/**
3872 		 * Set compute image from texture.
3873 		 * Params:
3874 		 * _stage = Compute stage.
3875 		 * _handle = Texture handle.
3876 		 * _mip = Mip level.
3877 		 * _access = Image access. See `Access::Enum`.
3878 		 * _format = Texture format. See: `TextureFormat::Enum`.
3879 		 */
3880 		alias da_bgfx_encoder_set_image = void function(bgfx_encoder_t* _this, byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
3881 		da_bgfx_encoder_set_image bgfx_encoder_set_image;
3882 		
3883 		/**
3884 		 * Dispatch compute.
3885 		 * Params:
3886 		 * _id = View id.
3887 		 * _program = Compute program.
3888 		 * _numX = Number of groups X.
3889 		 * _numY = Number of groups Y.
3890 		 * _numZ = Number of groups Z.
3891 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3892 		 */
3893 		alias da_bgfx_encoder_dispatch = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ, byte _flags);
3894 		da_bgfx_encoder_dispatch bgfx_encoder_dispatch;
3895 		
3896 		/**
3897 		 * Dispatch compute indirect.
3898 		 * Params:
3899 		 * _id = View id.
3900 		 * _program = Compute program.
3901 		 * _indirectHandle = Indirect buffer.
3902 		 * _start = First element in indirect buffer.
3903 		 * _num = Number of dispatches.
3904 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3905 		 */
3906 		alias da_bgfx_encoder_dispatch_indirect = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, byte _flags);
3907 		da_bgfx_encoder_dispatch_indirect bgfx_encoder_dispatch_indirect;
3908 		
3909 		/**
3910 		 * Discard previously set state for draw or compute call.
3911 		 * Params:
3912 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
3913 		 */
3914 		alias da_bgfx_encoder_discard = void function(bgfx_encoder_t* _this, byte _flags);
3915 		da_bgfx_encoder_discard bgfx_encoder_discard;
3916 		
3917 		/**
3918 		 * Blit 2D texture region between two 2D textures.
3919 		 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
3920 		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
3921 		 * Params:
3922 		 * _id = View id.
3923 		 * _dst = Destination texture handle.
3924 		 * _dstMip = Destination texture mip level.
3925 		 * _dstX = Destination texture X position.
3926 		 * _dstY = Destination texture Y position.
3927 		 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
3928 		 * this argument represents destination texture cube face. For 3D texture this argument
3929 		 * represents destination texture Z position.
3930 		 * _src = Source texture handle.
3931 		 * _srcMip = Source texture mip level.
3932 		 * _srcX = Source texture X position.
3933 		 * _srcY = Source texture Y position.
3934 		 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
3935 		 * this argument represents source texture cube face. For 3D texture this argument
3936 		 * represents source texture Z position.
3937 		 * _width = Width of region.
3938 		 * _height = Height of region.
3939 		 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
3940 		 * unused.
3941 		 */
3942 		alias da_bgfx_encoder_blit = void function(bgfx_encoder_t* _this, bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
3943 		da_bgfx_encoder_blit bgfx_encoder_blit;
3944 		
3945 		/**
3946 		 * Request screen shot of window back buffer.
3947 		 * Remarks:
3948 		 *   `bgfx::CallbackI::screenShot` must be implemented.
3949 		 * Attention: Frame buffer handle must be created with OS' target native window handle.
3950 		 * Params:
3951 		 * _handle = Frame buffer handle. If handle is `BGFX_INVALID_HANDLE` request will be
3952 		 * made for main window back buffer.
3953 		 * _filePath = Will be passed to `bgfx::CallbackI::screenShot` callback.
3954 		 */
3955 		alias da_bgfx_request_screen_shot = void function(bgfx_frame_buffer_handle_t _handle, const(char)* _filePath);
3956 		da_bgfx_request_screen_shot bgfx_request_screen_shot;
3957 		
3958 		/**
3959 		 * Render frame.
3960 		 * Attention: `bgfx::renderFrame` is blocking call. It waits for
3961 		 *   `bgfx::frame` to be called from API thread to process frame.
3962 		 *   If timeout value is passed call will timeout and return even
3963 		 *   if `bgfx::frame` is not called.
3964 		 * Warning: This call should be only used on platforms that don't
3965 		 *   allow creating separate rendering thread. If it is called before
3966 		 *   to bgfx::init, render thread won't be created by bgfx::init call.
3967 		 * Params:
3968 		 * _msecs = Timeout in milliseconds.
3969 		 */
3970 		alias da_bgfx_render_frame = bgfx_render_frame_t function(int _msecs);
3971 		da_bgfx_render_frame bgfx_render_frame;
3972 		
3973 		/**
3974 		 * Set platform data.
3975 		 * Warning: Must be called before `bgfx::init`.
3976 		 * Params:
3977 		 * _data = Platform data.
3978 		 */
3979 		alias da_bgfx_set_platform_data = void function(const(bgfx_platform_data_t)* _data);
3980 		da_bgfx_set_platform_data bgfx_set_platform_data;
3981 		
3982 		/**
3983 		 * Get internal data for interop.
3984 		 * Attention: It's expected you understand some bgfx internals before you
3985 		 *   use this call.
3986 		 * Warning: Must be called only on render thread.
3987 		 */
3988 		alias da_bgfx_get_internal_data = const(bgfx_internal_data_t)* function();
3989 		da_bgfx_get_internal_data bgfx_get_internal_data;
3990 		
3991 		/**
3992 		 * Override internal texture with externally created texture. Previously
3993 		 * created internal texture will released.
3994 		 * Attention: It's expected you understand some bgfx internals before you
3995 		 *   use this call.
3996 		 * Warning: Must be called only on render thread.
3997 		 * Params:
3998 		 * _handle = Texture handle.
3999 		 * _ptr = Native API pointer to texture.
4000 		 */
4001 		alias da_bgfx_override_internal_texture_ptr = ulong function(bgfx_texture_handle_t _handle, ulong _ptr);
4002 		da_bgfx_override_internal_texture_ptr bgfx_override_internal_texture_ptr;
4003 		
4004 		/**
4005 		 * Override internal texture by creating new texture. Previously created
4006 		 * internal texture will released.
4007 		 * Attention: It's expected you understand some bgfx internals before you
4008 		 *   use this call.
4009 		 * Returns: Native API pointer to texture. If result is 0, texture is not created yet from the
4010 		 *   main thread.
4011 		 * Warning: Must be called only on render thread.
4012 		 * Params:
4013 		 * _handle = Texture handle.
4014 		 * _width = Width.
4015 		 * _height = Height.
4016 		 * _numMips = Number of mip-maps.
4017 		 * _format = Texture format. See: `TextureFormat::Enum`.
4018 		 * _flags = Texture creation (see `BGFX_TEXTURE_*`.), and sampler (see `BGFX_SAMPLER_*`)
4019 		 * flags. Default texture sampling mode is linear, and wrap mode is repeat.
4020 		 * - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
4021 		 *   mode.
4022 		 * - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
4023 		 *   sampling.
4024 		 */
4025 		alias da_bgfx_override_internal_texture = ulong function(bgfx_texture_handle_t _handle, ushort _width, ushort _height, byte _numMips, bgfx_texture_format_t _format, ulong _flags);
4026 		da_bgfx_override_internal_texture bgfx_override_internal_texture;
4027 		
4028 		/**
4029 		 * Sets a debug marker. This allows you to group graphics calls together for easy browsing in
4030 		 * graphics debugging tools.
4031 		 * Params:
4032 		 * _marker = Marker string.
4033 		 */
4034 		alias da_bgfx_set_marker = void function(const(char)* _marker);
4035 		da_bgfx_set_marker bgfx_set_marker;
4036 		
4037 		/**
4038 		 * Set render states for draw primitive.
4039 		 * Remarks:
4040 		 *   1. To setup more complex states use:
4041 		 *      `BGFX_STATE_ALPHA_REF(_ref)`,
4042 		 *      `BGFX_STATE_POINT_SIZE(_size)`,
4043 		 *      `BGFX_STATE_BLEND_FUNC(_src, _dst)`,
4044 		 *      `BGFX_STATE_BLEND_FUNC_SEPARATE(_srcRGB, _dstRGB, _srcA, _dstA)`,
4045 		 *      `BGFX_STATE_BLEND_EQUATION(_equation)`,
4046 		 *      `BGFX_STATE_BLEND_EQUATION_SEPARATE(_equationRGB, _equationA)`
4047 		 *   2. `BGFX_STATE_BLEND_EQUATION_ADD` is set when no other blend
4048 		 *      equation is specified.
4049 		 * Params:
4050 		 * _state = State flags. Default state for primitive type is
4051 		 *   triangles. See: `BGFX_STATE_DEFAULT`.
4052 		 *   - `BGFX_STATE_DEPTH_TEST_*` - Depth test function.
4053 		 *   - `BGFX_STATE_BLEND_*` - See remark 1 about BGFX_STATE_BLEND_FUNC.
4054 		 *   - `BGFX_STATE_BLEND_EQUATION_*` - See remark 2.
4055 		 *   - `BGFX_STATE_CULL_*` - Backface culling mode.
4056 		 *   - `BGFX_STATE_WRITE_*` - Enable R, G, B, A or Z write.
4057 		 *   - `BGFX_STATE_MSAA` - Enable hardware multisample antialiasing.
4058 		 *   - `BGFX_STATE_PT_[TRISTRIP/LINES/POINTS]` - Primitive type.
4059 		 * _rgba = Sets blend factor used by `BGFX_STATE_BLEND_FACTOR` and
4060 		 *   `BGFX_STATE_BLEND_INV_FACTOR` blend modes.
4061 		 */
4062 		alias da_bgfx_set_state = void function(ulong _state, uint _rgba);
4063 		da_bgfx_set_state bgfx_set_state;
4064 		
4065 		/**
4066 		 * Set condition for rendering.
4067 		 * Params:
4068 		 * _handle = Occlusion query handle.
4069 		 * _visible = Render if occlusion query is visible.
4070 		 */
4071 		alias da_bgfx_set_condition = void function(bgfx_occlusion_query_handle_t _handle, bool _visible);
4072 		da_bgfx_set_condition bgfx_set_condition;
4073 		
4074 		/**
4075 		 * Set stencil test state.
4076 		 * Params:
4077 		 * _fstencil = Front stencil state.
4078 		 * _bstencil = Back stencil state. If back is set to `BGFX_STENCIL_NONE`
4079 		 * _fstencil is applied to both front and back facing primitives.
4080 		 */
4081 		alias da_bgfx_set_stencil = void function(uint _fstencil, uint _bstencil);
4082 		da_bgfx_set_stencil bgfx_set_stencil;
4083 		
4084 		/**
4085 		 * Set scissor for draw primitive.
4086 		 * Remarks:
4087 		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
4088 		 * Params:
4089 		 * _x = Position x from the left corner of the window.
4090 		 * _y = Position y from the top corner of the window.
4091 		 * _width = Width of view scissor region.
4092 		 * _height = Height of view scissor region.
4093 		 */
4094 		alias da_bgfx_set_scissor = ushort function(ushort _x, ushort _y, ushort _width, ushort _height);
4095 		da_bgfx_set_scissor bgfx_set_scissor;
4096 		
4097 		/**
4098 		 * Set scissor from cache for draw primitive.
4099 		 * Remarks:
4100 		 *   To scissor for all primitives in view see `bgfx::setViewScissor`.
4101 		 * Params:
4102 		 * _cache = Index in scissor cache.
4103 		 */
4104 		alias da_bgfx_set_scissor_cached = void function(ushort _cache);
4105 		da_bgfx_set_scissor_cached bgfx_set_scissor_cached;
4106 		
4107 		/**
4108 		 * Set model matrix for draw primitive. If it is not called,
4109 		 * the model will be rendered with an identity model matrix.
4110 		 * Params:
4111 		 * _mtx = Pointer to first matrix in array.
4112 		 * _num = Number of matrices in array.
4113 		 */
4114 		alias da_bgfx_set_transform = uint function(const(void)* _mtx, ushort _num);
4115 		da_bgfx_set_transform bgfx_set_transform;
4116 		
4117 		/**
4118 		 *  Set model matrix from matrix cache for draw primitive.
4119 		 * Params:
4120 		 * _cache = Index in matrix cache.
4121 		 * _num = Number of matrices from cache.
4122 		 */
4123 		alias da_bgfx_set_transform_cached = void function(uint _cache, ushort _num);
4124 		da_bgfx_set_transform_cached bgfx_set_transform_cached;
4125 		
4126 		/**
4127 		 * Reserve matrices in internal matrix cache.
4128 		 * Attention: Pointer returned can be modifed until `bgfx::frame` is called.
4129 		 * Params:
4130 		 * _transform = Pointer to `Transform` structure.
4131 		 * _num = Number of matrices.
4132 		 */
4133 		alias da_bgfx_alloc_transform = uint function(bgfx_transform_t* _transform, ushort _num);
4134 		da_bgfx_alloc_transform bgfx_alloc_transform;
4135 		
4136 		/**
4137 		 * Set shader uniform parameter for draw primitive.
4138 		 * Params:
4139 		 * _handle = Uniform.
4140 		 * _value = Pointer to uniform data.
4141 		 * _num = Number of elements. Passing `UINT16_MAX` will
4142 		 * use the _num passed on uniform creation.
4143 		 */
4144 		alias da_bgfx_set_uniform = void function(bgfx_uniform_handle_t _handle, const(void)* _value, ushort _num);
4145 		da_bgfx_set_uniform bgfx_set_uniform;
4146 		
4147 		/**
4148 		 * Set index buffer for draw primitive.
4149 		 * Params:
4150 		 * _handle = Index buffer.
4151 		 * _firstIndex = First index to render.
4152 		 * _numIndices = Number of indices to render.
4153 		 */
4154 		alias da_bgfx_set_index_buffer = void function(bgfx_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
4155 		da_bgfx_set_index_buffer bgfx_set_index_buffer;
4156 		
4157 		/**
4158 		 * Set index buffer for draw primitive.
4159 		 * Params:
4160 		 * _handle = Dynamic index buffer.
4161 		 * _firstIndex = First index to render.
4162 		 * _numIndices = Number of indices to render.
4163 		 */
4164 		alias da_bgfx_set_dynamic_index_buffer = void function(bgfx_dynamic_index_buffer_handle_t _handle, uint _firstIndex, uint _numIndices);
4165 		da_bgfx_set_dynamic_index_buffer bgfx_set_dynamic_index_buffer;
4166 		
4167 		/**
4168 		 * Set index buffer for draw primitive.
4169 		 * Params:
4170 		 * _tib = Transient index buffer.
4171 		 * _firstIndex = First index to render.
4172 		 * _numIndices = Number of indices to render.
4173 		 */
4174 		alias da_bgfx_set_transient_index_buffer = void function(const(bgfx_transient_index_buffer_t)* _tib, uint _firstIndex, uint _numIndices);
4175 		da_bgfx_set_transient_index_buffer bgfx_set_transient_index_buffer;
4176 		
4177 		/**
4178 		 * Set vertex buffer for draw primitive.
4179 		 * Params:
4180 		 * _stream = Vertex stream.
4181 		 * _handle = Vertex buffer.
4182 		 * _startVertex = First vertex to render.
4183 		 * _numVertices = Number of vertices to render.
4184 		 */
4185 		alias da_bgfx_set_vertex_buffer = void function(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
4186 		da_bgfx_set_vertex_buffer bgfx_set_vertex_buffer;
4187 		
4188 		/**
4189 		 * Set vertex buffer for draw primitive.
4190 		 * Params:
4191 		 * _stream = Vertex stream.
4192 		 * _handle = Vertex buffer.
4193 		 * _startVertex = First vertex to render.
4194 		 * _numVertices = Number of vertices to render.
4195 		 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
4196 		 * handle is used, vertex layout used for creation
4197 		 * of vertex buffer will be used.
4198 		 */
4199 		alias da_bgfx_set_vertex_buffer_with_layout = void function(byte _stream, bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
4200 		da_bgfx_set_vertex_buffer_with_layout bgfx_set_vertex_buffer_with_layout;
4201 		
4202 		/**
4203 		 * Set vertex buffer for draw primitive.
4204 		 * Params:
4205 		 * _stream = Vertex stream.
4206 		 * _handle = Dynamic vertex buffer.
4207 		 * _startVertex = First vertex to render.
4208 		 * _numVertices = Number of vertices to render.
4209 		 */
4210 		alias da_bgfx_set_dynamic_vertex_buffer = void function(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices);
4211 		da_bgfx_set_dynamic_vertex_buffer bgfx_set_dynamic_vertex_buffer;
4212 		
4213 		/**
4214 		 * Set vertex buffer for draw primitive.
4215 		 * Params:
4216 		 * _stream = Vertex stream.
4217 		 * _handle = Dynamic vertex buffer.
4218 		 * _startVertex = First vertex to render.
4219 		 * _numVertices = Number of vertices to render.
4220 		 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
4221 		 * handle is used, vertex layout used for creation
4222 		 * of vertex buffer will be used.
4223 		 */
4224 		alias da_bgfx_set_dynamic_vertex_buffer_with_layout = void function(byte _stream, bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
4225 		da_bgfx_set_dynamic_vertex_buffer_with_layout bgfx_set_dynamic_vertex_buffer_with_layout;
4226 		
4227 		/**
4228 		 * Set vertex buffer for draw primitive.
4229 		 * Params:
4230 		 * _stream = Vertex stream.
4231 		 * _tvb = Transient vertex buffer.
4232 		 * _startVertex = First vertex to render.
4233 		 * _numVertices = Number of vertices to render.
4234 		 */
4235 		alias da_bgfx_set_transient_vertex_buffer = void function(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices);
4236 		da_bgfx_set_transient_vertex_buffer bgfx_set_transient_vertex_buffer;
4237 		
4238 		/**
4239 		 * Set vertex buffer for draw primitive.
4240 		 * Params:
4241 		 * _stream = Vertex stream.
4242 		 * _tvb = Transient vertex buffer.
4243 		 * _startVertex = First vertex to render.
4244 		 * _numVertices = Number of vertices to render.
4245 		 * _layoutHandle = Vertex layout for aliasing vertex buffer. If invalid
4246 		 * handle is used, vertex layout used for creation
4247 		 * of vertex buffer will be used.
4248 		 */
4249 		alias da_bgfx_set_transient_vertex_buffer_with_layout = void function(byte _stream, const(bgfx_transient_vertex_buffer_t)* _tvb, uint _startVertex, uint _numVertices, bgfx_vertex_layout_handle_t _layoutHandle);
4250 		da_bgfx_set_transient_vertex_buffer_with_layout bgfx_set_transient_vertex_buffer_with_layout;
4251 		
4252 		/**
4253 		 * Set number of vertices for auto generated vertices use in conjuction
4254 		 * with gl_VertexID.
4255 		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
4256 		 * Params:
4257 		 * _numVertices = Number of vertices.
4258 		 */
4259 		alias da_bgfx_set_vertex_count = void function(uint _numVertices);
4260 		da_bgfx_set_vertex_count bgfx_set_vertex_count;
4261 		
4262 		/**
4263 		 * Set instance data buffer for draw primitive.
4264 		 * Params:
4265 		 * _idb = Transient instance data buffer.
4266 		 * _start = First instance data.
4267 		 * _num = Number of data instances.
4268 		 */
4269 		alias da_bgfx_set_instance_data_buffer = void function(const(bgfx_instance_data_buffer_t)* _idb, uint _start, uint _num);
4270 		da_bgfx_set_instance_data_buffer bgfx_set_instance_data_buffer;
4271 		
4272 		/**
4273 		 * Set instance data buffer for draw primitive.
4274 		 * Params:
4275 		 * _handle = Vertex buffer.
4276 		 * _startVertex = First instance data.
4277 		 * _num = Number of data instances.
4278 		 * Set instance data buffer for draw primitive.
4279 		 */
4280 		alias da_bgfx_set_instance_data_from_vertex_buffer = void function(bgfx_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
4281 		da_bgfx_set_instance_data_from_vertex_buffer bgfx_set_instance_data_from_vertex_buffer;
4282 		
4283 		/**
4284 		 * Set instance data buffer for draw primitive.
4285 		 * Params:
4286 		 * _handle = Dynamic vertex buffer.
4287 		 * _startVertex = First instance data.
4288 		 * _num = Number of data instances.
4289 		 */
4290 		alias da_bgfx_set_instance_data_from_dynamic_vertex_buffer = void function(bgfx_dynamic_vertex_buffer_handle_t _handle, uint _startVertex, uint _num);
4291 		da_bgfx_set_instance_data_from_dynamic_vertex_buffer bgfx_set_instance_data_from_dynamic_vertex_buffer;
4292 		
4293 		/**
4294 		 * Set number of instances for auto generated instances use in conjuction
4295 		 * with gl_InstanceID.
4296 		 * Attention: Availability depends on: `BGFX_CAPS_VERTEX_ID`.
4297 		 */
4298 		alias da_bgfx_set_instance_count = void function(uint _numInstances);
4299 		da_bgfx_set_instance_count bgfx_set_instance_count;
4300 		
4301 		/**
4302 		 * Set texture stage for draw primitive.
4303 		 * Params:
4304 		 * _stage = Texture unit.
4305 		 * _sampler = Program sampler.
4306 		 * _handle = Texture handle.
4307 		 * _flags = Texture sampling mode. Default value UINT32_MAX uses
4308 		 *   texture sampling settings from the texture.
4309 		 *   - `BGFX_SAMPLER_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
4310 		 *     mode.
4311 		 *   - `BGFX_SAMPLER_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
4312 		 *     sampling.
4313 		 */
4314 		alias da_bgfx_set_texture = void function(byte _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint _flags);
4315 		da_bgfx_set_texture bgfx_set_texture;
4316 		
4317 		/**
4318 		 * Submit an empty primitive for rendering. Uniforms and draw state
4319 		 * will be applied but no geometry will be submitted.
4320 		 * Remarks:
4321 		 *   These empty draw calls will sort before ordinary draw calls.
4322 		 * Params:
4323 		 * _id = View id.
4324 		 */
4325 		alias da_bgfx_touch = void function(bgfx_view_id_t _id);
4326 		da_bgfx_touch bgfx_touch;
4327 		
4328 		/**
4329 		 * Submit primitive for rendering.
4330 		 * Params:
4331 		 * _id = View id.
4332 		 * _program = Program.
4333 		 * _depth = Depth for sorting.
4334 		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
4335 		 */
4336 		alias da_bgfx_submit = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _depth, byte _flags);
4337 		da_bgfx_submit bgfx_submit;
4338 		
4339 		/**
4340 		 * Submit primitive with occlusion query for rendering.
4341 		 * Params:
4342 		 * _id = View id.
4343 		 * _program = Program.
4344 		 * _occlusionQuery = Occlusion query.
4345 		 * _depth = Depth for sorting.
4346 		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
4347 		 */
4348 		alias da_bgfx_submit_occlusion_query = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, uint _depth, byte _flags);
4349 		da_bgfx_submit_occlusion_query bgfx_submit_occlusion_query;
4350 		
4351 		/**
4352 		 * Submit primitive for rendering with index and instance data info from
4353 		 * indirect buffer.
4354 		 * Params:
4355 		 * _id = View id.
4356 		 * _program = Program.
4357 		 * _indirectHandle = Indirect buffer.
4358 		 * _start = First element in indirect buffer.
4359 		 * _num = Number of dispatches.
4360 		 * _depth = Depth for sorting.
4361 		 * _flags = Which states to discard for next draw. See `BGFX_DISCARD_*`.
4362 		 */
4363 		alias da_bgfx_submit_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, uint _depth, byte _flags);
4364 		da_bgfx_submit_indirect bgfx_submit_indirect;
4365 		
4366 		/**
4367 		 * Set compute index buffer.
4368 		 * Params:
4369 		 * _stage = Compute stage.
4370 		 * _handle = Index buffer handle.
4371 		 * _access = Buffer access. See `Access::Enum`.
4372 		 */
4373 		alias da_bgfx_set_compute_index_buffer = void function(byte _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access);
4374 		da_bgfx_set_compute_index_buffer bgfx_set_compute_index_buffer;
4375 		
4376 		/**
4377 		 * Set compute vertex buffer.
4378 		 * Params:
4379 		 * _stage = Compute stage.
4380 		 * _handle = Vertex buffer handle.
4381 		 * _access = Buffer access. See `Access::Enum`.
4382 		 */
4383 		alias da_bgfx_set_compute_vertex_buffer = void function(byte _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access);
4384 		da_bgfx_set_compute_vertex_buffer bgfx_set_compute_vertex_buffer;
4385 		
4386 		/**
4387 		 * Set compute dynamic index buffer.
4388 		 * Params:
4389 		 * _stage = Compute stage.
4390 		 * _handle = Dynamic index buffer handle.
4391 		 * _access = Buffer access. See `Access::Enum`.
4392 		 */
4393 		alias da_bgfx_set_compute_dynamic_index_buffer = void function(byte _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access);
4394 		da_bgfx_set_compute_dynamic_index_buffer bgfx_set_compute_dynamic_index_buffer;
4395 		
4396 		/**
4397 		 * Set compute dynamic vertex buffer.
4398 		 * Params:
4399 		 * _stage = Compute stage.
4400 		 * _handle = Dynamic vertex buffer handle.
4401 		 * _access = Buffer access. See `Access::Enum`.
4402 		 */
4403 		alias da_bgfx_set_compute_dynamic_vertex_buffer = void function(byte _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access);
4404 		da_bgfx_set_compute_dynamic_vertex_buffer bgfx_set_compute_dynamic_vertex_buffer;
4405 		
4406 		/**
4407 		 * Set compute indirect buffer.
4408 		 * Params:
4409 		 * _stage = Compute stage.
4410 		 * _handle = Indirect buffer handle.
4411 		 * _access = Buffer access. See `Access::Enum`.
4412 		 */
4413 		alias da_bgfx_set_compute_indirect_buffer = void function(byte _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access);
4414 		da_bgfx_set_compute_indirect_buffer bgfx_set_compute_indirect_buffer;
4415 		
4416 		/**
4417 		 * Set compute image from texture.
4418 		 * Params:
4419 		 * _stage = Compute stage.
4420 		 * _handle = Texture handle.
4421 		 * _mip = Mip level.
4422 		 * _access = Image access. See `Access::Enum`.
4423 		 * _format = Texture format. See: `TextureFormat::Enum`.
4424 		 */
4425 		alias da_bgfx_set_image = void function(byte _stage, bgfx_texture_handle_t _handle, byte _mip, bgfx_access_t _access, bgfx_texture_format_t _format);
4426 		da_bgfx_set_image bgfx_set_image;
4427 		
4428 		/**
4429 		 * Dispatch compute.
4430 		 * Params:
4431 		 * _id = View id.
4432 		 * _program = Compute program.
4433 		 * _numX = Number of groups X.
4434 		 * _numY = Number of groups Y.
4435 		 * _numZ = Number of groups Z.
4436 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
4437 		 */
4438 		alias da_bgfx_dispatch = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, uint _numX, uint _numY, uint _numZ, byte _flags);
4439 		da_bgfx_dispatch bgfx_dispatch;
4440 		
4441 		/**
4442 		 * Dispatch compute indirect.
4443 		 * Params:
4444 		 * _id = View id.
4445 		 * _program = Compute program.
4446 		 * _indirectHandle = Indirect buffer.
4447 		 * _start = First element in indirect buffer.
4448 		 * _num = Number of dispatches.
4449 		 * _flags = Discard or preserve states. See `BGFX_DISCARD_*`.
4450 		 */
4451 		alias da_bgfx_dispatch_indirect = void function(bgfx_view_id_t _id, bgfx_program_handle_t _program, bgfx_indirect_buffer_handle_t _indirectHandle, ushort _start, ushort _num, byte _flags);
4452 		da_bgfx_dispatch_indirect bgfx_dispatch_indirect;
4453 		
4454 		/**
4455 		 * Discard previously set state for draw or compute call.
4456 		 * Params:
4457 		 * _flags = Draw/compute states to discard.
4458 		 */
4459 		alias da_bgfx_discard = void function(byte _flags);
4460 		da_bgfx_discard bgfx_discard;
4461 		
4462 		/**
4463 		 * Blit 2D texture region between two 2D textures.
4464 		 * Attention: Destination texture must be created with `BGFX_TEXTURE_BLIT_DST` flag.
4465 		 * Attention: Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
4466 		 * Params:
4467 		 * _id = View id.
4468 		 * _dst = Destination texture handle.
4469 		 * _dstMip = Destination texture mip level.
4470 		 * _dstX = Destination texture X position.
4471 		 * _dstY = Destination texture Y position.
4472 		 * _dstZ = If texture is 2D this argument should be 0. If destination texture is cube
4473 		 * this argument represents destination texture cube face. For 3D texture this argument
4474 		 * represents destination texture Z position.
4475 		 * _src = Source texture handle.
4476 		 * _srcMip = Source texture mip level.
4477 		 * _srcX = Source texture X position.
4478 		 * _srcY = Source texture Y position.
4479 		 * _srcZ = If texture is 2D this argument should be 0. If source texture is cube
4480 		 * this argument represents source texture cube face. For 3D texture this argument
4481 		 * represents source texture Z position.
4482 		 * _width = Width of region.
4483 		 * _height = Height of region.
4484 		 * _depth = If texture is 3D this argument represents depth of region, otherwise it's
4485 		 * unused.
4486 		 */
4487 		alias da_bgfx_blit = void function(bgfx_view_id_t _id, bgfx_texture_handle_t _dst, byte _dstMip, ushort _dstX, ushort _dstY, ushort _dstZ, bgfx_texture_handle_t _src, byte _srcMip, ushort _srcX, ushort _srcY, ushort _srcZ, ushort _width, ushort _height, ushort _depth);
4488 		da_bgfx_blit bgfx_blit;
4489 		
4490 	}
4491 }