Skip to content
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

[SceneKit] Implement Xcode 16.0 beta 1-6 changes. #21055

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/scenekit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,11 @@ interface SCNGeometry : SCNAnimatable, SCNBoundingVolume, SCNShadable, NSCopying
[Export ("geometryWithSources:elements:")]
SCNGeometry Create (SCNGeometrySource [] sources, [NullAllowed] SCNGeometryElement [] elements);

[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Static]
[Export ("geometryWithSources:elements:sourceChannels:")]
SCNGeometry Create (SCNGeometrySource [] sources, [NullAllowed] SCNGeometryElement [] elements, [NullAllowed][BindAs (typeof (int []))] NSNumber [] sourceChannels);

[Export ("geometrySourcesForSemantic:")]
SCNGeometrySource [] GetGeometrySourcesForSemantic (string semantic);

Expand Down Expand Up @@ -1019,6 +1024,11 @@ interface SCNGeometry : SCNAnimatable, SCNBoundingVolume, SCNShadable, NSCopying
[MacCatalyst (13, 1)]
[NullAllowed, Export ("tessellator", ArgumentSemantic.Retain)]
SCNGeometryTessellator Tessellator { get; set; }

[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Export ("geometrySourceChannels"), NullAllowed]
[BindAs (typeof (int []))]
NSNumber [] GeometrySourceChannels { get; }
}

/// <include file="../docs/api/SceneKit/SCNGeometrySource.xml" path="/Documentation/Docs[@DocId='T:SceneKit.SCNGeometrySource']/*" />
Expand Down Expand Up @@ -1131,6 +1141,11 @@ interface SCNGeometryElement : NSSecureCoding {
[Export ("geometryElementWithData:primitiveType:primitiveCount:bytesPerIndex:")]
SCNGeometryElement FromData ([NullAllowed] NSData data, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint bytesPerIndex);

[Watch (11, 0), TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Static]
[Export ("geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:")]
SCNGeometryElement FromData ([NullAllowed] NSData data, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint indicesChannelCount, bool interleavedIndicesChannels, nint bytesPerIndex);

[MacCatalyst (13, 1)]
[Export ("primitiveRange", ArgumentSemantic.Assign)]
NSRange PrimitiveRange { get; set; }
Expand Down Expand Up @@ -1159,6 +1174,20 @@ interface SCNGeometryElement : NSSecureCoding {
[Static]
[Export ("geometryElementWithBuffer:primitiveType:primitiveCount:bytesPerIndex:")]
SCNGeometryElement FromBuffer (IMTLBuffer buffer, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint bytesPerIndex);

[NoWatch] // marked as 11.0 but there's no Metal support on the platform
[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Static]
[Export ("geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:")]
SCNGeometryElement FromBuffer (IMTLBuffer data, SCNGeometryPrimitiveType primitiveType, nint primitiveCount, nint indicesChannelCount, bool interleavedIndicesChannels, nint bytesPerIndex);

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Export ("interleavedIndicesChannels")]
bool InterleavedIndicesChannels { [Bind ("hasInterleavedIndicesChannels")] get; }

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
[Export ("indicesChannelCount")]
nint IndicesChannelCount { get; }
}

#if !WATCH
Expand Down Expand Up @@ -1838,6 +1867,25 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding {
[MacCatalyst (13, 1)]
[Static, Export ("materialPropertyWithContents:")]
SCNMaterialProperty Create (NSObject contents);

[Static]
[TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), Watch (10, 0)]
[return: NullAllowed]
[Export ("precomputedLightingEnvironmentContentsWithURL:error:")]
NSObject GetPrecomputedLightingEnvironmentContents (NSUrl url, out NSError error);

[Static]
[TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0), Watch (10, 0)]
[return: NullAllowed]
[Export ("precomputedLightingEnvironmentContentsWithData:error:")]
NSObject GetPrecomputedLightingEnvironmentContents (NSData url, out NSError error);

[Static]
[NoWatch] // headers claim watchOS 10.0, but watchOS doesn't have Metal
[TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[return: NullAllowed]
[Export ("precomputedLightingEnvironmentDataForContents:device:error:")]
NSData GetPrecomputedLightingEnvironmentData (NSObject contents, [NullAllowed] IMTLDevice device, out NSError error);
}

#if !WATCH
Expand Down
1 change: 1 addition & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73090,6 +73090,7 @@ P:SceneKit.SCNGeometry.MinimumLanguageVersion
P:SceneKit.SCNGeometry.Program
P:SceneKit.SCNGeometry.ShaderModifiers
P:SceneKit.SCNGeometry.WeakShaderModifiers
P:SceneKit.SCNGeometryElement.InterleavedIndicesChannels
P:SceneKit.SCNGeometrySourceSemantic.BoneIndices
P:SceneKit.SCNGeometrySourceSemantic.BoneWeights
P:SceneKit.SCNGeometrySourceSemantic.Color
Expand Down

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/api-annotations-dotnet/iOS-SceneKit.todo

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/api-annotations-dotnet/macOS-SceneKit.todo

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/api-annotations-dotnet/tvOS-SceneKit.todo

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/iOS-SceneKit.todo

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/macOS-SceneKit.todo

This file was deleted.

9 changes: 0 additions & 9 deletions tests/xtro-sharpie/tvOS-SceneKit.todo

This file was deleted.

3 changes: 3 additions & 0 deletions tests/xtro-sharpie/watchOS-SceneKit.ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

## obsoleted (removed from headers) in watchOS 6
!extra-protocol-member! unexpected selector SCNSceneRenderer::context found

## A parameter comes from the Metal framework, which isn't available on watchOS.
!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound
8 changes: 0 additions & 8 deletions tests/xtro-sharpie/watchOS-SceneKit.todo

This file was deleted.