Skip to main content

engage/generated/unity_engine/rendering/universal/
shaderdata.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "unity_engine-rendering-universal-shaderdata-types")]
4mod __types {
5    #[allow(unused_imports)] use ::unity::prelude::*;
6
7    use super::*;
8    use crate::system::object::{IObject, Object};
9
10    #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/unity_engine/rendering/universal/shaderdata/ShaderData.md"))]
11    #[::unity::class(namespace = "UnityEngine.Rendering.Universal", name = "ShaderData")]
12    #[parent(crate::system::object::Object)]
13    pub struct ShaderData {
14        #[static_field]
15        #[rename(name = "m_Instance")]
16        pub m_instance: crate::unity_engine::rendering::universal::shaderdata::ShaderData,
17        #[offset(16)]
18        #[rename(name = "m_LightDataBuffer")]
19        pub m_light_data_buffer: crate::unity_engine::computebuffer::ComputeBuffer,
20        #[offset(24)]
21        #[rename(name = "m_LightIndicesBuffer")]
22        pub m_light_indices_buffer: crate::unity_engine::computebuffer::ComputeBuffer,
23        #[offset(32)]
24        #[rename(name = "m_ShadowDataBuffer")]
25        pub m_shadow_data_buffer: crate::unity_engine::computebuffer::ComputeBuffer,
26        #[offset(40)]
27        #[rename(name = "m_ShadowIndicesBuffer")]
28        pub m_shadow_indices_buffer: crate::unity_engine::computebuffer::ComputeBuffer,
29    }
30}
31
32#[cfg(feature = "unity_engine-rendering-universal-shaderdata-types")]
33pub use __types::*;
34
35#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
36impl ShaderData {
37    #[doc = "`get_instance()` overload"]
38    pub fn get_instance() -> crate::unity_engine::rendering::universal::shaderdata::ShaderData {
39        unsafe {
40            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6880usize)as*mut u8,crate::unity_engine::rendering::universal::shaderdata::ShaderData;
41            )
42        }
43    }
44
45    #[doc = "`.cctor()` overload"]
46    pub fn cctor() -> () {
47        unsafe {
48            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6be0usize)as*mut u8,();
49            )
50        }
51    }
52}
53
54#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
55pub trait IShaderDataMethods: IShaderData {
56    #[doc = "`.ctor()` overload"]
57    fn ctor(self) -> () {
58        unsafe {
59            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
60            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6870usize)as*mut u8,();
61(ShaderData)__receiver)
62        }
63    }
64    #[doc = "`Dispose()` overload"]
65    fn dispose(self) -> () {
66        unsafe {
67            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
68            {
69                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
70                let __vi = *__vt.get(4usize).unwrap_or_else(|| {
71                    panic!(
72                        "unity: virtual slot {}
73 out of range (vtable len {}
74) on the runtime class behind {}
75 (method `{}
76`)",
77                        4usize,
78                        __vt.len(),
79                        <ShaderData as ::unity::ClassIdentity>::NAME,
80                        "Dispose",
81                    )
82                });
83                let __inner: extern "C" fn(ShaderData, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__vi.method_ptr);
84                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
85                __inner(__receiver, __mi)
86            }
87        }
88    }
89    #[doc = "`GetLightDataBuffer(i32)` overload"]
90    fn get_light_data_buffer(self, size: impl ::core::convert::Into<i32>) -> crate::unity_engine::computebuffer::ComputeBuffer {
91        unsafe {
92            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
93            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6a60usize)as*mut u8,crate::unity_engine::computebuffer::ComputeBuffer;
94(ShaderData)__receiver,(i32)::core::convert::Into::into(size))
95        }
96    }
97    #[doc = "`GetLightIndicesBuffer(i32)` overload"]
98    fn get_light_indices_buffer(self, size: impl ::core::convert::Into<i32>) -> crate::unity_engine::computebuffer::ComputeBuffer {
99        unsafe {
100            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
101            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6ac0usize)as*mut u8,crate::unity_engine::computebuffer::ComputeBuffer;
102(ShaderData)__receiver,(i32)::core::convert::Into::into(size))
103        }
104    }
105    #[doc = "`GetShadowDataBuffer(i32)` overload"]
106    fn get_shadow_data_buffer(self, size: impl ::core::convert::Into<i32>) -> crate::unity_engine::computebuffer::ComputeBuffer {
107        unsafe {
108            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
109            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6b20usize)as*mut u8,crate::unity_engine::computebuffer::ComputeBuffer;
110(ShaderData)__receiver,(i32)::core::convert::Into::into(size))
111        }
112    }
113    #[doc = "`GetShadowIndicesBuffer(i32)` overload"]
114    fn get_shadow_indices_buffer(self, size: impl ::core::convert::Into<i32>) -> crate::unity_engine::computebuffer::ComputeBuffer {
115        unsafe {
116            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6b80usize)as*mut u8,crate::unity_engine::computebuffer::ComputeBuffer;
118(ShaderData)__receiver,(i32)::core::convert::Into::into(size))
119        }
120    }
121    fn get_or_update_buffer<M0: ::unity::IlType + ::core::marker::Copy + ::unity::ClassIdentity>(
122        self,
123        buffer: impl ::core::convert::Into<*mut crate::unity_engine::computebuffer::ComputeBuffer>,
124        size: impl ::core::convert::Into<i32>,
125    ) -> crate::unity_engine::computebuffer::ComputeBuffer {
126        static OPEN: ::std::sync::LazyLock<::unity::Il2CppResult<&'static ::unity::il2cpp::MethodInfo>> = ::std::sync::LazyLock::new(|| {
127            ::unity::lookup::method_info_on_class(<ShaderData as ::unity::ClassIdentity>::class(), "GetOrUpdateBuffer", 2)
128        });
129        #[allow(clippy::type_complexity)]
130        static CACHE: ::std::sync::OnceLock<::std::sync::Mutex<::std::collections::HashMap<usize, &'static ::unity::il2cpp::MethodInfo>>> =
131            ::std::sync::OnceLock::new();
132        let _ = false;
133        let __open: &'static ::unity::il2cpp::MethodInfo = match &*OPEN {
134            ::core::result::Result::Ok(mi) => *mi,
135            ::core::result::Result::Err(e) => {
136                panic!(
137                    "method lookup failed: {}
138::{}
139: {}
140",
141                    <ShaderData as ::unity::ClassIdentity>::NAME,
142                    "GetOrUpdateBuffer",
143                    e
144                )
145            },
146        };
147        let __cache = CACHE.get_or_init(|| ::std::sync::Mutex::new(::std::collections::HashMap::new()));
148        let __key: usize = <M0 as ::unity::IlType>::il_type() as *const _ as usize;
149        let __inflated: &'static ::unity::il2cpp::MethodInfo = {
150            let mut __guard = __cache.lock().unwrap();
151            *__guard
152                .entry(__key)
153                .or_insert_with(|| ::unity::il2cpp::generic::create_generic_method_info(__open, &[<M0 as ::unity::IlType>::il_type()]))
154        };
155        unsafe {
156            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
157            let __f: extern "C" fn(
158                ShaderData,
159                *mut crate::unity_engine::computebuffer::ComputeBuffer,
160                i32,
161                ::unity::OptionalMethod,
162            ) -> crate::unity_engine::computebuffer::ComputeBuffer = ::core::mem::transmute(__inflated.method_ptr);
163            let __mi_opaque: &'static () = &*(__inflated as *const _ as *const ());
164            __f(
165                __receiver,
166                ::core::convert::Into::into(buffer),
167                ::core::convert::Into::into(size),
168                ::core::option::Option::Some(__mi_opaque),
169            )
170        }
171    }
172    #[doc = "`DisposeBuffer(*mutcrate::unity_engine::computebuffer::ComputeBuffer)` overload"]
173    fn dispose_buffer(self) -> crate::unity_engine::computebuffer::ComputeBuffer {
174        unsafe {
175            let __receiver = <ShaderData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
176            let mut __out_0 = ::core::mem::MaybeUninit::<crate::unity_engine::computebuffer::ComputeBuffer>::uninit();
177            ::unity::il2cpp_call!((::unity::module_base()+0x2ed6a10usize)as*mut u8,();
178(ShaderData)__receiver,(*mut crate::unity_engine::computebuffer::ComputeBuffer)__out_0.as_mut_ptr());
179            __out_0.assume_init()
180        }
181    }
182}
183
184#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
185impl<__T: IShaderData> IShaderDataMethods for __T {}
186
187#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
188impl ShaderData {
189    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
190        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
191    }
192
193    pub fn get_instance_method_info() -> &'static ::unity::il2cpp::MethodInfo {
194        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
195    }
196
197    pub fn dispose_method_info() -> &'static ::unity::il2cpp::MethodInfo {
198        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
199    }
200
201    pub fn get_light_data_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
202        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
203    }
204
205    pub fn get_light_indices_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
206        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
207    }
208
209    pub fn get_shadow_data_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
210        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
211    }
212
213    pub fn get_shadow_indices_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
214        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
215    }
216
217    pub fn dispose_buffer_method_info() -> &'static ::unity::il2cpp::MethodInfo {
218        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
219    }
220
221    pub fn cctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
222        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
223    }
224}
225
226#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
227impl ShaderData {
228    #[doc = "Direct (non-virtual) call to `ShaderData`'s own `Dispose`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
229    pub unsafe fn dispose(this: impl ::core::convert::Into<::unity::IlInstance>) -> () {
230        let __mi = Self::dispose_method_info();
231        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> () = ::core::mem::transmute(__mi.method_ptr);
232        __inner(this.into(), ::core::option::Option::None)
233    }
234}
235
236#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
237impl ShaderData {
238    #[doc = "`.ctor()` — no args"]
239    pub fn new() -> Self {
240        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
241            panic!(
242                "{}
243::{}
244 failed to instantiate",
245                ::core::stringify!(ShaderData),
246                ::core::stringify!(new),
247            )
248        });
249        <Self as IShaderDataMethods>::ctor(this);
250        this
251    }
252}
253
254#[cfg(feature = "unity_engine-rendering-universal-shaderdata")]
255#[doc(hidden)]
256pub mod prelude {
257    pub use super::{IShaderData, IShaderDataMethods, ShaderData};
258    pub use crate::system::object::IObject;
259    #[cfg(feature = "system-object")]
260    pub use crate::system::object::IObjectMethods;
261}