-
Notifications
You must be signed in to change notification settings - Fork 576
[SceneKit] Update for Xcode 11 #7140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,7 @@ | |
|
|
||
| using NMatrix4 = global::OpenTK.NMatrix4; | ||
| using NVector3 = global::OpenTK.NVector3; | ||
| using Vector3 = global::OpenTK.NVector3; | ||
| using Vector4 = global::OpenTK.Vector4; | ||
| using Quaternion = global::OpenTK.Quaternion; | ||
|
|
||
|
|
@@ -597,8 +598,39 @@ interface SCNCamera : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCod | |
| [Watch (4, 0), TV (11, 0), Mac (10, 13), iOS (11, 0)] | ||
| [Export ("screenSpaceAmbientOcclusionNormalThreshold")] | ||
| nfloat ScreenSpaceAmbientOcclusionNormalThreshold { get; set; } | ||
|
|
||
| #endif | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("projectionTransformWithViewportSize:")] | ||
| SCNMatrix4 GetProjectionTransform (CGSize viewportSize); | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("bloomIterationCount")] | ||
| nint BloomIterationCount { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("bloomIterationSpread")] | ||
| nfloat BloomIterationSpread { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("grainIntensity")] | ||
| nfloat GrainIntensity { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("grainScale")] | ||
| nfloat GrainScale { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("grainIsColored")] | ||
| bool GrainIsColored { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("whiteBalanceTemperature")] | ||
| nfloat WhiteBalanceTemperature { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("whiteBalanceTint")] | ||
| nfloat WhiteBalanceTint { get; set; } | ||
| } | ||
|
|
||
| interface ISCNCameraControlConfiguration {} | ||
|
|
@@ -1135,6 +1167,10 @@ interface SCNHitTest { | |
| [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] | ||
| [Field ("SCNHitTestOptionSearchMode")] | ||
| NSString SearchModeKey { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Field ("SCNHitTestOptionIgnoreLightArea")] | ||
| NSString IgnoreLightAreaKey { get; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -1177,6 +1213,8 @@ interface SCNHitTestResult { | |
|
|
||
| #if MONOMAC | ||
| [iOS (8,0)] | ||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] | ||
| [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] | ||
| [BaseType (typeof (CAOpenGLLayer))] | ||
| interface SCNLayer : SCNSceneRenderer, SCNTechniqueSupport { | ||
| // We already pull in the Scene property from the SCNSceneRenderer protocol, no need to redefine it here. | ||
|
|
@@ -1340,6 +1378,83 @@ interface SCNLight : SCNAnimatable, SCNTechniqueSupport, NSCopying, NSSecureCodi | |
| [Export ("lightWithMDLLight:")] | ||
| SCNLight FromModelLight (MDLLight mdllight); | ||
| #endif | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("probeType", ArgumentSemantic.Assign)] | ||
| SCNLightProbeType ProbeType { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("probeUpdateType", ArgumentSemantic.Assign)] | ||
| SCNLightProbeUpdateType ProbeUpdateType { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("probeExtents", ArgumentSemantic.Assign)] | ||
| Vector3 ProbeExtents { | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| get; | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| set; | ||
| } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("probeOffset", ArgumentSemantic.Assign)] | ||
| Vector3 ProbeOffset { | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| get; | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| set; | ||
| } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("parallaxCorrectionEnabled")] | ||
| bool ParallaxCorrectionEnabled { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("parallaxExtentsFactor", ArgumentSemantic.Assign)] | ||
| Vector3 ParallaxExtentsFactor { | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| get; | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| set; | ||
| } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("parallaxCenterOffset", ArgumentSemantic.Assign)] | ||
| Vector3 ParallaxCenterOffset { | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| get; | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| set; | ||
| } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [NullAllowed, Export ("probeEnvironment")] | ||
| SCNMaterialProperty ProbeEnvironment { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("areaType", ArgumentSemantic.Assign)] | ||
| SCNLightAreaType AreaType { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("areaExtents", ArgumentSemantic.Assign)] | ||
| Vector3 AreaExtents { | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| get; | ||
| [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] | ||
| set; | ||
| } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [NullAllowed, Export ("areaPolygonVertices", ArgumentSemantic.Copy)] | ||
| NSValue[] AreaPolygonVertices { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("drawsArea")] | ||
| bool DrawsArea { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("doubleSided")] | ||
| bool DoubleSided { get; set; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -1365,6 +1480,10 @@ interface SCNLightType { | |
| [TV (10, 0), Mac (10, 12), iOS (10, 0)] | ||
| [Field ("SCNLightTypeProbe")] | ||
| NSString Probe { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Field ("SCNLightTypeArea")] | ||
| NSString Area { get; } | ||
| } | ||
|
|
||
| #if MONOMAC | ||
|
|
@@ -1413,6 +1532,10 @@ interface SCNLightingModel { | |
| [TV (10, 0), Mac (10, 12), iOS (10, 0)] | ||
| [Field ("SCNLightingModelPhysicallyBased")] | ||
| NSString PhysicallyBased { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Field ("SCNLightingModelShadowOnly")] | ||
| NSString ShadowOnly { get; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -1525,6 +1648,18 @@ interface SCNMaterial : SCNAnimatable, SCNShadable, NSCopying, NSSecureCoding { | |
| SCNColorMask ColorBufferWriteMask { get; set; } | ||
|
|
||
| #endif | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("clearCoat")] | ||
| SCNMaterialProperty ClearCoat { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("clearCoatRoughness")] | ||
| SCNMaterialProperty ClearCoatRoughness { get; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("clearCoatNormal")] | ||
| SCNMaterialProperty ClearCoatNormal { get; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -1552,6 +1687,7 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { | |
|
|
||
| [Deprecated (PlatformName.iOS, 10, 0)] | ||
| [Deprecated (PlatformName.MacOSX, 10, 12)] | ||
| [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] | ||
| [NoWatch, NoTV] | ||
| [NullAllowed, Export ("borderColor", ArgumentSemantic.Retain)] | ||
| NSObject BorderColor { get; set; } | ||
|
|
@@ -1625,6 +1761,8 @@ interface SCNHitTestOptions { | |
| bool IgnoreHiddenNodes { get; set; } | ||
| SCNNode RootNode { get; set; } | ||
| SCNHitTestSearchMode SearchMode { get; set; } | ||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| bool IgnoreLightArea { get; set; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -2362,6 +2500,7 @@ interface SCNProgramDelegate { | |
| [NoTV, NoWatch] | ||
| #endif | ||
| [Availability (Deprecated = Platform.Mac_10_10, Message = "Use the SCNProgram's Opaque property instead.")] | ||
| [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] | ||
| [Export ("programIsOpaque:")] | ||
| bool IsProgramOpaque (SCNProgram program); | ||
| #endif | ||
|
|
@@ -2418,6 +2557,7 @@ interface SCNRenderer : SCNSceneRenderer, SCNTechniqueSupport { | |
| [Export ("render")] | ||
| [Deprecated (PlatformName.MacOSX, 10, 11)] | ||
| [Deprecated (PlatformName.iOS, 9, 0)] | ||
| [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] | ||
| void Render (); | ||
|
|
||
| [Mac (10,10)] | ||
|
|
@@ -2620,6 +2760,22 @@ bool WriteToUrl (NSUrl url, | |
| [Export ("sceneWithMDLAsset:")] | ||
| SCNScene FromAsset (MDLAsset asset); | ||
| #endif | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("wantsScreenSpaceReflection")] | ||
| bool WantsScreenSpaceReflection { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("screenSpaceReflectionSampleCount")] | ||
| nint ScreenSpaceReflectionSampleCount { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("screenSpaceReflectionMaximumDistance")] | ||
| nfloat ScreenSpaceReflectionMaximumDistance { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("screenSpaceReflectionStride")] | ||
| nfloat ScreenSpaceReflectionStride { get; set; } | ||
| } | ||
|
|
||
| interface ISCNSceneExportDelegate { } | ||
|
|
@@ -3082,6 +3238,27 @@ interface SCNSceneRenderer { | |
| [NullAllowed, Export ("audioListener", ArgumentSemantic.Retain)] | ||
| [DebuggerBrowsable (DebuggerBrowsableState.Never)] | ||
| SCNNode AudioListener { get; set; } | ||
|
|
||
| #if XAMCORE_4_0 | ||
| [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) | ||
| #endif | ||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("temporalAntialiasingEnabled")] | ||
| bool TemporalAntialiasingEnabled { [Bind ("isTemporalAntialiasingEnabled")] get; set; } | ||
|
|
||
| #if XAMCORE_4_0 | ||
| [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) | ||
| #endif | ||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("currentViewport")] | ||
| CGRect CurrentViewport { get; } | ||
|
|
||
| #if XAMCORE_4_0 | ||
| [Abstract] // this protocol existed before iOS 9 (or OSX 10.11) and we cannot add abstract members to it (breaking changes) | ||
| #endif | ||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("usesReverseZ")] | ||
| bool UsesReverseZ { get; set; } | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -3287,6 +3464,7 @@ interface SCNTube { | |
| [Internal] // we'll make it public if there's a need for them (beside the strong dictionary we provide) | ||
| interface SCNRenderingOptionsKeys { | ||
|
|
||
| [Unavailable (PlatformName.MacCatalyst)][Advice ("This API is not available when using UIKit on macOS.")] | ||
| [Field ("SCNPreferredRenderingAPIKey")] | ||
| NSString RenderingApiKey { get; } | ||
|
|
||
|
|
@@ -3329,12 +3507,16 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { | |
| bool AllowsCameraControl { get; set; } | ||
|
|
||
| #if MONOMAC | ||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] | ||
| [Export ("openGLContext", ArgumentSemantic.Retain)] | ||
| NSOpenGLContext OpenGLContext { get; set; } | ||
|
|
||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "OpenGL API deprecated, please use Metal instead.")] | ||
| [Export ("pixelFormat", ArgumentSemantic.Retain)] | ||
| NSOpenGLPixelFormat PixelFormat { get; set; } | ||
| #elif !WATCH | ||
| [Deprecated (PlatformName.iOS, 12, 0, message: "OpenGL API deprecated, please use Metal instead.")] | ||
| [Deprecated (PlatformName.TvOS, 12, 0, message: "OpenGL API deprecated, please use Metal instead.")] | ||
| [Export ("eaglContext", ArgumentSemantic.Retain)] | ||
| #if XAMCORE_2_0 | ||
| EAGLContext EAGLContext { get; set; } | ||
|
|
@@ -3388,6 +3570,10 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { | |
| [Watch (4,0), TV (11,0), Mac (10,13), iOS (11,0)] | ||
| [Export ("rendersContinuously")] | ||
| bool RendersContinuously { get; set; } | ||
|
|
||
| [Watch (6,0), TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [Export ("drawableResizesAsynchronously")] | ||
| bool DrawableResizesAsynchronously { get; set; } | ||
| } | ||
|
|
||
| #if XAMCORE_4_0 | ||
|
|
@@ -3894,6 +4080,13 @@ interface SCNTechnique : SCNAnimatable, NSCopying, NSSecureCoding { | |
| [iOS (9,0)][Mac (10,11)] | ||
| [Internal, Export ("setObject:forKeyedSubscript:")] | ||
| void _SetObject ([NullAllowed] NSObject obj, INSCopying key); | ||
|
|
||
| #if XAMCORE_2_0 // Metal is 64 bit only | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Everything is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True it's redundant but the PR is mergeable right now so I'm not gonna rebuild it (: |
||
| [NoWatch] | ||
| [TV (13,0), Mac (10,15), iOS (13,0)] | ||
| [NullAllowed, Export ("library", ArgumentSemantic.Strong)] | ||
| IMTLLibrary Library { get; set; } | ||
| #endif | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noob question - What does the
MarshalDirectivedo here? DoesNativePrefix = "xamarin_simd__"mean that this binding has something to do AOT compilation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MarshalDirectiveis a workaround we have to work around a calling convention limitation with P/Invokes.The problem is that certain native types (such as
Vector3) are not put in the normal registers when used as parameters to methods, instead they're passed in special SIMD registers. Unfortunately managed code (i.e. P/Invokes) doesn't know about this, so we can't call these native methods using P/Invokes because the arguments would be in the wrong registers.Our workaround is a bit involved: we generate a native wrapper method where the parameters are passed in the expected registers, and that calls the actual native function, so that the native compiler puts the arguments in the right registers. The
MarshalDirectiveattribute tells the generator that it should generate a call to the wrapper method instead of the normal P/Invoke (and that the name of the wrapper method is the name of the native function prefixed byxamarin_simd__, and the library where the wrapper method is located -__Internalmeans the executable itself).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤯 (takes it in slowly)
Thanks! 😃