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
27extern_conformance!(
28 unsafe impl NSObjectProtocol for SCNRenderer {}
29);
30
31#[cfg(feature = "SCNSceneRenderer")]
32extern_conformance!(
33 unsafe impl SCNSceneRenderer for SCNRenderer {}
34);
35
36#[cfg(feature = "SCNTechnique")]
37extern_conformance!(
38 unsafe impl SCNTechniqueSupport for SCNRenderer {}
39);
40
41impl SCNRenderer {
42 extern_methods!(
43 #[cfg(feature = "objc2-metal")]
44 #[cfg(not(target_os = "watchos"))]
45 #[unsafe(method(rendererWithDevice:options:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn rendererWithDevice_options(
53 device: Option<&ProtocolObject<dyn MTLDevice>>,
54 options: Option<&NSDictionary>,
55 ) -> Retained<Self>;
56
57 #[cfg(feature = "SCNScene")]
58 #[unsafe(method(scene))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn scene(&self) -> Option<Retained<SCNScene>>;
62
63 #[cfg(feature = "SCNScene")]
64 #[unsafe(method(setScene:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setScene(&self, scene: Option<&SCNScene>);
68
69 #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-metal"))]
70 #[cfg(not(target_os = "watchos"))]
71 #[unsafe(method(renderAtTime:viewport:commandBuffer:passDescriptor:))]
75 #[unsafe(method_family = none)]
76 pub unsafe fn renderAtTime_viewport_commandBuffer_passDescriptor(
77 &self,
78 time: CFTimeInterval,
79 viewport: CGRect,
80 command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
81 render_pass_descriptor: &MTLRenderPassDescriptor,
82 );
83
84 #[cfg(feature = "objc2-core-foundation")]
85 #[unsafe(method(renderAtTime:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn renderAtTime(&self, time: CFTimeInterval);
91
92 #[cfg(feature = "objc2-core-foundation")]
93 #[unsafe(method(updateAtTime:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn updateAtTime(&self, time: CFTimeInterval);
97
98 #[cfg(all(feature = "objc2-core-foundation", feature = "objc2-metal"))]
99 #[cfg(not(target_os = "watchos"))]
100 #[unsafe(method(renderWithViewport:commandBuffer:passDescriptor:))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn renderWithViewport_commandBuffer_passDescriptor(
106 &self,
107 viewport: CGRect,
108 command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
109 render_pass_descriptor: &MTLRenderPassDescriptor,
110 );
111
112 #[cfg(feature = "objc2-core-foundation")]
113 #[unsafe(method(nextFrameTime))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn nextFrameTime(&self) -> CFTimeInterval;
117
118 #[cfg(all(
119 feature = "SCNSceneRenderer",
120 feature = "objc2-app-kit",
121 feature = "objc2-core-foundation"
122 ))]
123 #[cfg(target_os = "macos")]
124 #[unsafe(method(snapshotAtTime:withSize:antialiasingMode:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn snapshotAtTime_withSize_antialiasingMode(
128 &self,
129 time: CFTimeInterval,
130 size: CGSize,
131 antialiasing_mode: SCNAntialiasingMode,
132 ) -> Retained<NSImage>;
133
134 #[cfg(all(feature = "SCNNode", feature = "objc2-core-foundation"))]
135 #[unsafe(method(updateProbes:atTime:))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn updateProbes_atTime(
145 &self,
146 light_probes: &NSArray<SCNNode>,
147 time: CFTimeInterval,
148 );
149 );
150}
151
152impl SCNRenderer {
154 extern_methods!(
155 #[unsafe(method(init))]
156 #[unsafe(method_family = init)]
157 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
158
159 #[unsafe(method(new))]
160 #[unsafe(method_family = new)]
161 pub unsafe fn new() -> Retained<Self>;
162 );
163}