diff --git a/citro3d-sys/bindgen.sh b/citro3d-sys/bindgen.sh index 713f1a8..ac378f0 100755 --- a/citro3d-sys/bindgen.sh +++ b/citro3d-sys/bindgen.sh @@ -10,6 +10,7 @@ bindgen "$DEVKITPRO/libctru/include/citro3d.h" \ --ctypes-prefix "::libc" \ --no-prepend-enum-name \ --fit-macro-constant-types \ + --must-use-type "Result" \ --generate "functions,types,vars" \ --blocklist-type "u(8|16|32|64)" \ --opaque-type "GPU_.*" \ diff --git a/citro3d-sys/src/bindings.rs b/citro3d-sys/src/bindings.rs index 294b741..862e4d8 100644 --- a/citro3d-sys/src/bindings.rs +++ b/citro3d-sys/src/bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.59.2 */ +/* automatically generated by rust-bindgen 0.60.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] @@ -923,17 +923,20 @@ pub struct shaderProgram_s { pub geoShaderInputStride: u8_, } extern "C" { + #[must_use] #[doc = " @brief Initializes a shader instance."] #[doc = " @param si Shader instance to initialize."] #[doc = " @param dvle DVLE to initialize the shader instance with."] pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Frees a shader instance."] #[doc = " @param si Shader instance to free."] pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Sets a bool uniform of a shader."] #[doc = " @param si Shader instance to use."] #[doc = " @param id ID of the bool uniform."] @@ -945,6 +948,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Gets a bool uniform of a shader."] #[doc = " @param si Shader instance to use."] #[doc = " @param id ID of the bool uniform."] @@ -965,22 +969,26 @@ extern "C" { ) -> s8; } extern "C" { + #[must_use] #[doc = " @brief Initializes a shader program."] #[doc = " @param sp Shader program to initialize."] pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Frees a shader program."] #[doc = " @param sp Shader program to free."] pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Sets the vertex shader of a shader program."] #[doc = " @param sp Shader program to use."] #[doc = " @param dvle Vertex shader to set."] pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Sets the geometry shader of a shader program."] #[doc = " @param sp Shader program to use."] #[doc = " @param dvle Geometry shader to set."] @@ -988,6 +996,7 @@ extern "C" { pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Configures the permutation of the input attributes of the geometry shader of a shader program."] #[doc = " @param sp Shader program to use."] #[doc = " @param permutation Attribute permutation to use."] @@ -997,6 +1006,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Configures the shader units to use the specified shader program."] #[doc = " @param sp Shader program to use."] #[doc = " @param sendVshCode When true, the vertex shader's code and operand descriptors are uploaded."] @@ -1008,6 +1018,7 @@ extern "C" { ) -> Result; } extern "C" { + #[must_use] #[doc = " @brief Same as shaderProgramConfigure, but always loading code/operand descriptors and uploading DVLE constants afterwards."] #[doc = " @param sp Shader program to use."] pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result; @@ -1395,8 +1406,8 @@ extern "C" { extern "C" { pub fn C3D_SetBufInfo(info: *mut C3D_BufInfo); } -pub const C3D_UNSIGNED_BYTE: ::libc::c_uint = 0; -pub const C3D_UNSIGNED_SHORT: ::libc::c_uint = 1; +pub const C3D_UNSIGNED_BYTE: _bindgen_ty_38 = 0; +pub const C3D_UNSIGNED_SHORT: _bindgen_ty_38 = 1; pub type _bindgen_ty_38 = ::libc::c_uint; extern "C" { pub fn C3D_Init(cmdBufSize: size_t) -> bool; @@ -2117,9 +2128,9 @@ impl C3D_ProcTex__bindgen_ty_6__bindgen_ty_1 { __bindgen_bitfield_unit } } -pub const C3D_ProcTex_U: ::libc::c_uint = 1; -pub const C3D_ProcTex_V: ::libc::c_uint = 2; -pub const C3D_ProcTex_UV: ::libc::c_uint = 3; +pub const C3D_ProcTex_U: _bindgen_ty_39 = 1; +pub const C3D_ProcTex_V: _bindgen_ty_39 = 2; +pub const C3D_ProcTex_UV: _bindgen_ty_39 = 3; pub type _bindgen_ty_39 = ::libc::c_uint; extern "C" { pub fn C3D_ProcTexInit(pt: *mut C3D_ProcTex, offset: ::libc::c_int, length: ::libc::c_int); @@ -2470,8 +2481,8 @@ pub struct C3D_RenderTarget_tag { pub side: gfx3dSide_t, pub transferFlags: u32_, } -pub const C3D_FRAME_SYNCDRAW: ::libc::c_uint = 1; -pub const C3D_FRAME_NONBLOCK: ::libc::c_uint = 2; +pub const C3D_FRAME_SYNCDRAW: _bindgen_ty_43 = 1; +pub const C3D_FRAME_NONBLOCK: _bindgen_ty_43 = 2; pub type _bindgen_ty_43 = ::libc::c_uint; extern "C" { pub fn C3D_FrameRate(fps: f32) -> f32;