librashader/librashader-capi/src/ctypes.rs

24 lines
708 B
Rust
Raw Normal View History

2022-12-05 14:48:57 +11:00
//! Binding types for the librashader C API.
2022-12-04 10:32:10 +11:00
use crate::error::LibrashaderError;
use librashader::presets::ShaderPreset;
use std::ptr::NonNull;
2022-12-04 10:32:10 +11:00
pub type libra_shader_preset_t = Option<NonNull<ShaderPreset>>;
2022-12-05 14:37:03 +11:00
pub type libra_error_t = Option<NonNull<LibrashaderError>>;
2022-12-04 10:32:10 +11:00
2022-12-05 14:37:03 +11:00
#[cfg(feature = "runtime-opengl")]
pub type libra_gl_filter_chain_t = Option<NonNull<librashader::runtime::gl::capi::FilterChainGL>>;
2022-12-04 10:56:57 +11:00
2022-12-05 14:48:57 +11:00
#[cfg(feature = "runtime-d3d11")]
pub type libra_d3d11_filter_chain_t =
Option<NonNull<librashader::runtime::d3d11::capi::FilterChainD3D11>>;
2022-12-05 14:48:57 +11:00
2022-12-05 14:37:03 +11:00
/// Parameters for the output viewport.
2022-12-04 10:56:57 +11:00
#[repr(C)]
pub struct libra_viewport_t {
pub x: f32,
pub y: f32,
pub width: u32,
pub height: u32,
}