Created
May 21, 2024 18:50
-
-
Save harold-b/a9d3ecbf37a91df2d48d2c508f670d56 to your computer and use it in GitHub Desktop.
Odin bindings for bgfx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bgfx | |
import "base:intrinsics" | |
import "base:runtime" | |
import cffi "core:c" | |
when ODIN_OS == .Linux { | |
@require foreign import bgfx { | |
"libs/windows/bgfx.a", | |
} | |
} | |
when ODIN_OS == .Windows { | |
@require foreign import bgfx { | |
"libs/windows/bgfx.lib", | |
} | |
} | |
when ODIN_OS == .Darwin { | |
@require foreign import bgfx { | |
"libs/macos/bgfx.a", | |
} | |
} | |
@(default_calling_convention="c") | |
foreign bgfx { | |
@(link_name="bgfx_attachment_init") | |
attachment_init :: proc(_this: ^attachment_s, _handle: texture_handle_s, _access: access_t, _layer: cffi.uint16_t, _numLayers: cffi.uint16_t, _mip: cffi.uint16_t, _resolve: cffi.uint8_t) --- | |
@(require_results) | |
@(link_name="bgfx_vertex_layout_begin") | |
vertex_layout_begin :: proc(_this: ^vertex_layout_s, _rendererType: renderer_type_t) -> ^vertex_layout_s --- | |
@(require_results) | |
@(link_name="bgfx_vertex_layout_add") | |
vertex_layout_add :: proc(_this: ^vertex_layout_s, _attrib: attrib_t, _num: cffi.uint8_t, _type: attrib_type_t, _normalized: cffi.bool, _asInt: cffi.bool) -> ^vertex_layout_s --- | |
@(link_name="bgfx_vertex_layout_decode") | |
vertex_layout_decode :: proc(_this: ^vertex_layout_s, _attrib: attrib_t, _num: ^cffi.uchar, _type: ^attrib_type_t, _normalized: ^cffi.bool, _asInt: ^cffi.bool) --- | |
@(link_name="bgfx_vertex_layout_has") | |
vertex_layout_has :: proc(_this: ^vertex_layout_s, _attrib: attrib_t) -> cffi.bool --- | |
@(require_results) | |
@(link_name="bgfx_vertex_layout_skip") | |
vertex_layout_skip :: proc(_this: ^vertex_layout_s, _num: cffi.uint8_t) -> ^vertex_layout_s --- | |
@(link_name="bgfx_vertex_layout_end") | |
vertex_layout_end :: proc(_this: ^vertex_layout_s) --- | |
@(link_name="bgfx_vertex_pack") | |
vertex_pack :: proc(_input: [4]cffi.float, _inputNormalized: cffi.bool, _attr: attrib_t, _layout: ^vertex_layout_s, _data: rawptr, _index: cffi.uint32_t) --- | |
@(link_name="bgfx_vertex_unpack") | |
vertex_unpack :: proc(_output: [4]cffi.float, _attr: attrib_t, _layout: ^vertex_layout_s, _data: rawptr, _index: cffi.uint32_t) --- | |
@(link_name="bgfx_vertex_convert") | |
vertex_convert :: proc(_dstLayout: ^vertex_layout_s, _dstData: rawptr, _srcLayout: ^vertex_layout_s, _srcData: rawptr, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_weld_vertices") | |
weld_vertices :: proc(_output: rawptr, _layout: ^vertex_layout_s, _data: rawptr, _num: cffi.uint32_t, _index32: cffi.bool, _epsilon: cffi.float) -> cffi.uint --- | |
@(link_name="bgfx_topology_convert") | |
topology_convert :: proc(_conversion: topology_convert_t, _dst: rawptr, _dstSize: cffi.uint32_t, _indices: rawptr, _numIndices: cffi.uint32_t, _index32: cffi.bool) -> cffi.uint --- | |
@(link_name="bgfx_topology_sort_tri_list") | |
topology_sort_tri_list :: proc(_sort: topology_sort_t, _dst: rawptr, _dstSize: cffi.uint32_t, _dir: [3]cffi.float, _pos: [3]cffi.float, _vertices: rawptr, _stride: cffi.uint32_t, _indices: rawptr, _numIndices: cffi.uint32_t, _index32: cffi.bool) --- | |
@(link_name="bgfx_get_supported_renderers") | |
get_supported_renderers :: proc(_max: cffi.uint8_t, _enum: ^renderer_type_t) -> cffi.uchar --- | |
@(require_results) | |
@(link_name="bgfx_get_renderer_name") | |
get_renderer_name :: proc(_type: renderer_type_t) -> cstring --- | |
@(link_name="bgfx_init_ctor") | |
init_ctor :: proc(_init: ^init_s) --- | |
@(link_name="bgfx_init") | |
init :: proc(_init: ^init_s) -> cffi.bool --- | |
@(link_name="bgfx_shutdown") | |
shutdown :: proc() --- | |
@(link_name="bgfx_reset") | |
reset :: proc(_width: cffi.uint32_t, _height: cffi.uint32_t, _flags: cffi.uint32_t, _format: texture_format_t) --- | |
@(link_name="bgfx_frame") | |
frame :: proc(_capture: cffi.bool) -> cffi.uint --- | |
@(link_name="bgfx_get_renderer_type") | |
get_renderer_type :: proc() -> renderer_type_t --- | |
@(require_results) | |
@(link_name="bgfx_get_caps") | |
get_caps :: proc() -> ^caps_s --- | |
@(require_results) | |
@(link_name="bgfx_get_stats") | |
get_stats :: proc() -> ^stats_s --- | |
@(require_results) | |
@(link_name="bgfx_alloc") | |
alloc :: proc(_size: cffi.uint32_t) -> ^memory_s --- | |
@(require_results) | |
@(link_name="bgfx_copy") | |
copy :: proc(_data: rawptr, _size: cffi.uint32_t) -> ^memory_s --- | |
@(require_results) | |
@(link_name="bgfx_make_ref") | |
make_ref :: proc(_data: rawptr, _size: cffi.uint32_t) -> ^memory_s --- | |
@(require_results) | |
@(link_name="bgfx_make_ref_release") | |
make_ref_release :: proc(_data: rawptr, _size: cffi.uint32_t, _releaseFn: release_fn_t, _userData: rawptr) -> ^memory_s --- | |
@(link_name="bgfx_set_debug") | |
set_debug :: proc(_debug: cffi.uint32_t) --- | |
@(link_name="bgfx_dbg_text_clear") | |
dbg_text_clear :: proc(_attr: cffi.uint8_t, _small: cffi.bool) --- | |
@(link_name="bgfx_dbg_text_printf") | |
dbg_text_printf :: proc(_x: cffi.uint16_t, _y: cffi.uint16_t, _attr: cffi.uint8_t, _format: cstring, #c_vararg args: ..any) --- | |
@(link_name="bgfx_dbg_text_vprintf") | |
dbg_text_vprintf :: proc(_x: cffi.uint16_t, _y: cffi.uint16_t, _attr: cffi.uint8_t, _format: cstring, _argList: cffi.va_list) --- | |
@(link_name="bgfx_dbg_text_image") | |
dbg_text_image :: proc(_x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _data: rawptr, _pitch: cffi.uint16_t) --- | |
@(link_name="bgfx_create_index_buffer") | |
create_index_buffer :: proc(_mem: ^memory_s, _flags: cffi.uint16_t) -> index_buffer_handle_s --- | |
@(link_name="bgfx_set_index_buffer_name") | |
set_index_buffer_name :: proc(_handle: index_buffer_handle_s, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_destroy_index_buffer") | |
destroy_index_buffer :: proc(_handle: index_buffer_handle_s) --- | |
@(link_name="bgfx_create_vertex_layout") | |
create_vertex_layout :: proc(_layout: ^vertex_layout_s) -> vertex_layout_handle_s --- | |
@(link_name="bgfx_destroy_vertex_layout") | |
destroy_vertex_layout :: proc(_layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_create_vertex_buffer") | |
create_vertex_buffer :: proc(_mem: ^memory_s, _layout: ^vertex_layout_s, _flags: cffi.uint16_t) -> vertex_buffer_handle_s --- | |
@(link_name="bgfx_set_vertex_buffer_name") | |
set_vertex_buffer_name :: proc(_handle: vertex_buffer_handle_s, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_destroy_vertex_buffer") | |
destroy_vertex_buffer :: proc(_handle: vertex_buffer_handle_s) --- | |
@(link_name="bgfx_create_dynamic_index_buffer") | |
create_dynamic_index_buffer :: proc(_num: cffi.uint32_t, _flags: cffi.uint16_t) -> dynamic_index_buffer_handle_s --- | |
@(link_name="bgfx_create_dynamic_index_buffer_mem") | |
create_dynamic_index_buffer_mem :: proc(_mem: ^memory_s, _flags: cffi.uint16_t) -> dynamic_index_buffer_handle_s --- | |
@(link_name="bgfx_update_dynamic_index_buffer") | |
update_dynamic_index_buffer :: proc(_handle: dynamic_index_buffer_handle_s, _startIndex: cffi.uint32_t, _mem: ^memory_s) --- | |
@(link_name="bgfx_destroy_dynamic_index_buffer") | |
destroy_dynamic_index_buffer :: proc(_handle: dynamic_index_buffer_handle_s) --- | |
@(link_name="bgfx_create_dynamic_vertex_buffer") | |
create_dynamic_vertex_buffer :: proc(_num: cffi.uint32_t, _layout: ^vertex_layout_s, _flags: cffi.uint16_t) -> dynamic_vertex_buffer_handle_s --- | |
@(link_name="bgfx_create_dynamic_vertex_buffer_mem") | |
create_dynamic_vertex_buffer_mem :: proc(_mem: ^memory_s, _layout: ^vertex_layout_s, _flags: cffi.uint16_t) -> dynamic_vertex_buffer_handle_s --- | |
@(link_name="bgfx_update_dynamic_vertex_buffer") | |
update_dynamic_vertex_buffer :: proc(_handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _mem: ^memory_s) --- | |
@(link_name="bgfx_destroy_dynamic_vertex_buffer") | |
destroy_dynamic_vertex_buffer :: proc(_handle: dynamic_vertex_buffer_handle_s) --- | |
@(link_name="bgfx_get_avail_transient_index_buffer") | |
get_avail_transient_index_buffer :: proc(_num: cffi.uint32_t, _index32: cffi.bool) -> cffi.uint --- | |
@(link_name="bgfx_get_avail_transient_vertex_buffer") | |
get_avail_transient_vertex_buffer :: proc(_num: cffi.uint32_t, _layout: ^vertex_layout_s) -> cffi.uint --- | |
@(link_name="bgfx_get_avail_instance_data_buffer") | |
get_avail_instance_data_buffer :: proc(_num: cffi.uint32_t, _stride: cffi.uint16_t) -> cffi.uint --- | |
@(link_name="bgfx_alloc_transient_index_buffer") | |
alloc_transient_index_buffer :: proc(_tib: ^transient_index_buffer_s, _num: cffi.uint32_t, _index32: cffi.bool) --- | |
@(link_name="bgfx_alloc_transient_vertex_buffer") | |
alloc_transient_vertex_buffer :: proc(_tvb: ^transient_vertex_buffer_s, _num: cffi.uint32_t, _layout: ^vertex_layout_s) --- | |
@(link_name="bgfx_alloc_transient_buffers") | |
alloc_transient_buffers :: proc(_tvb: ^transient_vertex_buffer_s, _layout: ^vertex_layout_s, _numVertices: cffi.uint32_t, _tib: ^transient_index_buffer_s, _numIndices: cffi.uint32_t, _index32: cffi.bool) -> cffi.bool --- | |
@(link_name="bgfx_alloc_instance_data_buffer") | |
alloc_instance_data_buffer :: proc(_idb: ^instance_data_buffer_s, _num: cffi.uint32_t, _stride: cffi.uint16_t) --- | |
@(link_name="bgfx_create_indirect_buffer") | |
create_indirect_buffer :: proc(_num: cffi.uint32_t) -> indirect_buffer_handle_s --- | |
@(link_name="bgfx_destroy_indirect_buffer") | |
destroy_indirect_buffer :: proc(_handle: indirect_buffer_handle_s) --- | |
@(link_name="bgfx_create_shader") | |
create_shader :: proc(_mem: ^memory_s) -> shader_handle_s --- | |
@(link_name="bgfx_get_shader_uniforms") | |
get_shader_uniforms :: proc(_handle: shader_handle_s, _uniforms: ^uniform_handle_s, _max: cffi.uint16_t) -> cffi.ushort --- | |
@(link_name="bgfx_set_shader_name") | |
set_shader_name :: proc(_handle: shader_handle_s, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_destroy_shader") | |
destroy_shader :: proc(_handle: shader_handle_s) --- | |
@(link_name="bgfx_create_program") | |
create_program :: proc(_vsh: shader_handle_s, _fsh: shader_handle_s, _destroyShaders: cffi.bool) -> program_handle_s --- | |
@(link_name="bgfx_create_compute_program") | |
create_compute_program :: proc(_csh: shader_handle_s, _destroyShaders: cffi.bool) -> program_handle_s --- | |
@(link_name="bgfx_destroy_program") | |
destroy_program :: proc(_handle: program_handle_s) --- | |
@(link_name="bgfx_is_texture_valid") | |
is_texture_valid :: proc(_depth: cffi.uint16_t, _cubeMap: cffi.bool, _numLayers: cffi.uint16_t, _format: texture_format_t, _flags: cffi.uint64_t) -> cffi.bool --- | |
@(link_name="bgfx_is_frame_buffer_valid") | |
is_frame_buffer_valid :: proc(_num: cffi.uint8_t, _attachment: ^attachment_s) -> cffi.bool --- | |
@(link_name="bgfx_calc_texture_size") | |
calc_texture_size :: proc(_info: ^texture_info_s, _width: cffi.uint16_t, _height: cffi.uint16_t, _depth: cffi.uint16_t, _cubeMap: cffi.bool, _hasMips: cffi.bool, _numLayers: cffi.uint16_t, _format: texture_format_t) --- | |
@(link_name="bgfx_create_texture") | |
create_texture :: proc(_mem: ^memory_s, _flags: cffi.uint64_t, _skip: cffi.uint8_t, _info: ^texture_info_s) -> texture_handle_s --- | |
@(link_name="bgfx_create_texture_2d") | |
create_texture_2d :: proc(_width: cffi.uint16_t, _height: cffi.uint16_t, _hasMips: cffi.bool, _numLayers: cffi.uint16_t, _format: texture_format_t, _flags: cffi.uint64_t, _mem: ^memory_s) -> texture_handle_s --- | |
@(link_name="bgfx_create_texture_2d_scaled") | |
create_texture_2d_scaled :: proc(_ratio: backbuffer_ratio_t, _hasMips: cffi.bool, _numLayers: cffi.uint16_t, _format: texture_format_t, _flags: cffi.uint64_t) -> texture_handle_s --- | |
@(link_name="bgfx_create_texture_3d") | |
create_texture_3d :: proc(_width: cffi.uint16_t, _height: cffi.uint16_t, _depth: cffi.uint16_t, _hasMips: cffi.bool, _format: texture_format_t, _flags: cffi.uint64_t, _mem: ^memory_s) -> texture_handle_s --- | |
@(link_name="bgfx_create_texture_cube") | |
create_texture_cube :: proc(_size: cffi.uint16_t, _hasMips: cffi.bool, _numLayers: cffi.uint16_t, _format: texture_format_t, _flags: cffi.uint64_t, _mem: ^memory_s) -> texture_handle_s --- | |
@(link_name="bgfx_update_texture_2d") | |
update_texture_2d :: proc(_handle: texture_handle_s, _layer: cffi.uint16_t, _mip: cffi.uint8_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _mem: ^memory_s, _pitch: cffi.uint16_t) --- | |
@(link_name="bgfx_update_texture_3d") | |
update_texture_3d :: proc(_handle: texture_handle_s, _mip: cffi.uint8_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _z: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _depth: cffi.uint16_t, _mem: ^memory_s) --- | |
@(link_name="bgfx_update_texture_cube") | |
update_texture_cube :: proc(_handle: texture_handle_s, _layer: cffi.uint16_t, _side: cffi.uint8_t, _mip: cffi.uint8_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _mem: ^memory_s, _pitch: cffi.uint16_t) --- | |
@(link_name="bgfx_read_texture") | |
read_texture :: proc(_handle: texture_handle_s, _data: rawptr, _mip: cffi.uint8_t) -> cffi.uint --- | |
@(link_name="bgfx_set_texture_name") | |
set_texture_name :: proc(_handle: texture_handle_s, _name: cstring, _len: cffi.int32_t) --- | |
@(require_results) | |
@(link_name="bgfx_get_direct_access_ptr") | |
get_direct_access_ptr :: proc(_handle: texture_handle_s) -> rawptr --- | |
@(link_name="bgfx_destroy_texture") | |
destroy_texture :: proc(_handle: texture_handle_s) --- | |
@(link_name="bgfx_create_frame_buffer") | |
create_frame_buffer :: proc(_width: cffi.uint16_t, _height: cffi.uint16_t, _format: texture_format_t, _textureFlags: cffi.uint64_t) -> frame_buffer_handle_s --- | |
@(link_name="bgfx_create_frame_buffer_scaled") | |
create_frame_buffer_scaled :: proc(_ratio: backbuffer_ratio_t, _format: texture_format_t, _textureFlags: cffi.uint64_t) -> frame_buffer_handle_s --- | |
@(link_name="bgfx_create_frame_buffer_from_handles") | |
create_frame_buffer_from_handles :: proc(_num: cffi.uint8_t, _handles: ^texture_handle_s, _destroyTexture: cffi.bool) -> frame_buffer_handle_s --- | |
@(link_name="bgfx_create_frame_buffer_from_attachment") | |
create_frame_buffer_from_attachment :: proc(_num: cffi.uint8_t, _attachment: ^attachment_s, _destroyTexture: cffi.bool) -> frame_buffer_handle_s --- | |
@(link_name="bgfx_create_frame_buffer_from_nwh") | |
create_frame_buffer_from_nwh :: proc(_nwh: rawptr, _width: cffi.uint16_t, _height: cffi.uint16_t, _format: texture_format_t, _depthFormat: texture_format_t) -> frame_buffer_handle_s --- | |
@(link_name="bgfx_set_frame_buffer_name") | |
set_frame_buffer_name :: proc(_handle: frame_buffer_handle_s, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_get_texture") | |
get_texture :: proc(_handle: frame_buffer_handle_s, _attachment: cffi.uint8_t) -> texture_handle_s --- | |
@(link_name="bgfx_destroy_frame_buffer") | |
destroy_frame_buffer :: proc(_handle: frame_buffer_handle_s) --- | |
@(link_name="bgfx_create_uniform") | |
create_uniform :: proc(_name: cstring, _type: uniform_type_t, _num: cffi.uint16_t) -> uniform_handle_s --- | |
@(link_name="bgfx_get_uniform_info") | |
get_uniform_info :: proc(_handle: uniform_handle_s, _info: ^uniform_info_s) --- | |
@(link_name="bgfx_destroy_uniform") | |
destroy_uniform :: proc(_handle: uniform_handle_s) --- | |
@(link_name="bgfx_create_occlusion_query") | |
create_occlusion_query :: proc() -> occlusion_query_handle_s --- | |
@(link_name="bgfx_get_result") | |
get_result :: proc(_handle: occlusion_query_handle_s, _result: ^cffi.int) -> occlusion_query_result_t --- | |
@(link_name="bgfx_destroy_occlusion_query") | |
destroy_occlusion_query :: proc(_handle: occlusion_query_handle_s) --- | |
@(link_name="bgfx_set_palette_color") | |
set_palette_color :: proc(_index: cffi.uint8_t, _rgba: [4]cffi.float) --- | |
@(link_name="bgfx_set_palette_color_rgba8") | |
set_palette_color_rgba8 :: proc(_index: cffi.uint8_t, _rgba: cffi.uint32_t) --- | |
@(link_name="bgfx_set_view_name") | |
set_view_name :: proc(_id: view_id_t, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_set_view_rect") | |
set_view_rect :: proc(_id: view_id_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t) --- | |
@(link_name="bgfx_set_view_rect_ratio") | |
set_view_rect_ratio :: proc(_id: view_id_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _ratio: backbuffer_ratio_t) --- | |
@(link_name="bgfx_set_view_scissor") | |
set_view_scissor :: proc(_id: view_id_t, _x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t) --- | |
@(link_name="bgfx_set_view_clear") | |
set_view_clear :: proc(_id: view_id_t, _flags: cffi.uint16_t, _rgba: cffi.uint32_t, _depth: cffi.float, _stencil: cffi.uint8_t) --- | |
@(link_name="bgfx_set_view_clear_mrt") | |
set_view_clear_mrt :: proc(_id: view_id_t, _flags: cffi.uint16_t, _depth: cffi.float, _stencil: cffi.uint8_t, _c0: cffi.uint8_t, _c1: cffi.uint8_t, _c2: cffi.uint8_t, _c3: cffi.uint8_t, _c4: cffi.uint8_t, _c5: cffi.uint8_t, _c6: cffi.uint8_t, _c7: cffi.uint8_t) --- | |
@(link_name="bgfx_set_view_mode") | |
set_view_mode :: proc(_id: view_id_t, _mode: view_mode_t) --- | |
@(link_name="bgfx_set_view_frame_buffer") | |
set_view_frame_buffer :: proc(_id: view_id_t, _handle: frame_buffer_handle_s) --- | |
@(link_name="bgfx_set_view_transform") | |
set_view_transform :: proc(_id: view_id_t, _view: rawptr, _proj: rawptr) --- | |
@(link_name="bgfx_set_view_order") | |
set_view_order :: proc(_id: view_id_t, _num: cffi.uint16_t, _order: ^cffi.ushort) --- | |
@(link_name="bgfx_reset_view") | |
reset_view :: proc(_id: view_id_t) --- | |
@(require_results) | |
@(link_name="bgfx_encoder_begin") | |
encoder_begin :: proc(_forThread: cffi.bool) -> ^encoder_s --- | |
@(link_name="bgfx_encoder_end") | |
encoder_end :: proc(_encoder: ^encoder_s) --- | |
@(link_name="bgfx_encoder_set_marker") | |
encoder_set_marker :: proc(_this: ^encoder_s, _name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_encoder_set_state") | |
encoder_set_state :: proc(_this: ^encoder_s, _state: cffi.uint64_t, _rgba: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_condition") | |
encoder_set_condition :: proc(_this: ^encoder_s, _handle: occlusion_query_handle_s, _visible: cffi.bool) --- | |
@(link_name="bgfx_encoder_set_stencil") | |
encoder_set_stencil :: proc(_this: ^encoder_s, _fstencil: cffi.uint32_t, _bstencil: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_scissor") | |
encoder_set_scissor :: proc(_this: ^encoder_s, _x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t) -> cffi.ushort --- | |
@(link_name="bgfx_encoder_set_scissor_cached") | |
encoder_set_scissor_cached :: proc(_this: ^encoder_s, _cache: cffi.uint16_t) --- | |
@(link_name="bgfx_encoder_set_transform") | |
encoder_set_transform :: proc(_this: ^encoder_s, _mtx: rawptr, _num: cffi.uint16_t) -> cffi.uint --- | |
@(link_name="bgfx_encoder_set_transform_cached") | |
encoder_set_transform_cached :: proc(_this: ^encoder_s, _cache: cffi.uint32_t, _num: cffi.uint16_t) --- | |
@(link_name="bgfx_encoder_alloc_transform") | |
encoder_alloc_transform :: proc(_this: ^encoder_s, _transform: ^transform_s, _num: cffi.uint16_t) -> cffi.uint --- | |
@(link_name="bgfx_encoder_set_uniform") | |
encoder_set_uniform :: proc(_this: ^encoder_s, _handle: uniform_handle_s, _value: rawptr, _num: cffi.uint16_t) --- | |
@(link_name="bgfx_encoder_set_index_buffer") | |
encoder_set_index_buffer :: proc(_this: ^encoder_s, _handle: index_buffer_handle_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_dynamic_index_buffer") | |
encoder_set_dynamic_index_buffer :: proc(_this: ^encoder_s, _handle: dynamic_index_buffer_handle_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_transient_index_buffer") | |
encoder_set_transient_index_buffer :: proc(_this: ^encoder_s, _tib: ^transient_index_buffer_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_vertex_buffer") | |
encoder_set_vertex_buffer :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_vertex_buffer_with_layout") | |
encoder_set_vertex_buffer_with_layout :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_encoder_set_dynamic_vertex_buffer") | |
encoder_set_dynamic_vertex_buffer :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_dynamic_vertex_buffer_with_layout") | |
encoder_set_dynamic_vertex_buffer_with_layout :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_encoder_set_transient_vertex_buffer") | |
encoder_set_transient_vertex_buffer :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_transient_vertex_buffer_with_layout") | |
encoder_set_transient_vertex_buffer_with_layout :: proc(_this: ^encoder_s, _stream: cffi.uint8_t, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_encoder_set_vertex_count") | |
encoder_set_vertex_count :: proc(_this: ^encoder_s, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_instance_data_buffer") | |
encoder_set_instance_data_buffer :: proc(_this: ^encoder_s, _idb: ^instance_data_buffer_s, _start: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_instance_data_from_vertex_buffer") | |
encoder_set_instance_data_from_vertex_buffer :: proc(_this: ^encoder_s, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_instance_data_from_dynamic_vertex_buffer") | |
encoder_set_instance_data_from_dynamic_vertex_buffer :: proc(_this: ^encoder_s, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_instance_count") | |
encoder_set_instance_count :: proc(_this: ^encoder_s, _numInstances: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_set_texture") | |
encoder_set_texture :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _sampler: uniform_handle_s, _handle: texture_handle_s, _flags: cffi.uint32_t) --- | |
@(link_name="bgfx_encoder_touch") | |
encoder_touch :: proc(_this: ^encoder_s, _id: view_id_t) --- | |
@(link_name="bgfx_encoder_submit") | |
encoder_submit :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_submit_occlusion_query") | |
encoder_submit_occlusion_query :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _occlusionQuery: occlusion_query_handle_s, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_submit_indirect") | |
encoder_submit_indirect :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _num: cffi.uint32_t, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_submit_indirect_count") | |
encoder_submit_indirect_count :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _numHandle: index_buffer_handle_s, _numIndex: cffi.uint32_t, _numMax: cffi.uint32_t, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_set_compute_index_buffer") | |
encoder_set_compute_index_buffer :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: index_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_encoder_set_compute_vertex_buffer") | |
encoder_set_compute_vertex_buffer :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: vertex_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_encoder_set_compute_dynamic_index_buffer") | |
encoder_set_compute_dynamic_index_buffer :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: dynamic_index_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_encoder_set_compute_dynamic_vertex_buffer") | |
encoder_set_compute_dynamic_vertex_buffer :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_encoder_set_compute_indirect_buffer") | |
encoder_set_compute_indirect_buffer :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: indirect_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_encoder_set_image") | |
encoder_set_image :: proc(_this: ^encoder_s, _stage: cffi.uint8_t, _handle: texture_handle_s, _mip: cffi.uint8_t, _access: access_t, _format: texture_format_t) --- | |
@(link_name="bgfx_encoder_dispatch") | |
encoder_dispatch :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _numX: cffi.uint32_t, _numY: cffi.uint32_t, _numZ: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_dispatch_indirect") | |
encoder_dispatch_indirect :: proc(_this: ^encoder_s, _id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _num: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_discard") | |
encoder_discard :: proc(_this: ^encoder_s, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_encoder_blit") | |
encoder_blit :: proc(_this: ^encoder_s, _id: view_id_t, _dst: texture_handle_s, _dstMip: cffi.uint8_t, _dstX: cffi.uint16_t, _dstY: cffi.uint16_t, _dstZ: cffi.uint16_t, _src: texture_handle_s, _srcMip: cffi.uint8_t, _srcX: cffi.uint16_t, _srcY: cffi.uint16_t, _srcZ: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _depth: cffi.uint16_t) --- | |
@(link_name="bgfx_request_screen_shot") | |
request_screen_shot :: proc(_handle: frame_buffer_handle_s, _filePath: cstring) --- | |
@(link_name="bgfx_render_frame") | |
render_frame :: proc(_msecs: cffi.int32_t) -> render_frame_t --- | |
@(link_name="bgfx_set_platform_data") | |
set_platform_data :: proc(_data: ^platform_data_s) --- | |
@(require_results) | |
@(link_name="bgfx_get_internal_data") | |
get_internal_data :: proc() -> ^internal_data_s --- | |
@(link_name="bgfx_override_internal_texture_ptr") | |
override_internal_texture_ptr :: proc(_handle: texture_handle_s, _ptr: cffi.uintptr_t) -> cffi.ulong --- | |
@(link_name="bgfx_override_internal_texture") | |
override_internal_texture :: proc(_handle: texture_handle_s, _width: cffi.uint16_t, _height: cffi.uint16_t, _numMips: cffi.uint8_t, _format: texture_format_t, _flags: cffi.uint64_t) -> cffi.ulong --- | |
@(link_name="bgfx_set_marker") | |
set_marker :: proc(_name: cstring, _len: cffi.int32_t) --- | |
@(link_name="bgfx_set_state") | |
set_state :: proc(_state: cffi.uint64_t, _rgba: cffi.uint32_t) --- | |
@(link_name="bgfx_set_condition") | |
set_condition :: proc(_handle: occlusion_query_handle_s, _visible: cffi.bool) --- | |
@(link_name="bgfx_set_stencil") | |
set_stencil :: proc(_fstencil: cffi.uint32_t, _bstencil: cffi.uint32_t) --- | |
@(link_name="bgfx_set_scissor") | |
set_scissor :: proc(_x: cffi.uint16_t, _y: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t) -> cffi.ushort --- | |
@(link_name="bgfx_set_scissor_cached") | |
set_scissor_cached :: proc(_cache: cffi.uint16_t) --- | |
@(link_name="bgfx_set_transform") | |
set_transform :: proc(_mtx: rawptr, _num: cffi.uint16_t) -> cffi.uint --- | |
@(link_name="bgfx_set_transform_cached") | |
set_transform_cached :: proc(_cache: cffi.uint32_t, _num: cffi.uint16_t) --- | |
@(link_name="bgfx_alloc_transform") | |
alloc_transform :: proc(_transform: ^transform_s, _num: cffi.uint16_t) -> cffi.uint --- | |
@(link_name="bgfx_set_uniform") | |
set_uniform :: proc(_handle: uniform_handle_s, _value: rawptr, _num: cffi.uint16_t) --- | |
@(link_name="bgfx_set_index_buffer") | |
set_index_buffer :: proc(_handle: index_buffer_handle_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_dynamic_index_buffer") | |
set_dynamic_index_buffer :: proc(_handle: dynamic_index_buffer_handle_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_transient_index_buffer") | |
set_transient_index_buffer :: proc(_tib: ^transient_index_buffer_s, _firstIndex: cffi.uint32_t, _numIndices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_vertex_buffer") | |
set_vertex_buffer :: proc(_stream: cffi.uint8_t, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_vertex_buffer_with_layout") | |
set_vertex_buffer_with_layout :: proc(_stream: cffi.uint8_t, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_set_dynamic_vertex_buffer") | |
set_dynamic_vertex_buffer :: proc(_stream: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_dynamic_vertex_buffer_with_layout") | |
set_dynamic_vertex_buffer_with_layout :: proc(_stream: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_set_transient_vertex_buffer") | |
set_transient_vertex_buffer :: proc(_stream: cffi.uint8_t, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_transient_vertex_buffer_with_layout") | |
set_transient_vertex_buffer_with_layout :: proc(_stream: cffi.uint8_t, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint32_t, _numVertices: cffi.uint32_t, _layoutHandle: vertex_layout_handle_s) --- | |
@(link_name="bgfx_set_vertex_count") | |
set_vertex_count :: proc(_numVertices: cffi.uint32_t) --- | |
@(link_name="bgfx_set_instance_data_buffer") | |
set_instance_data_buffer :: proc(_idb: ^instance_data_buffer_s, _start: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_set_instance_data_from_vertex_buffer") | |
set_instance_data_from_vertex_buffer :: proc(_handle: vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_set_instance_data_from_dynamic_vertex_buffer") | |
set_instance_data_from_dynamic_vertex_buffer :: proc(_handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint32_t, _num: cffi.uint32_t) --- | |
@(link_name="bgfx_set_instance_count") | |
set_instance_count :: proc(_numInstances: cffi.uint32_t) --- | |
@(link_name="bgfx_set_texture") | |
set_texture :: proc(_stage: cffi.uint8_t, _sampler: uniform_handle_s, _handle: texture_handle_s, _flags: cffi.uint32_t) --- | |
@(link_name="bgfx_touch") | |
touch :: proc(_id: view_id_t) --- | |
@(link_name="bgfx_submit") | |
submit :: proc(_id: view_id_t, _program: program_handle_s, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_submit_occlusion_query") | |
submit_occlusion_query :: proc(_id: view_id_t, _program: program_handle_s, _occlusionQuery: occlusion_query_handle_s, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_submit_indirect") | |
submit_indirect :: proc(_id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _num: cffi.uint32_t, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_submit_indirect_count") | |
submit_indirect_count :: proc(_id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _numHandle: index_buffer_handle_s, _numIndex: cffi.uint32_t, _numMax: cffi.uint32_t, _depth: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_set_compute_index_buffer") | |
set_compute_index_buffer :: proc(_stage: cffi.uint8_t, _handle: index_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_set_compute_vertex_buffer") | |
set_compute_vertex_buffer :: proc(_stage: cffi.uint8_t, _handle: vertex_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_set_compute_dynamic_index_buffer") | |
set_compute_dynamic_index_buffer :: proc(_stage: cffi.uint8_t, _handle: dynamic_index_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_set_compute_dynamic_vertex_buffer") | |
set_compute_dynamic_vertex_buffer :: proc(_stage: cffi.uint8_t, _handle: dynamic_vertex_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_set_compute_indirect_buffer") | |
set_compute_indirect_buffer :: proc(_stage: cffi.uint8_t, _handle: indirect_buffer_handle_s, _access: access_t) --- | |
@(link_name="bgfx_set_image") | |
set_image :: proc(_stage: cffi.uint8_t, _handle: texture_handle_s, _mip: cffi.uint8_t, _access: access_t, _format: texture_format_t) --- | |
@(link_name="bgfx_dispatch") | |
dispatch :: proc(_id: view_id_t, _program: program_handle_s, _numX: cffi.uint32_t, _numY: cffi.uint32_t, _numZ: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_dispatch_indirect") | |
dispatch_indirect :: proc(_id: view_id_t, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint32_t, _num: cffi.uint32_t, _flags: cffi.uint8_t) --- | |
@(link_name="bgfx_discard") | |
discard :: proc(_flags: cffi.uint8_t) --- | |
@(link_name="bgfx_blit") | |
blit :: proc(_id: view_id_t, _dst: texture_handle_s, _dstMip: cffi.uint8_t, _dstX: cffi.uint16_t, _dstY: cffi.uint16_t, _dstZ: cffi.uint16_t, _src: texture_handle_s, _srcMip: cffi.uint8_t, _srcX: cffi.uint16_t, _srcY: cffi.uint16_t, _srcZ: cffi.uint16_t, _width: cffi.uint16_t, _height: cffi.uint16_t, _depth: cffi.uint16_t) --- | |
@(require_results) | |
@(link_name="bgfx_get_interface") | |
get_interface :: proc(_version: cffi.uint32_t) -> ^interface_vtbl --- | |
} | |
/// bgfx_view_id_t | |
view_id_t :: distinct cffi.ushort | |
/// bgfx_allocator_interface_t | |
allocator_interface_t :: distinct allocator_interface_s | |
/// bgfx_allocator_vtbl_t | |
allocator_vtbl_t :: distinct allocator_vtbl_s | |
/// bgfx_interface_vtbl_t | |
interface_vtbl_t :: distinct interface_vtbl | |
/// bgfx_callback_interface_t | |
callback_interface_t :: distinct callback_interface_s | |
/// bgfx_callback_vtbl_t | |
callback_vtbl_t :: distinct callback_vtbl_s | |
/// bgfx_dynamic_index_buffer_handle_t | |
dynamic_index_buffer_handle_t :: distinct dynamic_index_buffer_handle_s | |
/// bgfx_dynamic_vertex_buffer_handle_t | |
dynamic_vertex_buffer_handle_t :: distinct dynamic_vertex_buffer_handle_s | |
/// bgfx_frame_buffer_handle_t | |
frame_buffer_handle_t :: distinct frame_buffer_handle_s | |
/// bgfx_index_buffer_handle_t | |
index_buffer_handle_t :: distinct index_buffer_handle_s | |
/// bgfx_indirect_buffer_handle_t | |
indirect_buffer_handle_t :: distinct indirect_buffer_handle_s | |
/// bgfx_occlusion_query_handle_t | |
occlusion_query_handle_t :: distinct occlusion_query_handle_s | |
/// bgfx_program_handle_t | |
program_handle_t :: distinct program_handle_s | |
/// bgfx_shader_handle_t | |
shader_handle_t :: distinct shader_handle_s | |
/// bgfx_texture_handle_t | |
texture_handle_t :: distinct texture_handle_s | |
/// bgfx_uniform_handle_t | |
uniform_handle_t :: distinct uniform_handle_s | |
/// bgfx_vertex_buffer_handle_t | |
vertex_buffer_handle_t :: distinct vertex_buffer_handle_s | |
/// bgfx_vertex_layout_handle_t | |
vertex_layout_handle_t :: distinct vertex_layout_handle_s | |
/// bgfx_release_fn_t | |
release_fn_t :: distinct proc "c" (_ptr: rawptr, _userData: rawptr) | |
/// bgfx_caps_gpu_t | |
caps_gpu_t :: distinct caps_gpu_s | |
/// bgfx_caps_limits_t | |
caps_limits_t :: distinct caps_limits_s | |
/// bgfx_caps_t | |
caps_t :: distinct caps_s | |
/// bgfx_internal_data_t | |
internal_data_t :: distinct internal_data_s | |
/// bgfx_platform_data_t | |
platform_data_t :: distinct platform_data_s | |
/// bgfx_resolution_t | |
resolution_t :: distinct resolution_s | |
/// bgfx_init_limits_t | |
init_limits_t :: distinct init_limits_s | |
/// bgfx_init_t | |
init_t :: distinct init_s | |
/// bgfx_memory_t | |
memory_t :: distinct memory_s | |
/// bgfx_transient_index_buffer_t | |
transient_index_buffer_t :: distinct transient_index_buffer_s | |
/// bgfx_transient_vertex_buffer_t | |
transient_vertex_buffer_t :: distinct transient_vertex_buffer_s | |
/// bgfx_instance_data_buffer_t | |
instance_data_buffer_t :: distinct instance_data_buffer_s | |
/// bgfx_texture_info_t | |
texture_info_t :: distinct texture_info_s | |
/// bgfx_uniform_info_t | |
uniform_info_t :: distinct uniform_info_s | |
/// bgfx_attachment_t | |
attachment_t :: distinct attachment_s | |
/// bgfx_transform_t | |
transform_t :: distinct transform_s | |
/// bgfx_view_stats_t | |
view_stats_t :: distinct view_stats_s | |
/// bgfx_encoder_stats_t | |
encoder_stats_t :: distinct encoder_stats_s | |
/// bgfx_stats_t | |
stats_t :: distinct stats_s | |
/// bgfx_vertex_layout_t | |
vertex_layout_t :: distinct vertex_layout_s | |
/// bgfx_encoder_t | |
encoder_t :: distinct encoder_s | |
/// bgfx_fatal_t | |
fatal_t :: enum cffi.uint { | |
DEBUG_CHECK = 0, | |
INVALID_SHADER = 1, | |
UNABLE_TO_INITIALIZE = 2, | |
UNABLE_TO_CREATE_TEXTURE = 3, | |
DEVICE_LOST = 4, | |
COUNT = 5, | |
} | |
/// bgfx_renderer_type_t | |
renderer_type_t :: enum cffi.uint { | |
NOOP = 0, | |
AGC = 1, | |
DIRECT3D11 = 2, | |
DIRECT3D12 = 3, | |
GNM = 4, | |
METAL = 5, | |
NVN = 6, | |
OPENGLES = 7, | |
OPENGL = 8, | |
VULKAN = 9, | |
COUNT = 10, | |
} | |
/// bgfx_access_t | |
access_t :: enum cffi.uint { | |
READ = 0, | |
WRITE = 1, | |
READWRITE = 2, | |
COUNT = 3, | |
} | |
/// bgfx_attrib_t | |
attrib_t :: enum cffi.uint { | |
POSITION = 0, | |
NORMAL = 1, | |
ANGENT = 2, | |
BITANGENT = 3, | |
COLOR0 = 4, | |
COLOR1 = 5, | |
COLOR2 = 6, | |
COLOR3 = 7, | |
INDICES = 8, | |
WEIGHT = 9, | |
EXCOORD0 = 10, | |
EXCOORD1 = 11, | |
EXCOORD2 = 12, | |
EXCOORD3 = 13, | |
EXCOORD4 = 14, | |
EXCOORD5 = 15, | |
EXCOORD6 = 16, | |
EXCOORD7 = 17, | |
COUNT = 18, | |
} | |
/// bgfx_attrib_type_t | |
attrib_type_t :: enum cffi.uint { | |
UINT8 = 0, | |
UINT10 = 1, | |
INT16 = 2, | |
HALF = 3, | |
FLOAT = 4, | |
COUNT = 5, | |
} | |
/// bgfx_texture_format_t | |
texture_format_t :: enum cffi.uint { | |
BC1 = 0, | |
BC2 = 1, | |
BC3 = 2, | |
BC4 = 3, | |
BC5 = 4, | |
BC6H = 5, | |
BC7 = 6, | |
ETC1 = 7, | |
ETC2 = 8, | |
ETC2A = 9, | |
ETC2A1 = 10, | |
PTC12 = 11, | |
PTC14 = 12, | |
PTC12A = 13, | |
PTC14A = 14, | |
PTC22 = 15, | |
PTC24 = 16, | |
ATC = 17, | |
ATCE = 18, | |
ATCI = 19, | |
ASTC4X4 = 20, | |
ASTC5X4 = 21, | |
ASTC5X5 = 22, | |
ASTC6X5 = 23, | |
ASTC6X6 = 24, | |
ASTC8X5 = 25, | |
ASTC8X6 = 26, | |
ASTC8X8 = 27, | |
ASTC10X5 = 28, | |
ASTC10X6 = 29, | |
ASTC10X8 = 30, | |
ASTC10X10 = 31, | |
ASTC12X10 = 32, | |
ASTC12X12 = 33, | |
UNKNOWN = 34, | |
R1 = 35, | |
A8 = 36, | |
R8 = 37, | |
R8I = 38, | |
R8U = 39, | |
R8S = 40, | |
R16 = 41, | |
R16I = 42, | |
R16U = 43, | |
R16F = 44, | |
R16S = 45, | |
R32I = 46, | |
R32U = 47, | |
R32F = 48, | |
RG8 = 49, | |
RG8I = 50, | |
RG8U = 51, | |
RG8S = 52, | |
RG16 = 53, | |
RG16I = 54, | |
RG16U = 55, | |
RG16F = 56, | |
RG16S = 57, | |
RG32I = 58, | |
RG32U = 59, | |
RG32F = 60, | |
RGB8 = 61, | |
RGB8I = 62, | |
RGB8U = 63, | |
RGB8S = 64, | |
RGB9E5F = 65, | |
BGRA8 = 66, | |
RGBA8 = 67, | |
RGBA8I = 68, | |
RGBA8U = 69, | |
RGBA8S = 70, | |
RGBA16 = 71, | |
RGBA16I = 72, | |
RGBA16U = 73, | |
RGBA16F = 74, | |
RGBA16S = 75, | |
RGBA32I = 76, | |
RGBA32U = 77, | |
RGBA32F = 78, | |
B5G6R5 = 79, | |
R5G6B5 = 80, | |
BGRA4 = 81, | |
RGBA4 = 82, | |
BGR5A1 = 83, | |
RGB5A1 = 84, | |
RGB10A2 = 85, | |
RG11B10F = 86, | |
UNKNOWNDEPTH = 87, | |
D16 = 88, | |
D24 = 89, | |
D24S8 = 90, | |
D32 = 91, | |
D16F = 92, | |
D24F = 93, | |
D32F = 94, | |
D0S8 = 95, | |
COUNT = 96, | |
} | |
/// bgfx_uniform_type_t | |
uniform_type_t :: enum cffi.uint { | |
SAMPLER = 0, | |
END = 1, | |
VEC4 = 2, | |
MAT3 = 3, | |
MAT4 = 4, | |
COUNT = 5, | |
} | |
/// bgfx_backbuffer_ratio_t | |
backbuffer_ratio_t :: enum cffi.uint { | |
EQUAL = 0, | |
HALF = 1, | |
QUARTER = 2, | |
EIGHTH = 3, | |
SIXTEENTH = 4, | |
DOUBLE = 5, | |
COUNT = 6, | |
} | |
/// bgfx_occlusion_query_result_t | |
occlusion_query_result_t :: enum cffi.uint { | |
INVISIBLE = 0, | |
VISIBLE = 1, | |
NORESULT = 2, | |
COUNT = 3, | |
} | |
/// bgfx_topology_t | |
topology_t :: enum cffi.uint { | |
RI_LIST = 0, | |
RI_STRIP = 1, | |
LINE_LIST = 2, | |
LINE_STRIP = 3, | |
POINT_LIST = 4, | |
COUNT = 5, | |
} | |
/// bgfx_topology_convert_t | |
topology_convert_t :: enum cffi.uint { | |
RI_LIST_FLIP_WINDING = 0, | |
RI_STRIP_FLIP_WINDING = 1, | |
RI_LIST_TO_LINE_LIST = 2, | |
RI_STRIP_TO_TRI_LIST = 3, | |
LINE_STRIP_TO_LINE_LIST = 4, | |
COUNT = 5, | |
} | |
/// bgfx_topology_sort_t | |
topology_sort_t :: enum cffi.uint { | |
DIRECTION_FRONT_TO_BACK_MIN = 0, | |
DIRECTION_FRONT_TO_BACK_AVG = 1, | |
DIRECTION_FRONT_TO_BACK_MAX = 2, | |
DIRECTION_BACK_TO_FRONT_MIN = 3, | |
DIRECTION_BACK_TO_FRONT_AVG = 4, | |
DIRECTION_BACK_TO_FRONT_MAX = 5, | |
DISTANCE_FRONT_TO_BACK_MIN = 6, | |
DISTANCE_FRONT_TO_BACK_AVG = 7, | |
DISTANCE_FRONT_TO_BACK_MAX = 8, | |
DISTANCE_BACK_TO_FRONT_MIN = 9, | |
DISTANCE_BACK_TO_FRONT_AVG = 10, | |
DISTANCE_BACK_TO_FRONT_MAX = 11, | |
COUNT = 12, | |
} | |
/// bgfx_view_mode_t | |
view_mode_t :: enum cffi.uint { | |
DEFAULT = 0, | |
SEQUENTIAL = 1, | |
DEPTH_ASCENDING = 2, | |
DEPTH_DESCENDING = 3, | |
COUNT = 4, | |
} | |
/// bgfx_native_window_handle_type_t | |
native_window_handle_type_t :: enum cffi.uint { | |
DEFAULT = 0, | |
WAYLAND = 1, | |
COUNT = 2, | |
} | |
/// bgfx_render_frame_t | |
render_frame_t :: enum cffi.uint { | |
NO_CONTEXT = 0, | |
RENDER = 1, | |
IMEOUT = 2, | |
EXITING = 3, | |
COUNT = 4, | |
} | |
/// bgfx_function_id_t | |
function_id_t :: enum cffi.uint { | |
ATTACHMENT_INIT = 0, | |
VERTEX_LAYOUT_BEGIN = 1, | |
VERTEX_LAYOUT_ADD = 2, | |
VERTEX_LAYOUT_DECODE = 3, | |
VERTEX_LAYOUT_HAS = 4, | |
VERTEX_LAYOUT_SKIP = 5, | |
VERTEX_LAYOUT_END = 6, | |
VERTEX_PACK = 7, | |
VERTEX_UNPACK = 8, | |
VERTEX_CONVERT = 9, | |
WELD_VERTICES = 10, | |
OPOLOGY_CONVERT = 11, | |
OPOLOGY_SORT_TRI_LIST = 12, | |
GET_SUPPORTED_RENDERERS = 13, | |
GET_RENDERER_NAME = 14, | |
INIT_CTOR = 15, | |
INIT = 16, | |
SHUTDOWN = 17, | |
RESET = 18, | |
FRAME = 19, | |
GET_RENDERER_TYPE = 20, | |
GET_CAPS = 21, | |
GET_STATS = 22, | |
ALLOC = 23, | |
COPY = 24, | |
MAKE_REF = 25, | |
MAKE_REF_RELEASE = 26, | |
SET_DEBUG = 27, | |
DBG_TEXT_CLEAR = 28, | |
DBG_TEXT_PRINTF = 29, | |
DBG_TEXT_VPRINTF = 30, | |
DBG_TEXT_IMAGE = 31, | |
CREATE_INDEX_BUFFER = 32, | |
SET_INDEX_BUFFER_NAME = 33, | |
DESTROY_INDEX_BUFFER = 34, | |
CREATE_VERTEX_LAYOUT = 35, | |
DESTROY_VERTEX_LAYOUT = 36, | |
CREATE_VERTEX_BUFFER = 37, | |
SET_VERTEX_BUFFER_NAME = 38, | |
DESTROY_VERTEX_BUFFER = 39, | |
CREATE_DYNAMIC_INDEX_BUFFER = 40, | |
CREATE_DYNAMIC_INDEX_BUFFER_MEM = 41, | |
UPDATE_DYNAMIC_INDEX_BUFFER = 42, | |
DESTROY_DYNAMIC_INDEX_BUFFER = 43, | |
CREATE_DYNAMIC_VERTEX_BUFFER = 44, | |
CREATE_DYNAMIC_VERTEX_BUFFER_MEM = 45, | |
UPDATE_DYNAMIC_VERTEX_BUFFER = 46, | |
DESTROY_DYNAMIC_VERTEX_BUFFER = 47, | |
GET_AVAIL_TRANSIENT_INDEX_BUFFER = 48, | |
GET_AVAIL_TRANSIENT_VERTEX_BUFFER = 49, | |
GET_AVAIL_INSTANCE_DATA_BUFFER = 50, | |
ALLOC_TRANSIENT_INDEX_BUFFER = 51, | |
ALLOC_TRANSIENT_VERTEX_BUFFER = 52, | |
ALLOC_TRANSIENT_BUFFERS = 53, | |
ALLOC_INSTANCE_DATA_BUFFER = 54, | |
CREATE_INDIRECT_BUFFER = 55, | |
DESTROY_INDIRECT_BUFFER = 56, | |
CREATE_SHADER = 57, | |
GET_SHADER_UNIFORMS = 58, | |
SET_SHADER_NAME = 59, | |
DESTROY_SHADER = 60, | |
CREATE_PROGRAM = 61, | |
CREATE_COMPUTE_PROGRAM = 62, | |
DESTROY_PROGRAM = 63, | |
IS_TEXTURE_VALID = 64, | |
IS_FRAME_BUFFER_VALID = 65, | |
CALC_TEXTURE_SIZE = 66, | |
CREATE_TEXTURE = 67, | |
CREATE_TEXTURE_2D = 68, | |
CREATE_TEXTURE_2D_SCALED = 69, | |
CREATE_TEXTURE_3D = 70, | |
CREATE_TEXTURE_CUBE = 71, | |
UPDATE_TEXTURE_2D = 72, | |
UPDATE_TEXTURE_3D = 73, | |
UPDATE_TEXTURE_CUBE = 74, | |
READ_TEXTURE = 75, | |
SET_TEXTURE_NAME = 76, | |
GET_DIRECT_ACCESS_PTR = 77, | |
DESTROY_TEXTURE = 78, | |
CREATE_FRAME_BUFFER = 79, | |
CREATE_FRAME_BUFFER_SCALED = 80, | |
CREATE_FRAME_BUFFER_FROM_HANDLES = 81, | |
CREATE_FRAME_BUFFER_FROM_ATTACHMENT = 82, | |
CREATE_FRAME_BUFFER_FROM_NWH = 83, | |
SET_FRAME_BUFFER_NAME = 84, | |
GET_TEXTURE = 85, | |
DESTROY_FRAME_BUFFER = 86, | |
CREATE_UNIFORM = 87, | |
GET_UNIFORM_INFO = 88, | |
DESTROY_UNIFORM = 89, | |
CREATE_OCCLUSION_QUERY = 90, | |
GET_RESULT = 91, | |
DESTROY_OCCLUSION_QUERY = 92, | |
SET_PALETTE_COLOR = 93, | |
SET_PALETTE_COLOR_RGBA8 = 94, | |
SET_VIEW_NAME = 95, | |
SET_VIEW_RECT = 96, | |
SET_VIEW_RECT_RATIO = 97, | |
SET_VIEW_SCISSOR = 98, | |
SET_VIEW_CLEAR = 99, | |
SET_VIEW_CLEAR_MRT = 100, | |
SET_VIEW_MODE = 101, | |
SET_VIEW_FRAME_BUFFER = 102, | |
SET_VIEW_TRANSFORM = 103, | |
SET_VIEW_ORDER = 104, | |
RESET_VIEW = 105, | |
ENCODER_BEGIN = 106, | |
ENCODER_END = 107, | |
ENCODER_SET_MARKER = 108, | |
ENCODER_SET_STATE = 109, | |
ENCODER_SET_CONDITION = 110, | |
ENCODER_SET_STENCIL = 111, | |
ENCODER_SET_SCISSOR = 112, | |
ENCODER_SET_SCISSOR_CACHED = 113, | |
ENCODER_SET_TRANSFORM = 114, | |
ENCODER_SET_TRANSFORM_CACHED = 115, | |
ENCODER_ALLOC_TRANSFORM = 116, | |
ENCODER_SET_UNIFORM = 117, | |
ENCODER_SET_INDEX_BUFFER = 118, | |
ENCODER_SET_DYNAMIC_INDEX_BUFFER = 119, | |
ENCODER_SET_TRANSIENT_INDEX_BUFFER = 120, | |
ENCODER_SET_VERTEX_BUFFER = 121, | |
ENCODER_SET_VERTEX_BUFFER_WITH_LAYOUT = 122, | |
ENCODER_SET_DYNAMIC_VERTEX_BUFFER = 123, | |
ENCODER_SET_DYNAMIC_VERTEX_BUFFER_WITH_LAYOUT = 124, | |
ENCODER_SET_TRANSIENT_VERTEX_BUFFER = 125, | |
ENCODER_SET_TRANSIENT_VERTEX_BUFFER_WITH_LAYOUT = 126, | |
ENCODER_SET_VERTEX_COUNT = 127, | |
ENCODER_SET_INSTANCE_DATA_BUFFER = 128, | |
ENCODER_SET_INSTANCE_DATA_FROM_VERTEX_BUFFER = 129, | |
ENCODER_SET_INSTANCE_DATA_FROM_DYNAMIC_VERTEX_BUFFER = 130, | |
ENCODER_SET_INSTANCE_COUNT = 131, | |
ENCODER_SET_TEXTURE = 132, | |
ENCODER_TOUCH = 133, | |
ENCODER_SUBMIT = 134, | |
ENCODER_SUBMIT_OCCLUSION_QUERY = 135, | |
ENCODER_SUBMIT_INDIRECT = 136, | |
ENCODER_SUBMIT_INDIRECT_COUNT = 137, | |
ENCODER_SET_COMPUTE_INDEX_BUFFER = 138, | |
ENCODER_SET_COMPUTE_VERTEX_BUFFER = 139, | |
ENCODER_SET_COMPUTE_DYNAMIC_INDEX_BUFFER = 140, | |
ENCODER_SET_COMPUTE_DYNAMIC_VERTEX_BUFFER = 141, | |
ENCODER_SET_COMPUTE_INDIRECT_BUFFER = 142, | |
ENCODER_SET_IMAGE = 143, | |
ENCODER_DISPATCH = 144, | |
ENCODER_DISPATCH_INDIRECT = 145, | |
ENCODER_DISCARD = 146, | |
ENCODER_BLIT = 147, | |
REQUEST_SCREEN_SHOT = 148, | |
RENDER_FRAME = 149, | |
SET_PLATFORM_DATA = 150, | |
GET_INTERNAL_DATA = 151, | |
OVERRIDE_INTERNAL_TEXTURE_PTR = 152, | |
OVERRIDE_INTERNAL_TEXTURE = 153, | |
SET_MARKER = 154, | |
SET_STATE = 155, | |
SET_CONDITION = 156, | |
SET_STENCIL = 157, | |
SET_SCISSOR = 158, | |
SET_SCISSOR_CACHED = 159, | |
SET_TRANSFORM = 160, | |
SET_TRANSFORM_CACHED = 161, | |
ALLOC_TRANSFORM = 162, | |
SET_UNIFORM = 163, | |
SET_INDEX_BUFFER = 164, | |
SET_DYNAMIC_INDEX_BUFFER = 165, | |
SET_TRANSIENT_INDEX_BUFFER = 166, | |
SET_VERTEX_BUFFER = 167, | |
SET_VERTEX_BUFFER_WITH_LAYOUT = 168, | |
SET_DYNAMIC_VERTEX_BUFFER = 169, | |
SET_DYNAMIC_VERTEX_BUFFER_WITH_LAYOUT = 170, | |
SET_TRANSIENT_VERTEX_BUFFER = 171, | |
SET_TRANSIENT_VERTEX_BUFFER_WITH_LAYOUT = 172, | |
SET_VERTEX_COUNT = 173, | |
SET_INSTANCE_DATA_BUFFER = 174, | |
SET_INSTANCE_DATA_FROM_VERTEX_BUFFER = 175, | |
SET_INSTANCE_DATA_FROM_DYNAMIC_VERTEX_BUFFER = 176, | |
SET_INSTANCE_COUNT = 177, | |
SET_TEXTURE = 178, | |
OUCH = 179, | |
SUBMIT = 180, | |
SUBMIT_OCCLUSION_QUERY = 181, | |
SUBMIT_INDIRECT = 182, | |
SUBMIT_INDIRECT_COUNT = 183, | |
SET_COMPUTE_INDEX_BUFFER = 184, | |
SET_COMPUTE_VERTEX_BUFFER = 185, | |
SET_COMPUTE_DYNAMIC_INDEX_BUFFER = 186, | |
SET_COMPUTE_DYNAMIC_VERTEX_BUFFER = 187, | |
SET_COMPUTE_INDIRECT_BUFFER = 188, | |
SET_IMAGE = 189, | |
DISPATCH = 190, | |
DISPATCH_INDIRECT = 191, | |
DISCARD = 192, | |
BLIT = 193, | |
COUNT = 194, | |
} | |
/// bgfx_allocator_interface_s | |
allocator_interface_s :: struct #align (8) { | |
vtbl : ^allocator_vtbl_s, | |
} | |
/// bgfx_allocator_interface_s::bgfx_allocator_vtbl_s | |
allocator_vtbl_s :: struct #align (8) { | |
realloc : proc "c" (_this: ^allocator_interface_s, _ptr: rawptr, _size: cffi.ulong, _align: cffi.ulong, _file: cstring, _line: cffi.uint) -> rawptr, | |
} | |
/// bgfx_interface_vtbl | |
interface_vtbl :: struct #align (8) { | |
attachment_init : proc "c" (_this: ^attachment_s, _handle: texture_handle_s, _access: access_t, _layer: cffi.ushort, _numLayers: cffi.ushort, _mip: cffi.ushort, _resolve: cffi.uchar), | |
vertex_layout_begin : proc "c" (_this: ^vertex_layout_s, _rendererType: renderer_type_t) -> ^vertex_layout_s, | |
vertex_layout_add : proc "c" (_this: ^vertex_layout_s, _attrib: attrib_t, _num: cffi.uchar, _type: attrib_type_t, _normalized: cffi.bool, _asInt: cffi.bool) -> ^vertex_layout_s, | |
vertex_layout_decode : proc "c" (_this: ^vertex_layout_s, _attrib: attrib_t, _num: ^cffi.uchar, _type: ^attrib_type_t, _normalized: ^cffi.bool, _asInt: ^cffi.bool), | |
vertex_layout_has : proc "c" (_this: ^vertex_layout_s, _attrib: attrib_t) -> cffi.bool, | |
vertex_layout_skip : proc "c" (_this: ^vertex_layout_s, _num: cffi.uchar) -> ^vertex_layout_s, | |
vertex_layout_end : proc "c" (_this: ^vertex_layout_s), | |
vertex_pack : proc "c" (_input: [4]cffi.float, _inputNormalized: cffi.bool, _attr: attrib_t, _layout: ^vertex_layout_s, _data: rawptr, _index: cffi.uint), | |
vertex_unpack : proc "c" (_output: [4]cffi.float, _attr: attrib_t, _layout: ^vertex_layout_s, _data: rawptr, _index: cffi.uint), | |
vertex_convert : proc "c" (_dstLayout: ^vertex_layout_s, _dstData: rawptr, _srcLayout: ^vertex_layout_s, _srcData: rawptr, _num: cffi.uint), | |
weld_vertices : proc "c" (_output: rawptr, _layout: ^vertex_layout_s, _data: rawptr, _num: cffi.uint, _index32: cffi.bool, _epsilon: cffi.float) -> cffi.uint, | |
topology_convert : proc "c" (_conversion: topology_convert_t, _dst: rawptr, _dstSize: cffi.uint, _indices: rawptr, _numIndices: cffi.uint, _index32: cffi.bool) -> cffi.uint, | |
topology_sort_tri_list : proc "c" (_sort: topology_sort_t, _dst: rawptr, _dstSize: cffi.uint, _dir: [3]cffi.float, _pos: [3]cffi.float, _vertices: rawptr, _stride: cffi.uint, _indices: rawptr, _numIndices: cffi.uint, _index32: cffi.bool), | |
get_supported_renderers : proc "c" (_max: cffi.uchar, _enum: ^renderer_type_t) -> cffi.uchar, | |
get_renderer_name : proc "c" (_type: renderer_type_t) -> cstring, | |
init_ctor : proc "c" (_init: ^init_s), | |
init : proc "c" (_init: ^init_s) -> cffi.bool, | |
shutdown : proc "c" (), | |
reset : proc "c" (_width: cffi.uint, _height: cffi.uint, _flags: cffi.uint, _format: texture_format_t), | |
frame : proc "c" (_capture: cffi.bool) -> cffi.uint, | |
get_renderer_type : proc "c" () -> renderer_type_t, | |
get_caps : proc "c" () -> ^caps_s, | |
get_stats : proc "c" () -> ^stats_s, | |
alloc : proc "c" (_size: cffi.uint) -> ^memory_s, | |
copy : proc "c" (_data: rawptr, _size: cffi.uint) -> ^memory_s, | |
make_ref : proc "c" (_data: rawptr, _size: cffi.uint) -> ^memory_s, | |
make_ref_release : proc "c" (_data: rawptr, _size: cffi.uint, _releaseFn: proc "c" (), _userData: rawptr) -> ^memory_s, | |
set_debug : proc "c" (_debug: cffi.uint), | |
dbg_text_clear : proc "c" (_attr: cffi.uchar, _small: cffi.bool), | |
dbg_text_printf : proc "c" (_x: cffi.ushort, _y: cffi.ushort, _attr: cffi.uchar, _format: cstring), | |
dbg_text_vprintf : proc "c" (_x: cffi.ushort, _y: cffi.ushort, _attr: cffi.uchar, _format: cstring, _argList: cstring), | |
dbg_text_image : proc "c" (_x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _data: rawptr, _pitch: cffi.ushort), | |
create_index_buffer : proc "c" (_mem: ^memory_s, _flags: cffi.ushort) -> index_buffer_handle_s, | |
set_index_buffer_name : proc "c" (_handle: index_buffer_handle_s, _name: cstring, _len: cffi.int), | |
destroy_index_buffer : proc "c" (_handle: index_buffer_handle_s), | |
create_vertex_layout : proc "c" (_layout: ^vertex_layout_s) -> vertex_layout_handle_s, | |
destroy_vertex_layout : proc "c" (_layoutHandle: vertex_layout_handle_s), | |
create_vertex_buffer : proc "c" (_mem: ^memory_s, _layout: ^vertex_layout_s, _flags: cffi.ushort) -> vertex_buffer_handle_s, | |
set_vertex_buffer_name : proc "c" (_handle: vertex_buffer_handle_s, _name: cstring, _len: cffi.int), | |
destroy_vertex_buffer : proc "c" (_handle: vertex_buffer_handle_s), | |
create_dynamic_index_buffer : proc "c" (_num: cffi.uint, _flags: cffi.ushort) -> dynamic_index_buffer_handle_s, | |
create_dynamic_index_buffer_mem : proc "c" (_mem: ^memory_s, _flags: cffi.ushort) -> dynamic_index_buffer_handle_s, | |
update_dynamic_index_buffer : proc "c" (_handle: dynamic_index_buffer_handle_s, _startIndex: cffi.uint, _mem: ^memory_s), | |
destroy_dynamic_index_buffer : proc "c" (_handle: dynamic_index_buffer_handle_s), | |
create_dynamic_vertex_buffer : proc "c" (_num: cffi.uint, _layout: ^vertex_layout_s, _flags: cffi.ushort) -> dynamic_vertex_buffer_handle_s, | |
create_dynamic_vertex_buffer_mem : proc "c" (_mem: ^memory_s, _layout: ^vertex_layout_s, _flags: cffi.ushort) -> dynamic_vertex_buffer_handle_s, | |
update_dynamic_vertex_buffer : proc "c" (_handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _mem: ^memory_s), | |
destroy_dynamic_vertex_buffer : proc "c" (_handle: dynamic_vertex_buffer_handle_s), | |
get_avail_transient_index_buffer : proc "c" (_num: cffi.uint, _index32: cffi.bool) -> cffi.uint, | |
get_avail_transient_vertex_buffer : proc "c" (_num: cffi.uint, _layout: ^vertex_layout_s) -> cffi.uint, | |
get_avail_instance_data_buffer : proc "c" (_num: cffi.uint, _stride: cffi.ushort) -> cffi.uint, | |
alloc_transient_index_buffer : proc "c" (_tib: ^transient_index_buffer_s, _num: cffi.uint, _index32: cffi.bool), | |
alloc_transient_vertex_buffer : proc "c" (_tvb: ^transient_vertex_buffer_s, _num: cffi.uint, _layout: ^vertex_layout_s), | |
alloc_transient_buffers : proc "c" (_tvb: ^transient_vertex_buffer_s, _layout: ^vertex_layout_s, _numVertices: cffi.uint, _tib: ^transient_index_buffer_s, _numIndices: cffi.uint, _index32: cffi.bool) -> cffi.bool, | |
alloc_instance_data_buffer : proc "c" (_idb: ^instance_data_buffer_s, _num: cffi.uint, _stride: cffi.ushort), | |
create_indirect_buffer : proc "c" (_num: cffi.uint) -> indirect_buffer_handle_s, | |
destroy_indirect_buffer : proc "c" (_handle: indirect_buffer_handle_s), | |
create_shader : proc "c" (_mem: ^memory_s) -> shader_handle_s, | |
get_shader_uniforms : proc "c" (_handle: shader_handle_s, _uniforms: ^uniform_handle_s, _max: cffi.ushort) -> cffi.ushort, | |
set_shader_name : proc "c" (_handle: shader_handle_s, _name: cstring, _len: cffi.int), | |
destroy_shader : proc "c" (_handle: shader_handle_s), | |
create_program : proc "c" (_vsh: shader_handle_s, _fsh: shader_handle_s, _destroyShaders: cffi.bool) -> program_handle_s, | |
create_compute_program : proc "c" (_csh: shader_handle_s, _destroyShaders: cffi.bool) -> program_handle_s, | |
destroy_program : proc "c" (_handle: program_handle_s), | |
is_texture_valid : proc "c" (_depth: cffi.ushort, _cubeMap: cffi.bool, _numLayers: cffi.ushort, _format: texture_format_t, _flags: cffi.ulonglong) -> cffi.bool, | |
is_frame_buffer_valid : proc "c" (_num: cffi.uchar, _attachment: ^attachment_s) -> cffi.bool, | |
calc_texture_size : proc "c" (_info: ^texture_info_s, _width: cffi.ushort, _height: cffi.ushort, _depth: cffi.ushort, _cubeMap: cffi.bool, _hasMips: cffi.bool, _numLayers: cffi.ushort, _format: texture_format_t), | |
create_texture : proc "c" (_mem: ^memory_s, _flags: cffi.ulonglong, _skip: cffi.uchar, _info: ^texture_info_s) -> texture_handle_s, | |
create_texture_2d : proc "c" (_width: cffi.ushort, _height: cffi.ushort, _hasMips: cffi.bool, _numLayers: cffi.ushort, _format: texture_format_t, _flags: cffi.ulonglong, _mem: ^memory_s) -> texture_handle_s, | |
create_texture_2d_scaled : proc "c" (_ratio: backbuffer_ratio_t, _hasMips: cffi.bool, _numLayers: cffi.ushort, _format: texture_format_t, _flags: cffi.ulonglong) -> texture_handle_s, | |
create_texture_3d : proc "c" (_width: cffi.ushort, _height: cffi.ushort, _depth: cffi.ushort, _hasMips: cffi.bool, _format: texture_format_t, _flags: cffi.ulonglong, _mem: ^memory_s) -> texture_handle_s, | |
create_texture_cube : proc "c" (_size: cffi.ushort, _hasMips: cffi.bool, _numLayers: cffi.ushort, _format: texture_format_t, _flags: cffi.ulonglong, _mem: ^memory_s) -> texture_handle_s, | |
update_texture_2d : proc "c" (_handle: texture_handle_s, _layer: cffi.ushort, _mip: cffi.uchar, _x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _mem: ^memory_s, _pitch: cffi.ushort), | |
update_texture_3d : proc "c" (_handle: texture_handle_s, _mip: cffi.uchar, _x: cffi.ushort, _y: cffi.ushort, _z: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _depth: cffi.ushort, _mem: ^memory_s), | |
update_texture_cube : proc "c" (_handle: texture_handle_s, _layer: cffi.ushort, _side: cffi.uchar, _mip: cffi.uchar, _x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _mem: ^memory_s, _pitch: cffi.ushort), | |
read_texture : proc "c" (_handle: texture_handle_s, _data: rawptr, _mip: cffi.uchar) -> cffi.uint, | |
set_texture_name : proc "c" (_handle: texture_handle_s, _name: cstring, _len: cffi.int), | |
get_direct_access_ptr : proc "c" (_handle: texture_handle_s) -> rawptr, | |
destroy_texture : proc "c" (_handle: texture_handle_s), | |
create_frame_buffer : proc "c" (_width: cffi.ushort, _height: cffi.ushort, _format: texture_format_t, _textureFlags: cffi.ulonglong) -> frame_buffer_handle_s, | |
create_frame_buffer_scaled : proc "c" (_ratio: backbuffer_ratio_t, _format: texture_format_t, _textureFlags: cffi.ulonglong) -> frame_buffer_handle_s, | |
create_frame_buffer_from_handles : proc "c" (_num: cffi.uchar, _handles: ^texture_handle_s, _destroyTexture: cffi.bool) -> frame_buffer_handle_s, | |
create_frame_buffer_from_attachment : proc "c" (_num: cffi.uchar, _attachment: ^attachment_s, _destroyTexture: cffi.bool) -> frame_buffer_handle_s, | |
create_frame_buffer_from_nwh : proc "c" (_nwh: rawptr, _width: cffi.ushort, _height: cffi.ushort, _format: texture_format_t, _depthFormat: texture_format_t) -> frame_buffer_handle_s, | |
set_frame_buffer_name : proc "c" (_handle: frame_buffer_handle_s, _name: cstring, _len: cffi.int), | |
get_texture : proc "c" (_handle: frame_buffer_handle_s, _attachment: cffi.uchar) -> texture_handle_s, | |
destroy_frame_buffer : proc "c" (_handle: frame_buffer_handle_s), | |
create_uniform : proc "c" (_name: cstring, _type: uniform_type_t, _num: cffi.ushort) -> uniform_handle_s, | |
get_uniform_info : proc "c" (_handle: uniform_handle_s, _info: ^uniform_info_s), | |
destroy_uniform : proc "c" (_handle: uniform_handle_s), | |
create_occlusion_query : proc "c" () -> occlusion_query_handle_s, | |
get_result : proc "c" (_handle: occlusion_query_handle_s, _result: ^cffi.int) -> occlusion_query_result_t, | |
destroy_occlusion_query : proc "c" (_handle: occlusion_query_handle_s), | |
set_palette_color : proc "c" (_index: cffi.uchar, _rgba: [4]cffi.float), | |
set_palette_color_rgba8 : proc "c" (_index: cffi.uchar, _rgba: cffi.uint), | |
set_view_name : proc "c" (_id: cffi.ushort, _name: cstring, _len: cffi.int), | |
set_view_rect : proc "c" (_id: cffi.ushort, _x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort), | |
set_view_rect_ratio : proc "c" (_id: cffi.ushort, _x: cffi.ushort, _y: cffi.ushort, _ratio: backbuffer_ratio_t), | |
set_view_scissor : proc "c" (_id: cffi.ushort, _x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort), | |
set_view_clear : proc "c" (_id: cffi.ushort, _flags: cffi.ushort, _rgba: cffi.uint, _depth: cffi.float, _stencil: cffi.uchar), | |
set_view_clear_mrt : proc "c" (_id: cffi.ushort, _flags: cffi.ushort, _depth: cffi.float, _stencil: cffi.uchar, _c0: cffi.uchar, _c1: cffi.uchar, _c2: cffi.uchar, _c3: cffi.uchar, _c4: cffi.uchar, _c5: cffi.uchar, _c6: cffi.uchar, _c7: cffi.uchar), | |
set_view_mode : proc "c" (_id: cffi.ushort, _mode: view_mode_t), | |
set_view_frame_buffer : proc "c" (_id: cffi.ushort, _handle: frame_buffer_handle_s), | |
set_view_transform : proc "c" (_id: cffi.ushort, _view: rawptr, _proj: rawptr), | |
set_view_order : proc "c" (_id: cffi.ushort, _num: cffi.ushort, _order: ^cffi.ushort), | |
reset_view : proc "c" (_id: cffi.ushort), | |
encoder_begin : proc "c" (_forThread: cffi.bool) -> ^encoder_s, | |
encoder_end : proc "c" (_encoder: ^encoder_s), | |
encoder_set_marker : proc "c" (_this: ^encoder_s, _name: cstring, _len: cffi.int), | |
encoder_set_state : proc "c" (_this: ^encoder_s, _state: cffi.ulonglong, _rgba: cffi.uint), | |
encoder_set_condition : proc "c" (_this: ^encoder_s, _handle: occlusion_query_handle_s, _visible: cffi.bool), | |
encoder_set_stencil : proc "c" (_this: ^encoder_s, _fstencil: cffi.uint, _bstencil: cffi.uint), | |
encoder_set_scissor : proc "c" (_this: ^encoder_s, _x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort) -> cffi.ushort, | |
encoder_set_scissor_cached : proc "c" (_this: ^encoder_s, _cache: cffi.ushort), | |
encoder_set_transform : proc "c" (_this: ^encoder_s, _mtx: rawptr, _num: cffi.ushort) -> cffi.uint, | |
encoder_set_transform_cached : proc "c" (_this: ^encoder_s, _cache: cffi.uint, _num: cffi.ushort), | |
encoder_alloc_transform : proc "c" (_this: ^encoder_s, _transform: ^transform_s, _num: cffi.ushort) -> cffi.uint, | |
encoder_set_uniform : proc "c" (_this: ^encoder_s, _handle: uniform_handle_s, _value: rawptr, _num: cffi.ushort), | |
encoder_set_index_buffer : proc "c" (_this: ^encoder_s, _handle: index_buffer_handle_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
encoder_set_dynamic_index_buffer : proc "c" (_this: ^encoder_s, _handle: dynamic_index_buffer_handle_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
encoder_set_transient_index_buffer : proc "c" (_this: ^encoder_s, _tib: ^transient_index_buffer_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
encoder_set_vertex_buffer : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
encoder_set_vertex_buffer_with_layout : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
encoder_set_dynamic_vertex_buffer : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
encoder_set_dynamic_vertex_buffer_with_layout : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
encoder_set_transient_vertex_buffer : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
encoder_set_transient_vertex_buffer_with_layout : proc "c" (_this: ^encoder_s, _stream: cffi.uchar, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
encoder_set_vertex_count : proc "c" (_this: ^encoder_s, _numVertices: cffi.uint), | |
encoder_set_instance_data_buffer : proc "c" (_this: ^encoder_s, _idb: ^instance_data_buffer_s, _start: cffi.uint, _num: cffi.uint), | |
encoder_set_instance_data_from_vertex_buffer : proc "c" (_this: ^encoder_s, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _num: cffi.uint), | |
encoder_set_instance_data_from_dynamic_vertex_buffer : proc "c" (_this: ^encoder_s, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _num: cffi.uint), | |
encoder_set_instance_count : proc "c" (_this: ^encoder_s, _numInstances: cffi.uint), | |
encoder_set_texture : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _sampler: uniform_handle_s, _handle: texture_handle_s, _flags: cffi.uint), | |
encoder_touch : proc "c" (_this: ^encoder_s, _id: cffi.ushort), | |
encoder_submit : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _depth: cffi.uint, _flags: cffi.uchar), | |
encoder_submit_occlusion_query : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _occlusionQuery: occlusion_query_handle_s, _depth: cffi.uint, _flags: cffi.uchar), | |
encoder_submit_indirect : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _num: cffi.uint, _depth: cffi.uint, _flags: cffi.uchar), | |
encoder_submit_indirect_count : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _numHandle: index_buffer_handle_s, _numIndex: cffi.uint, _numMax: cffi.uint, _depth: cffi.uint, _flags: cffi.uchar), | |
encoder_set_compute_index_buffer : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: index_buffer_handle_s, _access: access_t), | |
encoder_set_compute_vertex_buffer : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: vertex_buffer_handle_s, _access: access_t), | |
encoder_set_compute_dynamic_index_buffer : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: dynamic_index_buffer_handle_s, _access: access_t), | |
encoder_set_compute_dynamic_vertex_buffer : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _access: access_t), | |
encoder_set_compute_indirect_buffer : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: indirect_buffer_handle_s, _access: access_t), | |
encoder_set_image : proc "c" (_this: ^encoder_s, _stage: cffi.uchar, _handle: texture_handle_s, _mip: cffi.uchar, _access: access_t, _format: texture_format_t), | |
encoder_dispatch : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _numX: cffi.uint, _numY: cffi.uint, _numZ: cffi.uint, _flags: cffi.uchar), | |
encoder_dispatch_indirect : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _num: cffi.uint, _flags: cffi.uchar), | |
encoder_discard : proc "c" (_this: ^encoder_s, _flags: cffi.uchar), | |
encoder_blit : proc "c" (_this: ^encoder_s, _id: cffi.ushort, _dst: texture_handle_s, _dstMip: cffi.uchar, _dstX: cffi.ushort, _dstY: cffi.ushort, _dstZ: cffi.ushort, _src: texture_handle_s, _srcMip: cffi.uchar, _srcX: cffi.ushort, _srcY: cffi.ushort, _srcZ: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _depth: cffi.ushort), | |
request_screen_shot : proc "c" (_handle: frame_buffer_handle_s, _filePath: cstring), | |
render_frame : proc "c" (_msecs: cffi.int) -> render_frame_t, | |
set_platform_data : proc "c" (_data: ^platform_data_s), | |
get_internal_data : proc "c" () -> ^internal_data_s, | |
override_internal_texture_ptr : proc "c" (_handle: texture_handle_s, _ptr: cffi.ulong) -> cffi.ulong, | |
override_internal_texture : proc "c" (_handle: texture_handle_s, _width: cffi.ushort, _height: cffi.ushort, _numMips: cffi.uchar, _format: texture_format_t, _flags: cffi.ulonglong) -> cffi.ulong, | |
set_marker : proc "c" (_name: cstring, _len: cffi.int), | |
set_state : proc "c" (_state: cffi.ulonglong, _rgba: cffi.uint), | |
set_condition : proc "c" (_handle: occlusion_query_handle_s, _visible: cffi.bool), | |
set_stencil : proc "c" (_fstencil: cffi.uint, _bstencil: cffi.uint), | |
set_scissor : proc "c" (_x: cffi.ushort, _y: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort) -> cffi.ushort, | |
set_scissor_cached : proc "c" (_cache: cffi.ushort), | |
set_transform : proc "c" (_mtx: rawptr, _num: cffi.ushort) -> cffi.uint, | |
set_transform_cached : proc "c" (_cache: cffi.uint, _num: cffi.ushort), | |
alloc_transform : proc "c" (_transform: ^transform_s, _num: cffi.ushort) -> cffi.uint, | |
set_uniform : proc "c" (_handle: uniform_handle_s, _value: rawptr, _num: cffi.ushort), | |
set_index_buffer : proc "c" (_handle: index_buffer_handle_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
set_dynamic_index_buffer : proc "c" (_handle: dynamic_index_buffer_handle_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
set_transient_index_buffer : proc "c" (_tib: ^transient_index_buffer_s, _firstIndex: cffi.uint, _numIndices: cffi.uint), | |
set_vertex_buffer : proc "c" (_stream: cffi.uchar, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
set_vertex_buffer_with_layout : proc "c" (_stream: cffi.uchar, _handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
set_dynamic_vertex_buffer : proc "c" (_stream: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
set_dynamic_vertex_buffer_with_layout : proc "c" (_stream: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
set_transient_vertex_buffer : proc "c" (_stream: cffi.uchar, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint, _numVertices: cffi.uint), | |
set_transient_vertex_buffer_with_layout : proc "c" (_stream: cffi.uchar, _tvb: ^transient_vertex_buffer_s, _startVertex: cffi.uint, _numVertices: cffi.uint, _layoutHandle: vertex_layout_handle_s), | |
set_vertex_count : proc "c" (_numVertices: cffi.uint), | |
set_instance_data_buffer : proc "c" (_idb: ^instance_data_buffer_s, _start: cffi.uint, _num: cffi.uint), | |
set_instance_data_from_vertex_buffer : proc "c" (_handle: vertex_buffer_handle_s, _startVertex: cffi.uint, _num: cffi.uint), | |
set_instance_data_from_dynamic_vertex_buffer : proc "c" (_handle: dynamic_vertex_buffer_handle_s, _startVertex: cffi.uint, _num: cffi.uint), | |
set_instance_count : proc "c" (_numInstances: cffi.uint), | |
set_texture : proc "c" (_stage: cffi.uchar, _sampler: uniform_handle_s, _handle: texture_handle_s, _flags: cffi.uint), | |
touch : proc "c" (_id: cffi.ushort), | |
submit : proc "c" (_id: cffi.ushort, _program: program_handle_s, _depth: cffi.uint, _flags: cffi.uchar), | |
submit_occlusion_query : proc "c" (_id: cffi.ushort, _program: program_handle_s, _occlusionQuery: occlusion_query_handle_s, _depth: cffi.uint, _flags: cffi.uchar), | |
submit_indirect : proc "c" (_id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _num: cffi.uint, _depth: cffi.uint, _flags: cffi.uchar), | |
submit_indirect_count : proc "c" (_id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _numHandle: index_buffer_handle_s, _numIndex: cffi.uint, _numMax: cffi.uint, _depth: cffi.uint, _flags: cffi.uchar), | |
set_compute_index_buffer : proc "c" (_stage: cffi.uchar, _handle: index_buffer_handle_s, _access: access_t), | |
set_compute_vertex_buffer : proc "c" (_stage: cffi.uchar, _handle: vertex_buffer_handle_s, _access: access_t), | |
set_compute_dynamic_index_buffer : proc "c" (_stage: cffi.uchar, _handle: dynamic_index_buffer_handle_s, _access: access_t), | |
set_compute_dynamic_vertex_buffer : proc "c" (_stage: cffi.uchar, _handle: dynamic_vertex_buffer_handle_s, _access: access_t), | |
set_compute_indirect_buffer : proc "c" (_stage: cffi.uchar, _handle: indirect_buffer_handle_s, _access: access_t), | |
set_image : proc "c" (_stage: cffi.uchar, _handle: texture_handle_s, _mip: cffi.uchar, _access: access_t, _format: texture_format_t), | |
dispatch : proc "c" (_id: cffi.ushort, _program: program_handle_s, _numX: cffi.uint, _numY: cffi.uint, _numZ: cffi.uint, _flags: cffi.uchar), | |
dispatch_indirect : proc "c" (_id: cffi.ushort, _program: program_handle_s, _indirectHandle: indirect_buffer_handle_s, _start: cffi.uint, _num: cffi.uint, _flags: cffi.uchar), | |
discard : proc "c" (_flags: cffi.uchar), | |
blit : proc "c" (_id: cffi.ushort, _dst: texture_handle_s, _dstMip: cffi.uchar, _dstX: cffi.ushort, _dstY: cffi.ushort, _dstZ: cffi.ushort, _src: texture_handle_s, _srcMip: cffi.uchar, _srcX: cffi.ushort, _srcY: cffi.ushort, _srcZ: cffi.ushort, _width: cffi.ushort, _height: cffi.ushort, _depth: cffi.ushort), | |
} | |
/// bgfx_callback_interface_s | |
callback_interface_s :: struct #align (8) { | |
vtbl : ^callback_vtbl_s, | |
} | |
/// bgfx_callback_interface_s::bgfx_callback_vtbl_s | |
callback_vtbl_s :: struct #align (8) { | |
fatal : proc "c" (_this: ^callback_interface_s, _filePath: cstring, _line: cffi.ushort, _code: fatal_t, _str: cstring), | |
trace_vargs : proc "c" (_this: ^callback_interface_s, _filePath: cstring, _line: cffi.ushort, _format: cstring, _argList: cstring), | |
profiler_begin : proc "c" (_this: ^callback_interface_s, _name: cstring, _abgr: cffi.uint, _filePath: cstring, _line: cffi.ushort), | |
profiler_begin_literal : proc "c" (_this: ^callback_interface_s, _name: cstring, _abgr: cffi.uint, _filePath: cstring, _line: cffi.ushort), | |
profiler_end : proc "c" (_this: ^callback_interface_s), | |
cache_read_size : proc "c" (_this: ^callback_interface_s, _id: cffi.ulonglong) -> cffi.uint, | |
cache_read : proc "c" (_this: ^callback_interface_s, _id: cffi.ulonglong, _data: rawptr, _size: cffi.uint) -> cffi.bool, | |
cache_write : proc "c" (_this: ^callback_interface_s, _id: cffi.ulonglong, _data: rawptr, _size: cffi.uint), | |
screen_shot : proc "c" (_this: ^callback_interface_s, _filePath: cstring, _width: cffi.uint, _height: cffi.uint, _pitch: cffi.uint, _data: rawptr, _size: cffi.uint, _yflip: cffi.bool), | |
capture_begin : proc "c" (_this: ^callback_interface_s, _width: cffi.uint, _height: cffi.uint, _pitch: cffi.uint, _format: texture_format_t, _yflip: cffi.bool), | |
capture_end : proc "c" (_this: ^callback_interface_s), | |
capture_frame : proc "c" (_this: ^callback_interface_s, _data: rawptr, _size: cffi.uint), | |
} | |
/// bgfx_dynamic_index_buffer_handle_s | |
dynamic_index_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_dynamic_vertex_buffer_handle_s | |
dynamic_vertex_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_frame_buffer_handle_s | |
frame_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_index_buffer_handle_s | |
index_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_indirect_buffer_handle_s | |
indirect_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_occlusion_query_handle_s | |
occlusion_query_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_program_handle_s | |
program_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_shader_handle_s | |
shader_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_texture_handle_s | |
texture_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_uniform_handle_s | |
uniform_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_vertex_buffer_handle_s | |
vertex_buffer_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_vertex_layout_handle_s | |
vertex_layout_handle_s :: struct #align (2) { | |
idx : cffi.ushort, | |
} | |
/// bgfx_caps_gpu_s | |
caps_gpu_s :: struct #align (2) { | |
vendorId : cffi.ushort, | |
deviceId : cffi.ushort, | |
} | |
/// bgfx_caps_limits_s | |
caps_limits_s :: struct #align (4) { | |
maxDrawCalls : cffi.uint, | |
maxBlits : cffi.uint, | |
maxTextureSize : cffi.uint, | |
maxTextureLayers : cffi.uint, | |
maxViews : cffi.uint, | |
maxFrameBuffers : cffi.uint, | |
maxFBAttachments : cffi.uint, | |
maxPrograms : cffi.uint, | |
maxShaders : cffi.uint, | |
maxTextures : cffi.uint, | |
maxTextureSamplers : cffi.uint, | |
maxComputeBindings : cffi.uint, | |
maxVertexLayouts : cffi.uint, | |
maxVertexStreams : cffi.uint, | |
maxIndexBuffers : cffi.uint, | |
maxVertexBuffers : cffi.uint, | |
maxDynamicIndexBuffers : cffi.uint, | |
maxDynamicVertexBuffers : cffi.uint, | |
maxUniforms : cffi.uint, | |
maxOcclusionQueries : cffi.uint, | |
maxEncoders : cffi.uint, | |
minResourceCbSize : cffi.uint, | |
transientVbSize : cffi.uint, | |
transientIbSize : cffi.uint, | |
} | |
/// bgfx_caps_s | |
caps_s :: struct #align (8) { | |
rendererType : renderer_type_t, | |
supported : cffi.ulonglong, | |
vendorId : cffi.ushort, | |
deviceId : cffi.ushort, | |
homogeneousDepth : cffi.bool, | |
originBottomLeft : cffi.bool, | |
numGPUs : cffi.uchar, | |
gpu : [4]caps_gpu_s, | |
limits : caps_limits_s, | |
formats : [96]cffi.ushort, | |
} | |
/// bgfx_internal_data_s | |
internal_data_s :: struct #align (8) { | |
caps : ^caps_s, | |
_context : rawptr, | |
} | |
/// bgfx_platform_data_s | |
platform_data_s :: struct #align (8) { | |
ndt : rawptr, | |
nwh : rawptr, | |
_context : rawptr, | |
backBuffer : rawptr, | |
backBufferDS : rawptr, | |
type : native_window_handle_type_t, | |
} | |
/// bgfx_resolution_s | |
resolution_s :: struct #align (4) { | |
format : texture_format_t, | |
width : cffi.uint, | |
height : cffi.uint, | |
reset : cffi.uint, | |
numBackBuffers : cffi.uchar, | |
maxFrameLatency : cffi.uchar, | |
debugTextScale : cffi.uchar, | |
} | |
/// bgfx_init_limits_s | |
init_limits_s :: struct #align (4) { | |
maxEncoders : cffi.ushort, | |
minResourceCbSize : cffi.uint, | |
transientVbSize : cffi.uint, | |
transientIbSize : cffi.uint, | |
} | |
/// bgfx_init_s | |
init_s :: struct #align (8) { | |
type : renderer_type_t, | |
vendorId : cffi.ushort, | |
deviceId : cffi.ushort, | |
capabilities : cffi.ulonglong, | |
debug : cffi.bool, | |
profile : cffi.bool, | |
platformData : platform_data_s, | |
resolution : resolution_s, | |
limits : init_limits_s, | |
callback : ^callback_interface_s, | |
allocator : ^allocator_interface_s, | |
} | |
/// bgfx_memory_s | |
memory_s :: struct #align (8) { | |
data : ^cffi.uchar, | |
size : cffi.uint, | |
} | |
/// bgfx_transient_index_buffer_s | |
transient_index_buffer_s :: struct #align (8) { | |
data : ^cffi.uchar, | |
size : cffi.uint, | |
startIndex : cffi.uint, | |
handle : index_buffer_handle_s, | |
isIndex16 : cffi.bool, | |
} | |
/// bgfx_transient_vertex_buffer_s | |
transient_vertex_buffer_s :: struct #align (8) { | |
data : ^cffi.uchar, | |
size : cffi.uint, | |
startVertex : cffi.uint, | |
stride : cffi.ushort, | |
handle : vertex_buffer_handle_s, | |
layoutHandle : vertex_layout_handle_s, | |
} | |
/// bgfx_instance_data_buffer_s | |
instance_data_buffer_s :: struct #align (8) { | |
data : ^cffi.uchar, | |
size : cffi.uint, | |
offset : cffi.uint, | |
num : cffi.uint, | |
stride : cffi.ushort, | |
handle : vertex_buffer_handle_s, | |
} | |
/// bgfx_texture_info_s | |
texture_info_s :: struct #align (4) { | |
format : texture_format_t, | |
storageSize : cffi.uint, | |
width : cffi.ushort, | |
height : cffi.ushort, | |
depth : cffi.ushort, | |
numLayers : cffi.ushort, | |
numMips : cffi.uchar, | |
bitsPerPixel : cffi.uchar, | |
cubeMap : cffi.bool, | |
} | |
/// bgfx_uniform_info_s | |
uniform_info_s :: struct #align (4) { | |
name : [256]cffi.char, | |
type : uniform_type_t, | |
num : cffi.ushort, | |
} | |
/// bgfx_attachment_s | |
attachment_s :: struct #align (4) { | |
access : access_t, | |
handle : texture_handle_s, | |
mip : cffi.ushort, | |
layer : cffi.ushort, | |
numLayers : cffi.ushort, | |
resolve : cffi.uchar, | |
} | |
/// bgfx_transform_s | |
transform_s :: struct #align (8) { | |
data : ^cffi.float, | |
num : cffi.ushort, | |
} | |
/// bgfx_view_stats_s | |
view_stats_s :: struct #align (8) { | |
name : [256]cffi.char, | |
view : cffi.ushort, | |
cpuTimeBegin : cffi.longlong, | |
cpuTimeEnd : cffi.longlong, | |
gpuTimeBegin : cffi.longlong, | |
gpuTimeEnd : cffi.longlong, | |
gpuFrameNum : cffi.uint, | |
} | |
/// bgfx_encoder_stats_s | |
encoder_stats_s :: struct #align (8) { | |
cpuTimeBegin : cffi.longlong, | |
cpuTimeEnd : cffi.longlong, | |
} | |
/// bgfx_stats_s | |
stats_s :: struct #align (8) { | |
cpuTimeFrame : cffi.longlong, | |
cpuTimeBegin : cffi.longlong, | |
cpuTimeEnd : cffi.longlong, | |
cpuTimerFreq : cffi.longlong, | |
gpuTimeBegin : cffi.longlong, | |
gpuTimeEnd : cffi.longlong, | |
gpuTimerFreq : cffi.longlong, | |
waitRender : cffi.longlong, | |
waitSubmit : cffi.longlong, | |
numDraw : cffi.uint, | |
numCompute : cffi.uint, | |
numBlit : cffi.uint, | |
maxGpuLatency : cffi.uint, | |
gpuFrameNum : cffi.uint, | |
numDynamicIndexBuffers : cffi.ushort, | |
numDynamicVertexBuffers : cffi.ushort, | |
numFrameBuffers : cffi.ushort, | |
numIndexBuffers : cffi.ushort, | |
numOcclusionQueries : cffi.ushort, | |
numPrograms : cffi.ushort, | |
numShaders : cffi.ushort, | |
numTextures : cffi.ushort, | |
numUniforms : cffi.ushort, | |
numVertexBuffers : cffi.ushort, | |
numVertexLayouts : cffi.ushort, | |
textureMemoryUsed : cffi.longlong, | |
rtMemoryUsed : cffi.longlong, | |
transientVbUsed : cffi.int, | |
transientIbUsed : cffi.int, | |
numPrims : [5]cffi.uint, | |
gpuMemoryMax : cffi.longlong, | |
gpuMemoryUsed : cffi.longlong, | |
width : cffi.ushort, | |
height : cffi.ushort, | |
textWidth : cffi.ushort, | |
textHeight : cffi.ushort, | |
numViews : cffi.ushort, | |
viewStats : ^view_stats_s, | |
numEncoders : cffi.uchar, | |
encoderStats : ^encoder_stats_s, | |
} | |
/// bgfx_vertex_layout_s | |
vertex_layout_s :: struct #align (4) { | |
hash : cffi.uint, | |
stride : cffi.ushort, | |
offset : [18]cffi.ushort, | |
attributes : [18]cffi.ushort, | |
} | |
/// bgfx_encoder_s | |
encoder_s :: struct {} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment