objc2_scene_kit/generated/
SCNRenderer.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-app-kit")]
7#[cfg(target_os = "macos")]
8use objc2_app_kit::*;
9#[cfg(feature = "objc2-core-foundation")]
10use objc2_core_foundation::*;
11use objc2_foundation::*;
12#[cfg(feature = "objc2-metal")]
13#[cfg(not(target_os = "watchos"))]
14use objc2_metal::*;
15
16use crate::*;
17
18extern_class!(
19 #[unsafe(super(NSObject))]
23 #[derive(Debug, PartialEq, Eq, Hash)]
24 pub struct SCNRenderer;
25);
26
27unsafe impl NSObjectProtocol for SCNRenderer {}
28
29#[cfg(feature = "SCNSceneRenderer")]
30unsafe impl SCNSceneRenderer for SCNRenderer {}
31
32#[cfg(feature = "SCNTechnique")]
33unsafe impl SCNTechniqueSupport for SCNRenderer {}
34
35impl SCNRenderer {
36 extern_methods!(
37 #[cfg(feature = "objc2-metal")]
38 #[cfg(not(target_os = "watchos"))]
39 #[unsafe(method(rendererWithDevice:options:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn rendererWithDevice_options(
47 device: Option<&ProtocolObject<dyn MTLDevice>>,
48 options: Option<&NSDictionary>,
49 ) -> Retained<Self>;
50
51 #[cfg(feature = "SCNScene")]
52 #[unsafe(method(scene))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn scene(&self) -> Option<Retained<SCNScene>>;
56
57 #[cfg(feature = "SCNScene")]
58 #[unsafe(method(setScene:))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn setScene(&self, scene: Option<&SCNScene>);
62
63 #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-metal"))]
64 #[cfg(not(target_os = "watchos"))]
65 #[unsafe(method(renderAtTime:viewport:commandBuffer:passDescriptor:))]
69 #[unsafe(method_family = none)]
70 pub unsafe fn renderAtTime_viewport_commandBuffer_passDescriptor(
71 &self,
72 time: CFTimeInterval,
73 viewport: CGRect,
74 command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
75 render_pass_descriptor: &MTLRenderPassDescriptor,
76 );
77
78 #[cfg(feature = "objc2-core-foundation")]
79 #[unsafe(method(renderAtTime:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn renderAtTime(&self, time: CFTimeInterval);
85
86 #[cfg(feature = "objc2-core-foundation")]
87 #[unsafe(method(updateAtTime:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn updateAtTime(&self, time: CFTimeInterval);
91
92 #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-metal"))]
93 #[cfg(not(target_os = "watchos"))]
94 #[unsafe(method(renderWithViewport:commandBuffer:passDescriptor:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn renderWithViewport_commandBuffer_passDescriptor(
100 &self,
101 viewport: CGRect,
102 command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
103 render_pass_descriptor: &MTLRenderPassDescriptor,
104 );
105
106 #[cfg(feature = "objc2-core-foundation")]
107 #[unsafe(method(nextFrameTime))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn nextFrameTime(&self) -> CFTimeInterval;
111
112 #[cfg(all(
113 feature = "SCNSceneRenderer",
114 feature = "objc2-app-kit",
115 feature = "objc2-core-foundation"
116 ))]
117 #[cfg(target_os = "macos")]
118 #[unsafe(method(snapshotAtTime:withSize:antialiasingMode:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn snapshotAtTime_withSize_antialiasingMode(
122 &self,
123 time: CFTimeInterval,
124 size: CGSize,
125 antialiasing_mode: SCNAntialiasingMode,
126 ) -> Retained<NSImage>;
127
128 #[cfg(all(feature = "SCNNode", feature = "objc2-core-foundation"))]
129 #[unsafe(method(updateProbes:atTime:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn updateProbes_atTime(
139 &self,
140 light_probes: &NSArray<SCNNode>,
141 time: CFTimeInterval,
142 );
143 );
144}
145
146impl SCNRenderer {
148 extern_methods!(
149 #[unsafe(method(init))]
150 #[unsafe(method_family = init)]
151 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
152
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new() -> Retained<Self>;
156 );
157}