thindx 0.0.0-unsound.5

Thin DirectX wrappers
Documentation
#[allow(unused_imports)] use crate::*;

use winapi::um::d3dcommon::*;



/// \[[docs.microsoft.com](https://docs.microsoft.com/en-us/windows/win32/api/d3dcommon/ne-d3dcommon-d3d_interpolation_mode)\]
/// D3D_INTERPOLATION_MODE / D3D_INTERPOLATION_\*
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[repr(transparent)] pub struct InterpolationMode(D3D_INTERPOLATION_MODE);
#[doc(hidden)] pub use InterpolationMode as Interpolation;

enumish! { Interpolation => D3D_INTERPOLATION_MODE; Undefined, Constant, Linear, LinearCentroid, LinearNoPerspective, LinearNoPerspectiveCentroid, LinearSample, LinearNoPerspectiveSample }

#[allow(missing_docs)]
#[allow(non_upper_case_globals)] impl Interpolation { // These are enum-like
    pub const Undefined                     : Interpolation = Interpolation(D3D_INTERPOLATION_UNDEFINED);
    pub const Constant                      : Interpolation = Interpolation(D3D_INTERPOLATION_CONSTANT);
    pub const Linear                        : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR);
    pub const LinearCentroid                : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_CENTROID);
    pub const LinearNoPerspective           : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE);
    pub const LinearNoPerspectiveCentroid   : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID);
    pub const LinearSample                  : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_SAMPLE);
    pub const LinearNoPerspectiveSample     : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE);
}

#[doc(hidden)] impl Interpolation { // Ctrl+C Ctrl+V support
    pub const UNDEFINED                     : Interpolation = Interpolation(D3D_INTERPOLATION_UNDEFINED);
    pub const CONSTANT                      : Interpolation = Interpolation(D3D_INTERPOLATION_CONSTANT);
    pub const LINEAR                        : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR);
    pub const LINEAR_CENTROID               : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_CENTROID);
    pub const LINEAR_NOPERSPECTIVE          : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE);
    pub const LINEAR_NOPERSPECTIVE_CENTROID : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_CENTROID);
    pub const LINEAR_SAMPLE                 : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_SAMPLE);
    pub const LINEAR_NOPERSPECTIVE_SAMPLE   : Interpolation = Interpolation(D3D_INTERPOLATION_LINEAR_NOPERSPECTIVE_SAMPLE);
}

impl Default for Interpolation {
    fn default() -> Self { Interpolation(0) }
}