objc2_model_io/generated/
MDLTexture.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14#[repr(transparent)]
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
20pub struct MDLTextureChannelEncoding(pub NSInteger);
21impl MDLTextureChannelEncoding {
22 #[doc(alias = "MDLTextureChannelEncodingUInt8")]
23 pub const UInt8: Self = Self(1);
24 #[doc(alias = "MDLTextureChannelEncodingUint8")]
25 pub const Uint8: Self = Self(1);
26 #[doc(alias = "MDLTextureChannelEncodingUInt16")]
27 pub const UInt16: Self = Self(2);
28 #[doc(alias = "MDLTextureChannelEncodingUint16")]
29 pub const Uint16: Self = Self(2);
30 #[doc(alias = "MDLTextureChannelEncodingUInt24")]
31 pub const UInt24: Self = Self(3);
32 #[doc(alias = "MDLTextureChannelEncodingUint24")]
33 pub const Uint24: Self = Self(3);
34 #[doc(alias = "MDLTextureChannelEncodingUInt32")]
35 pub const UInt32: Self = Self(4);
36 #[doc(alias = "MDLTextureChannelEncodingUint32")]
37 pub const Uint32: Self = Self(4);
38 #[doc(alias = "MDLTextureChannelEncodingFloat16")]
39 pub const Float16: Self = Self(0x102);
40 #[doc(alias = "MDLTextureChannelEncodingFloat16SR")]
41 pub const Float16SR: Self = Self(0x302);
42 #[doc(alias = "MDLTextureChannelEncodingFloat32")]
43 pub const Float32: Self = Self(0x104);
44}
45
46unsafe impl Encode for MDLTextureChannelEncoding {
47 const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50unsafe impl RefEncode for MDLTextureChannelEncoding {
51 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}
53
54extern_class!(
55 #[unsafe(super(NSObject))]
86 #[derive(Debug, PartialEq, Eq, Hash)]
87 pub struct MDLTexture;
88);
89
90#[cfg(feature = "MDLTypes")]
91unsafe impl MDLNamed for MDLTexture {}
92
93unsafe impl NSObjectProtocol for MDLTexture {}
94
95impl MDLTexture {
96 extern_methods!(
97 #[unsafe(method(init))]
98 #[unsafe(method_family = init)]
99 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
100
101 #[unsafe(method(textureNamed:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
106
107 #[unsafe(method(textureNamed:bundle:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn textureNamed_bundle(
110 name: &NSString,
111 bundle_or_nil: Option<&NSBundle>,
112 ) -> Option<Retained<Self>>;
113
114 #[cfg(feature = "MDLAssetResolver")]
115 #[unsafe(method(textureNamed:assetResolver:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn textureNamed_assetResolver(
118 name: &NSString,
119 resolver: &ProtocolObject<dyn MDLAssetResolver>,
120 ) -> Option<Retained<Self>>;
121
122 #[unsafe(method(textureCubeWithImagesNamed:))]
138 #[unsafe(method_family = none)]
139 pub unsafe fn textureCubeWithImagesNamed(
140 names: &NSArray<NSString>,
141 ) -> Option<Retained<Self>>;
142
143 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn textureCubeWithImagesNamed_bundle(
146 names: &NSArray<NSString>,
147 bundle_or_nil: Option<&NSBundle>,
148 ) -> Option<Retained<Self>>;
149
150 #[unsafe(method(writeToURL:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn writeToURL(&self, url: &NSURL) -> bool;
154
155 #[unsafe(method(writeToURL:level:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn writeToURL_level(&self, url: &NSURL, level: NSUInteger) -> bool;
159
160 #[cfg(feature = "objc2-core-foundation")]
161 #[unsafe(method(writeToURL:type:))]
163 #[unsafe(method_family = none)]
164 pub unsafe fn writeToURL_type(&self, nsurl: &NSURL, r#type: &CFString) -> bool;
165
166 #[cfg(feature = "objc2-core-foundation")]
167 #[unsafe(method(writeToURL:type:level:))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn writeToURL_type_level(
171 &self,
172 nsurl: &NSURL,
173 r#type: &CFString,
174 level: NSUInteger,
175 ) -> bool;
176
177 #[cfg(feature = "objc2-core-graphics")]
178 #[unsafe(method(imageFromTexture))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn imageFromTexture(&self) -> Option<Retained<CGImage>>;
181
182 #[cfg(feature = "objc2-core-graphics")]
183 #[unsafe(method(imageFromTextureAtLevel:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn imageFromTextureAtLevel(
186 &self,
187 level: NSUInteger,
188 ) -> Option<Retained<CGImage>>;
189
190 #[unsafe(method(texelDataWithTopLeftOrigin))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn texelDataWithTopLeftOrigin(&self) -> Option<Retained<NSData>>;
193
194 #[unsafe(method(texelDataWithBottomLeftOrigin))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn texelDataWithBottomLeftOrigin(&self) -> Option<Retained<NSData>>;
197
198 #[unsafe(method(texelDataWithTopLeftOriginAtMipLevel:create:))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn texelDataWithTopLeftOriginAtMipLevel_create(
201 &self,
202 level: NSInteger,
203 create: bool,
204 ) -> Option<Retained<NSData>>;
205
206 #[unsafe(method(texelDataWithBottomLeftOriginAtMipLevel:create:))]
207 #[unsafe(method_family = none)]
208 pub unsafe fn texelDataWithBottomLeftOriginAtMipLevel_create(
209 &self,
210 level: NSInteger,
211 create: bool,
212 ) -> Option<Retained<NSData>>;
213
214 #[unsafe(method(rowStride))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn rowStride(&self) -> NSInteger;
217
218 #[unsafe(method(channelCount))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn channelCount(&self) -> NSUInteger;
221
222 #[unsafe(method(mipLevelCount))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn mipLevelCount(&self) -> NSUInteger;
225
226 #[unsafe(method(channelEncoding))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn channelEncoding(&self) -> MDLTextureChannelEncoding;
229
230 #[unsafe(method(isCube))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn isCube(&self) -> bool;
233
234 #[unsafe(method(setIsCube:))]
236 #[unsafe(method_family = none)]
237 pub unsafe fn setIsCube(&self, is_cube: bool);
238
239 #[unsafe(method(hasAlphaValues))]
244 #[unsafe(method_family = none)]
245 pub unsafe fn hasAlphaValues(&self) -> bool;
246
247 #[unsafe(method(setHasAlphaValues:))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn setHasAlphaValues(&self, has_alpha_values: bool);
251 );
252}
253
254impl MDLTexture {
256 extern_methods!(
257 #[unsafe(method(new))]
258 #[unsafe(method_family = new)]
259 pub unsafe fn new() -> Retained<Self>;
260 );
261}
262
263extern_class!(
264 #[unsafe(super(MDLTexture, NSObject))]
273 #[derive(Debug, PartialEq, Eq, Hash)]
274 pub struct MDLURLTexture;
275);
276
277#[cfg(feature = "MDLTypes")]
278unsafe impl MDLNamed for MDLURLTexture {}
279
280unsafe impl NSObjectProtocol for MDLURLTexture {}
281
282impl MDLURLTexture {
283 extern_methods!(
284 #[unsafe(method(initWithURL:name:))]
285 #[unsafe(method_family = init)]
286 pub unsafe fn initWithURL_name(
287 this: Allocated<Self>,
288 url: &NSURL,
289 name: Option<&NSString>,
290 ) -> Retained<Self>;
291
292 #[unsafe(method(URL))]
293 #[unsafe(method_family = none)]
294 pub unsafe fn URL(&self) -> Retained<NSURL>;
295
296 #[unsafe(method(setURL:))]
298 #[unsafe(method_family = none)]
299 pub unsafe fn setURL(&self, url: &NSURL);
300 );
301}
302
303impl MDLURLTexture {
305 extern_methods!(
306 #[unsafe(method(init))]
307 #[unsafe(method_family = init)]
308 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
309
310 #[unsafe(method(textureNamed:))]
313 #[unsafe(method_family = none)]
314 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
315
316 #[unsafe(method(textureNamed:bundle:))]
317 #[unsafe(method_family = none)]
318 pub unsafe fn textureNamed_bundle(
319 name: &NSString,
320 bundle_or_nil: Option<&NSBundle>,
321 ) -> Option<Retained<Self>>;
322
323 #[cfg(feature = "MDLAssetResolver")]
324 #[unsafe(method(textureNamed:assetResolver:))]
325 #[unsafe(method_family = none)]
326 pub unsafe fn textureNamed_assetResolver(
327 name: &NSString,
328 resolver: &ProtocolObject<dyn MDLAssetResolver>,
329 ) -> Option<Retained<Self>>;
330
331 #[unsafe(method(textureCubeWithImagesNamed:))]
347 #[unsafe(method_family = none)]
348 pub unsafe fn textureCubeWithImagesNamed(
349 names: &NSArray<NSString>,
350 ) -> Option<Retained<Self>>;
351
352 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn textureCubeWithImagesNamed_bundle(
355 names: &NSArray<NSString>,
356 bundle_or_nil: Option<&NSBundle>,
357 ) -> Option<Retained<Self>>;
358 );
359}
360
361impl MDLURLTexture {
363 extern_methods!(
364 #[unsafe(method(new))]
365 #[unsafe(method_family = new)]
366 pub unsafe fn new() -> Retained<Self>;
367 );
368}
369
370extern_class!(
371 #[unsafe(super(MDLTexture, NSObject))]
380 #[derive(Debug, PartialEq, Eq, Hash)]
381 pub struct MDLCheckerboardTexture;
382);
383
384#[cfg(feature = "MDLTypes")]
385unsafe impl MDLNamed for MDLCheckerboardTexture {}
386
387unsafe impl NSObjectProtocol for MDLCheckerboardTexture {}
388
389impl MDLCheckerboardTexture {
390 extern_methods!(
391 #[unsafe(method(divisions))]
392 #[unsafe(method_family = none)]
393 pub unsafe fn divisions(&self) -> c_float;
394
395 #[unsafe(method(setDivisions:))]
397 #[unsafe(method_family = none)]
398 pub unsafe fn setDivisions(&self, divisions: c_float);
399
400 #[cfg(feature = "objc2-core-graphics")]
401 #[unsafe(method(color1))]
402 #[unsafe(method_family = none)]
403 pub unsafe fn color1(&self) -> Option<Retained<CGColor>>;
404
405 #[cfg(feature = "objc2-core-graphics")]
406 #[unsafe(method(setColor1:))]
408 #[unsafe(method_family = none)]
409 pub unsafe fn setColor1(&self, color1: Option<&CGColor>);
410
411 #[cfg(feature = "objc2-core-graphics")]
412 #[unsafe(method(color2))]
413 #[unsafe(method_family = none)]
414 pub unsafe fn color2(&self) -> Option<Retained<CGColor>>;
415
416 #[cfg(feature = "objc2-core-graphics")]
417 #[unsafe(method(setColor2:))]
419 #[unsafe(method_family = none)]
420 pub unsafe fn setColor2(&self, color2: Option<&CGColor>);
421 );
422}
423
424impl MDLCheckerboardTexture {
426 extern_methods!(
427 #[unsafe(method(init))]
428 #[unsafe(method_family = init)]
429 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
430
431 #[unsafe(method(textureNamed:))]
434 #[unsafe(method_family = none)]
435 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
436
437 #[unsafe(method(textureNamed:bundle:))]
438 #[unsafe(method_family = none)]
439 pub unsafe fn textureNamed_bundle(
440 name: &NSString,
441 bundle_or_nil: Option<&NSBundle>,
442 ) -> Option<Retained<Self>>;
443
444 #[cfg(feature = "MDLAssetResolver")]
445 #[unsafe(method(textureNamed:assetResolver:))]
446 #[unsafe(method_family = none)]
447 pub unsafe fn textureNamed_assetResolver(
448 name: &NSString,
449 resolver: &ProtocolObject<dyn MDLAssetResolver>,
450 ) -> Option<Retained<Self>>;
451
452 #[unsafe(method(textureCubeWithImagesNamed:))]
468 #[unsafe(method_family = none)]
469 pub unsafe fn textureCubeWithImagesNamed(
470 names: &NSArray<NSString>,
471 ) -> Option<Retained<Self>>;
472
473 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
474 #[unsafe(method_family = none)]
475 pub unsafe fn textureCubeWithImagesNamed_bundle(
476 names: &NSArray<NSString>,
477 bundle_or_nil: Option<&NSBundle>,
478 ) -> Option<Retained<Self>>;
479 );
480}
481
482impl MDLCheckerboardTexture {
484 extern_methods!(
485 #[unsafe(method(new))]
486 #[unsafe(method_family = new)]
487 pub unsafe fn new() -> Retained<Self>;
488 );
489}
490
491extern_class!(
492 #[unsafe(super(MDLTexture, NSObject))]
542 #[derive(Debug, PartialEq, Eq, Hash)]
543 pub struct MDLSkyCubeTexture;
544);
545
546#[cfg(feature = "MDLTypes")]
547unsafe impl MDLNamed for MDLSkyCubeTexture {}
548
549unsafe impl NSObjectProtocol for MDLSkyCubeTexture {}
550
551impl MDLSkyCubeTexture {
552 extern_methods!(
553 #[unsafe(method(updateTexture))]
555 #[unsafe(method_family = none)]
556 pub unsafe fn updateTexture(&self);
557
558 #[unsafe(method(turbidity))]
559 #[unsafe(method_family = none)]
560 pub unsafe fn turbidity(&self) -> c_float;
561
562 #[unsafe(method(setTurbidity:))]
564 #[unsafe(method_family = none)]
565 pub unsafe fn setTurbidity(&self, turbidity: c_float);
566
567 #[unsafe(method(sunElevation))]
568 #[unsafe(method_family = none)]
569 pub unsafe fn sunElevation(&self) -> c_float;
570
571 #[unsafe(method(setSunElevation:))]
573 #[unsafe(method_family = none)]
574 pub unsafe fn setSunElevation(&self, sun_elevation: c_float);
575
576 #[unsafe(method(sunAzimuth))]
577 #[unsafe(method_family = none)]
578 pub unsafe fn sunAzimuth(&self) -> c_float;
579
580 #[unsafe(method(setSunAzimuth:))]
582 #[unsafe(method_family = none)]
583 pub unsafe fn setSunAzimuth(&self, sun_azimuth: c_float);
584
585 #[unsafe(method(upperAtmosphereScattering))]
586 #[unsafe(method_family = none)]
587 pub unsafe fn upperAtmosphereScattering(&self) -> c_float;
588
589 #[unsafe(method(setUpperAtmosphereScattering:))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn setUpperAtmosphereScattering(&self, upper_atmosphere_scattering: c_float);
593
594 #[unsafe(method(groundAlbedo))]
595 #[unsafe(method_family = none)]
596 pub unsafe fn groundAlbedo(&self) -> c_float;
597
598 #[unsafe(method(setGroundAlbedo:))]
600 #[unsafe(method_family = none)]
601 pub unsafe fn setGroundAlbedo(&self, ground_albedo: c_float);
602
603 #[unsafe(method(horizonElevation))]
604 #[unsafe(method_family = none)]
605 pub unsafe fn horizonElevation(&self) -> c_float;
606
607 #[unsafe(method(setHorizonElevation:))]
609 #[unsafe(method_family = none)]
610 pub unsafe fn setHorizonElevation(&self, horizon_elevation: c_float);
611
612 #[cfg(feature = "objc2-core-graphics")]
613 #[unsafe(method(groundColor))]
614 #[unsafe(method_family = none)]
615 pub unsafe fn groundColor(&self) -> Option<Retained<CGColor>>;
616
617 #[cfg(feature = "objc2-core-graphics")]
618 #[unsafe(method(setGroundColor:))]
620 #[unsafe(method_family = none)]
621 pub unsafe fn setGroundColor(&self, ground_color: Option<&CGColor>);
622
623 #[unsafe(method(gamma))]
624 #[unsafe(method_family = none)]
625 pub unsafe fn gamma(&self) -> c_float;
626
627 #[unsafe(method(setGamma:))]
629 #[unsafe(method_family = none)]
630 pub unsafe fn setGamma(&self, gamma: c_float);
631
632 #[unsafe(method(exposure))]
633 #[unsafe(method_family = none)]
634 pub unsafe fn exposure(&self) -> c_float;
635
636 #[unsafe(method(setExposure:))]
638 #[unsafe(method_family = none)]
639 pub unsafe fn setExposure(&self, exposure: c_float);
640
641 #[unsafe(method(brightness))]
642 #[unsafe(method_family = none)]
643 pub unsafe fn brightness(&self) -> c_float;
644
645 #[unsafe(method(setBrightness:))]
647 #[unsafe(method_family = none)]
648 pub unsafe fn setBrightness(&self, brightness: c_float);
649
650 #[unsafe(method(contrast))]
651 #[unsafe(method_family = none)]
652 pub unsafe fn contrast(&self) -> c_float;
653
654 #[unsafe(method(setContrast:))]
656 #[unsafe(method_family = none)]
657 pub unsafe fn setContrast(&self, contrast: c_float);
658
659 #[unsafe(method(saturation))]
660 #[unsafe(method_family = none)]
661 pub unsafe fn saturation(&self) -> c_float;
662
663 #[unsafe(method(setSaturation:))]
665 #[unsafe(method_family = none)]
666 pub unsafe fn setSaturation(&self, saturation: c_float);
667 );
668}
669
670impl MDLSkyCubeTexture {
672 extern_methods!(
673 #[unsafe(method(init))]
674 #[unsafe(method_family = init)]
675 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
676
677 #[unsafe(method(textureNamed:))]
680 #[unsafe(method_family = none)]
681 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
682
683 #[unsafe(method(textureNamed:bundle:))]
684 #[unsafe(method_family = none)]
685 pub unsafe fn textureNamed_bundle(
686 name: &NSString,
687 bundle_or_nil: Option<&NSBundle>,
688 ) -> Option<Retained<Self>>;
689
690 #[cfg(feature = "MDLAssetResolver")]
691 #[unsafe(method(textureNamed:assetResolver:))]
692 #[unsafe(method_family = none)]
693 pub unsafe fn textureNamed_assetResolver(
694 name: &NSString,
695 resolver: &ProtocolObject<dyn MDLAssetResolver>,
696 ) -> Option<Retained<Self>>;
697
698 #[unsafe(method(textureCubeWithImagesNamed:))]
714 #[unsafe(method_family = none)]
715 pub unsafe fn textureCubeWithImagesNamed(
716 names: &NSArray<NSString>,
717 ) -> Option<Retained<Self>>;
718
719 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
720 #[unsafe(method_family = none)]
721 pub unsafe fn textureCubeWithImagesNamed_bundle(
722 names: &NSArray<NSString>,
723 bundle_or_nil: Option<&NSBundle>,
724 ) -> Option<Retained<Self>>;
725 );
726}
727
728impl MDLSkyCubeTexture {
730 extern_methods!(
731 #[unsafe(method(new))]
732 #[unsafe(method_family = new)]
733 pub unsafe fn new() -> Retained<Self>;
734 );
735}
736
737extern_class!(
738 #[unsafe(super(MDLTexture, NSObject))]
740 #[derive(Debug, PartialEq, Eq, Hash)]
741 pub struct MDLColorSwatchTexture;
742);
743
744#[cfg(feature = "MDLTypes")]
745unsafe impl MDLNamed for MDLColorSwatchTexture {}
746
747unsafe impl NSObjectProtocol for MDLColorSwatchTexture {}
748
749impl MDLColorSwatchTexture {
750 extern_methods!();
751}
752
753impl MDLColorSwatchTexture {
755 extern_methods!(
756 #[unsafe(method(init))]
757 #[unsafe(method_family = init)]
758 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
759
760 #[unsafe(method(textureNamed:))]
763 #[unsafe(method_family = none)]
764 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
765
766 #[unsafe(method(textureNamed:bundle:))]
767 #[unsafe(method_family = none)]
768 pub unsafe fn textureNamed_bundle(
769 name: &NSString,
770 bundle_or_nil: Option<&NSBundle>,
771 ) -> Option<Retained<Self>>;
772
773 #[cfg(feature = "MDLAssetResolver")]
774 #[unsafe(method(textureNamed:assetResolver:))]
775 #[unsafe(method_family = none)]
776 pub unsafe fn textureNamed_assetResolver(
777 name: &NSString,
778 resolver: &ProtocolObject<dyn MDLAssetResolver>,
779 ) -> Option<Retained<Self>>;
780
781 #[unsafe(method(textureCubeWithImagesNamed:))]
797 #[unsafe(method_family = none)]
798 pub unsafe fn textureCubeWithImagesNamed(
799 names: &NSArray<NSString>,
800 ) -> Option<Retained<Self>>;
801
802 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
803 #[unsafe(method_family = none)]
804 pub unsafe fn textureCubeWithImagesNamed_bundle(
805 names: &NSArray<NSString>,
806 bundle_or_nil: Option<&NSBundle>,
807 ) -> Option<Retained<Self>>;
808 );
809}
810
811impl MDLColorSwatchTexture {
813 extern_methods!(
814 #[unsafe(method(new))]
815 #[unsafe(method_family = new)]
816 pub unsafe fn new() -> Retained<Self>;
817 );
818}
819
820extern_class!(
821 #[unsafe(super(MDLTexture, NSObject))]
829 #[derive(Debug, PartialEq, Eq, Hash)]
830 pub struct MDLNoiseTexture;
831);
832
833#[cfg(feature = "MDLTypes")]
834unsafe impl MDLNamed for MDLNoiseTexture {}
835
836unsafe impl NSObjectProtocol for MDLNoiseTexture {}
837
838impl MDLNoiseTexture {
839 extern_methods!();
840}
841
842impl MDLNoiseTexture {
844 extern_methods!(
845 #[unsafe(method(init))]
846 #[unsafe(method_family = init)]
847 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
848
849 #[unsafe(method(textureNamed:))]
852 #[unsafe(method_family = none)]
853 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
854
855 #[unsafe(method(textureNamed:bundle:))]
856 #[unsafe(method_family = none)]
857 pub unsafe fn textureNamed_bundle(
858 name: &NSString,
859 bundle_or_nil: Option<&NSBundle>,
860 ) -> Option<Retained<Self>>;
861
862 #[cfg(feature = "MDLAssetResolver")]
863 #[unsafe(method(textureNamed:assetResolver:))]
864 #[unsafe(method_family = none)]
865 pub unsafe fn textureNamed_assetResolver(
866 name: &NSString,
867 resolver: &ProtocolObject<dyn MDLAssetResolver>,
868 ) -> Option<Retained<Self>>;
869
870 #[unsafe(method(textureCubeWithImagesNamed:))]
886 #[unsafe(method_family = none)]
887 pub unsafe fn textureCubeWithImagesNamed(
888 names: &NSArray<NSString>,
889 ) -> Option<Retained<Self>>;
890
891 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
892 #[unsafe(method_family = none)]
893 pub unsafe fn textureCubeWithImagesNamed_bundle(
894 names: &NSArray<NSString>,
895 bundle_or_nil: Option<&NSBundle>,
896 ) -> Option<Retained<Self>>;
897 );
898}
899
900impl MDLNoiseTexture {
902 extern_methods!(
903 #[unsafe(method(new))]
904 #[unsafe(method_family = new)]
905 pub unsafe fn new() -> Retained<Self>;
906 );
907}
908
909extern_class!(
910 #[unsafe(super(MDLTexture, NSObject))]
912 #[derive(Debug, PartialEq, Eq, Hash)]
913 pub struct MDLNormalMapTexture;
914);
915
916#[cfg(feature = "MDLTypes")]
917unsafe impl MDLNamed for MDLNormalMapTexture {}
918
919unsafe impl NSObjectProtocol for MDLNormalMapTexture {}
920
921impl MDLNormalMapTexture {
922 extern_methods!(
923 #[unsafe(method(initByGeneratingNormalMapWithTexture:name:smoothness:contrast:))]
924 #[unsafe(method_family = init)]
925 pub unsafe fn initByGeneratingNormalMapWithTexture_name_smoothness_contrast(
926 this: Allocated<Self>,
927 source_texture: &MDLTexture,
928 name: Option<&NSString>,
929 smoothness: c_float,
930 contrast: c_float,
931 ) -> Retained<Self>;
932 );
933}
934
935impl MDLNormalMapTexture {
937 extern_methods!(
938 #[unsafe(method(init))]
939 #[unsafe(method_family = init)]
940 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
941
942 #[unsafe(method(textureNamed:))]
945 #[unsafe(method_family = none)]
946 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
947
948 #[unsafe(method(textureNamed:bundle:))]
949 #[unsafe(method_family = none)]
950 pub unsafe fn textureNamed_bundle(
951 name: &NSString,
952 bundle_or_nil: Option<&NSBundle>,
953 ) -> Option<Retained<Self>>;
954
955 #[cfg(feature = "MDLAssetResolver")]
956 #[unsafe(method(textureNamed:assetResolver:))]
957 #[unsafe(method_family = none)]
958 pub unsafe fn textureNamed_assetResolver(
959 name: &NSString,
960 resolver: &ProtocolObject<dyn MDLAssetResolver>,
961 ) -> Option<Retained<Self>>;
962
963 #[unsafe(method(textureCubeWithImagesNamed:))]
979 #[unsafe(method_family = none)]
980 pub unsafe fn textureCubeWithImagesNamed(
981 names: &NSArray<NSString>,
982 ) -> Option<Retained<Self>>;
983
984 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
985 #[unsafe(method_family = none)]
986 pub unsafe fn textureCubeWithImagesNamed_bundle(
987 names: &NSArray<NSString>,
988 bundle_or_nil: Option<&NSBundle>,
989 ) -> Option<Retained<Self>>;
990 );
991}
992
993impl MDLNormalMapTexture {
995 extern_methods!(
996 #[unsafe(method(new))]
997 #[unsafe(method_family = new)]
998 pub unsafe fn new() -> Retained<Self>;
999 );
1000}