Skip to main content

dear_implot3d_sys/
lib.rs

1//! Low-level FFI bindings for ImPlot3D via the cimplot3d C API
2//!
3//! This crate pairs with `dear-imgui-sys` and exposes raw bindings to the
4//! ImPlot3D library using the cimplot3d C API. Prefer using the higher-level
5//! `dear-implot3d` crate for safe, idiomatic Rust wrappers.
6
7#![allow(non_upper_case_globals)]
8#![allow(non_camel_case_types)]
9#![allow(non_snake_case)]
10#![allow(dead_code)]
11#![allow(unnecessary_transmutes)]
12#![allow(unsafe_op_in_unsafe_fn)]
13#![allow(clippy::all)]
14#![allow(unpredictable_function_pointer_comparisons)]
15
16// Re-export Dear ImGui types for compatibility
17pub use dear_imgui_sys::{ImDrawList, ImGuiContext, ImGuiID, ImTextureID, ImVec2, ImVec4};
18
19// Include generated bindings
20include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
21
22#[cfg(all(feature = "surface-test-probe", not(target_arch = "wasm32")))]
23#[doc(hidden)]
24pub mod surface_test_probe {
25    unsafe extern "C" {
26        pub fn dear_implot3d_surface_probe_reset();
27        pub fn dear_implot3d_surface_probe_plot(
28            label_id: *const std::ffi::c_char,
29            xs: *const f32,
30            ys: *const f32,
31            zs: *const f32,
32            x_count: std::ffi::c_int,
33            y_count: std::ffi::c_int,
34            scale_min: f64,
35            scale_max: f64,
36            spec: super::ImPlot3DSpec_c,
37        );
38        pub fn dear_implot3d_surface_probe_read(
39            xs: *mut f32,
40            ys: *mut f32,
41            zs: *mut f32,
42            capacity: std::ffi::c_int,
43            x_count: *mut std::ffi::c_int,
44            y_count: *mut std::ffi::c_int,
45        ) -> std::ffi::c_int;
46    }
47}