Skip to main content

engage/generated/unity_engine/rendering/
xrgraphics.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rendering-xrgraphics-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::{
9        object::{IObject, Object},
10        r#enum::{Enum, IEnum},
11        valuetype::{IValueType, ValueType},
12    };
13
14    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/xrgraphics/XRGraphics.md"))]
15    #[::unity::class(namespace = "UnityEngine.Rendering", name = "XRGraphics")]
16    #[parent(crate::system::object::Object)]
17    pub struct XRGraphics {}
18
19    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/xrgraphics/XRGraphics_StereoRenderingMode.md"))]
20    #[repr(C)]
21    #[derive(::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, ::core::cmp::PartialEq, ::core::cmp::Eq)]
22    pub struct XRGraphics_StereoRenderingMode {
23        pub value: i32,
24    }
25    impl ::unity::ClassIdentity for XRGraphics_StereoRenderingMode {
26        const NAME: &'static str = "XRGraphics.StereoRenderingMode";
27        const NAMESPACE: &'static str = "UnityEngine.Rendering";
28
29        fn class() -> ::unity::Class {
30            static CACHE: ::std::sync::OnceLock<::unity::Class> = ::std::sync::OnceLock::new();
31            *CACHE.get_or_init(|| ::unity::Class::lookup(Self::NAMESPACE, Self::NAME))
32        }
33    }
34    impl ::unity::IlType for XRGraphics_StereoRenderingMode {
35        fn il_type() -> &'static ::unity::il2cpp::Il2CppType {
36            &<Self as ::unity::ClassIdentity>::class().raw()._1.byval_arg
37        }
38    }
39    impl XRGraphics_StereoRenderingMode {
40        pub fn multi_pass() -> Self {
41            Self { value: 0 }
42        }
43
44        pub fn single_pass() -> Self {
45            Self { value: 1 }
46        }
47
48        pub fn single_pass_instanced() -> Self {
49            Self { value: 2 }
50        }
51
52        pub fn single_pass_multi_view() -> Self {
53            Self { value: 3 }
54        }
55    }
56}
57
58#[cfg(feature = "unity_engine-rendering-xrgraphics-types")]
59pub use __types::*;
60
61#[cfg(feature = "unity_engine-rendering-xrgraphics")]
62impl XRGraphics {
63    #[doc = "`get_eyeTextureResolutionScale()` overload"]
64    pub fn get_eye_texture_resolution_scale() -> f32 {
65        unsafe {
66            ::unity::il2cpp_call!((::unity::module_base()+0x33e9290usize)as*mut u8,f32;
67            )
68        }
69    }
70
71    #[doc = "`set_eyeTextureResolutionScale(f32)` overload"]
72    pub fn set_eye_texture_resolution_scale(value: impl ::core::convert::Into<f32>) -> () {
73        unsafe {
74            ::unity::il2cpp_call!((::unity::module_base()+0x33e92d0usize)as*mut u8,();
75(f32)::core::convert::Into::into(value))
76        }
77    }
78
79    #[doc = "`get_renderViewportScale()` overload"]
80    pub fn get_render_viewport_scale() -> f32 {
81        unsafe {
82            ::unity::il2cpp_call!((::unity::module_base()+0x33e92e0usize)as*mut u8,f32;
83            )
84        }
85    }
86
87    #[doc = "`get_enabled()` overload"]
88    pub fn get_enabled() -> bool {
89        unsafe {
90            ::unity::il2cpp_call!((::unity::module_base()+0x33e92c0usize)as*mut u8,bool;
91            )
92        }
93    }
94
95    #[doc = "`get_isDeviceActive()` overload"]
96    pub fn get_is_device_active() -> bool {
97        unsafe {
98            ::unity::il2cpp_call!((::unity::module_base()+0x33e9310usize)as*mut u8,bool;
99            )
100        }
101    }
102
103    #[doc = "`get_loadedDeviceName()` overload"]
104    pub fn get_loaded_device_name() -> ::unity::Il2CppString {
105        unsafe {
106            ::unity::il2cpp_call!((::unity::module_base()+0x33e9340usize)as*mut u8, ::unity::Il2CppString;
107            )
108        }
109    }
110
111    #[doc = "`get_supportedDevices()` overload"]
112    pub fn get_supported_devices() -> ::unity::Array<::unity::Il2CppString> {
113        unsafe {
114            ::unity::il2cpp_call!((::unity::module_base()+0x33e93a0usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
115            )
116        }
117    }
118
119    #[doc = "`get_stereoRenderingMode()` overload"]
120    pub fn get_stereo_rendering_mode() -> crate::unity_engine::rendering::xrgraphics::XRGraphics_StereoRenderingMode {
121        unsafe {
122            ::unity::il2cpp_call!((::unity::module_base()+0x33e9410usize)as*mut u8,crate::unity_engine::rendering::xrgraphics::XRGraphics_StereoRenderingMode;
123            )
124        }
125    }
126
127    #[doc = "`get_eyeTextureDesc()` overload"]
128    pub fn get_eye_texture_desc() -> crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor {
129        unsafe {
130            ::unity::il2cpp_call!((::unity::module_base()+0x33e9440usize)as*mut u8,crate::unity_engine::rendertexturedescriptor::RenderTextureDescriptor;
131            )
132        }
133    }
134
135    #[doc = "`get_eyeTextureWidth()` overload"]
136    pub fn get_eye_texture_width() -> i32 {
137        unsafe {
138            ::unity::il2cpp_call!((::unity::module_base()+0x33e94d0usize)as*mut u8,i32;
139            )
140        }
141    }
142
143    #[doc = "`get_eyeTextureHeight()` overload"]
144    pub fn get_eye_texture_height() -> i32 {
145        unsafe {
146            ::unity::il2cpp_call!((::unity::module_base()+0x33e9500usize)as*mut u8,i32;
147            )
148        }
149    }
150}
151
152#[cfg(feature = "unity_engine-rendering-xrgraphics")]
153pub trait IXRGraphicsMethods: IXRGraphics {
154    #[doc = "`.ctor()` overload"]
155    fn ctor(self) -> () {
156        unsafe {
157            let __receiver = <XRGraphics as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
158            ::unity::il2cpp_call!((::unity::module_base()+0x33e9530usize)as*mut u8,();
159(XRGraphics)__receiver)
160        }
161    }
162}
163
164#[cfg(feature = "unity_engine-rendering-xrgraphics")]
165impl<__T: IXRGraphics> IXRGraphicsMethods for __T {}
166
167#[cfg(feature = "unity_engine-rendering-xrgraphics")]
168impl XRGraphics {
169    pub fn get_eye_texture_resolution_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
170        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
171    }
172
173    pub fn set_eye_texture_resolution_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
174        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
175    }
176
177    pub fn get_render_viewport_scale_method_info() -> &'static ::unity::il2cpp::MethodInfo {
178        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
179    }
180
181    pub fn get_enabled_method_info() -> &'static ::unity::il2cpp::MethodInfo {
182        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
183    }
184
185    pub fn get_is_device_active_method_info() -> &'static ::unity::il2cpp::MethodInfo {
186        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
187    }
188
189    pub fn get_loaded_device_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
191    }
192
193    pub fn get_supported_devices_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
195    }
196
197    pub fn get_stereo_rendering_mode_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
199    }
200
201    pub fn get_eye_texture_desc_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
203    }
204
205    pub fn get_eye_texture_width_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
207    }
208
209    pub fn get_eye_texture_height_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
211    }
212
213    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
215    }
216}
217
218#[cfg(feature = "unity_engine-rendering-xrgraphics")]
219impl XRGraphics {
220    #[doc = "`.ctor()` — no args"]
221    pub fn new() -> Self {
222        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
223            panic!(
224                "{}
225::{}
226 failed to instantiate",
227                ::core::stringify!(XRGraphics),
228                ::core::stringify!(new),
229            )
230        });
231        <Self as IXRGraphicsMethods>::ctor(this);
232        this
233    }
234}
235
236#[cfg(feature = "unity_engine-rendering-xrgraphics")]
237#[doc(hidden)]
238pub mod prelude {
239    pub use super::{IXRGraphics, IXRGraphicsMethods, XRGraphics, XRGraphics_StereoRenderingMode};
240    #[cfg(feature = "system-object")]
241    pub use crate::system::object::IObjectMethods;
242    #[cfg(feature = "system-enum")]
243    pub use crate::system::r#enum::IEnumMethods;
244    #[cfg(feature = "system-valuetype")]
245    pub use crate::system::valuetype::IValueTypeMethods;
246    pub use crate::system::{object::IObject, r#enum::IEnum, valuetype::IValueType};
247}