From a198d85614a35f49f543354533cc67d0095e6b67 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 15 Aug 2024 12:01:28 +0200 Subject: [PATCH 1/2] [SceneKit] Implement Xcode 16.0 beta 1-5 changes. Note: there were changes in beta 2, beta 3, beta 4 or beta 5. --- src/scenekit.cs | 48 +++++++++++++++++++ .../Documentation.KnownFailures.txt | 1 + .../MacCatalyst-SceneKit.todo | 9 ---- .../api-annotations-dotnet/iOS-SceneKit.todo | 9 ---- .../macOS-SceneKit.todo | 9 ---- .../api-annotations-dotnet/tvOS-SceneKit.todo | 9 ---- tests/xtro-sharpie/iOS-SceneKit.todo | 9 ---- tests/xtro-sharpie/macOS-SceneKit.todo | 9 ---- tests/xtro-sharpie/tvOS-SceneKit.todo | 9 ---- tests/xtro-sharpie/watchOS-SceneKit.ignore | 3 ++ tests/xtro-sharpie/watchOS-SceneKit.todo | 8 ---- 11 files changed, 52 insertions(+), 71 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-SceneKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/iOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/tvOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/iOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/macOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/tvOS-SceneKit.todo delete mode 100644 tests/xtro-sharpie/watchOS-SceneKit.todo diff --git a/src/scenekit.cs b/src/scenekit.cs index 1ac1bd65cdfe..26785d3d2736 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -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); @@ -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; } } /// @@ -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; } @@ -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 @@ -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)] + [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)] + [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 diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 154ff1611f76..8e4d4dd3e39e 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -73082,6 +73082,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 diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-SceneKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/iOS-SceneKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/iOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/iOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-SceneKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-SceneKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/tvOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/tvOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/iOS-SceneKit.todo b/tests/xtro-sharpie/iOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/iOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/macOS-SceneKit.todo b/tests/xtro-sharpie/macOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/macOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/tvOS-SceneKit.todo b/tests/xtro-sharpie/tvOS-SceneKit.todo deleted file mode 100644 index 013beb5339f6..000000000000 --- a/tests/xtro-sharpie/tvOS-SceneKit.todo +++ /dev/null @@ -1,9 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound diff --git a/tests/xtro-sharpie/watchOS-SceneKit.ignore b/tests/xtro-sharpie/watchOS-SceneKit.ignore index 9c275e156e49..7b66f095e150 100644 --- a/tests/xtro-sharpie/watchOS-SceneKit.ignore +++ b/tests/xtro-sharpie/watchOS-SceneKit.ignore @@ -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 diff --git a/tests/xtro-sharpie/watchOS-SceneKit.todo b/tests/xtro-sharpie/watchOS-SceneKit.todo deleted file mode 100644 index 2e8da3827403..000000000000 --- a/tests/xtro-sharpie/watchOS-SceneKit.todo +++ /dev/null @@ -1,8 +0,0 @@ -!missing-selector! +SCNGeometry::geometryWithSources:elements:sourceChannels: not bound -!missing-selector! +SCNGeometryElement::geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithData:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentContentsWithURL:error: not bound -!missing-selector! +SCNMaterialProperty::precomputedLightingEnvironmentDataForContents:device:error: not bound -!missing-selector! SCNGeometry::geometrySourceChannels not bound -!missing-selector! SCNGeometryElement::hasInterleavedIndicesChannels not bound -!missing-selector! SCNGeometryElement::indicesChannelCount not bound From 216e047983f501c1469cc828b7c3149a63628577 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Mon, 19 Aug 2024 13:13:24 +0200 Subject: [PATCH 2/2] Fix watchOS availability. --- src/scenekit.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scenekit.cs b/src/scenekit.cs index 26785d3d2736..f50d756d3e78 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -1869,13 +1869,13 @@ interface SCNMaterialProperty : SCNAnimatable, NSSecureCoding { SCNMaterialProperty Create (NSObject contents); [Static] - [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] + [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)] + [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);