-
Notifications
You must be signed in to change notification settings - Fork 576
Remove unnecessary conditional defines from scenekit.cs #14503
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
54ba19d
b4f7db4
f907ab8
4252aed
c48dcfb
fa13064
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 |
|---|---|---|
|
|
@@ -65,12 +65,19 @@ | |
| using GameplayKit; | ||
| #endif | ||
|
|
||
| #if MONOMAC || WATCH || __MACCATALYST__ | ||
| using EAGLContext = System.Object; | ||
| #endif | ||
|
|
||
| #if MONOMAC | ||
| using AppKit; | ||
|
|
||
| using GLContext = global::OpenGL.CGLContext; | ||
| #else | ||
| using UIKit; | ||
| using CAOpenGLLayer = System.Object; | ||
| using NSOpenGLContext = System.Object; | ||
| using NSOpenGLPixelFormat = System.Object; | ||
|
|
||
| #if HAS_OPENGLES | ||
| using OpenGLES; | ||
|
|
@@ -1219,8 +1226,7 @@ interface SCNHitTestResult { | |
| CGPoint GetTextureCoordinatesWithMappingChannel (nint channel); | ||
| } | ||
|
|
||
| #if MONOMAC | ||
| [iOS (8,0)] | ||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] | ||
| [NoMacCatalyst] | ||
| [BaseType (typeof (CAOpenGLLayer))] | ||
|
|
@@ -1229,7 +1235,6 @@ interface SCNLayer : SCNSceneRenderer, SCNTechniqueSupport { | |
| // [Export ("scene", ArgumentSemantic.Retain)] | ||
| // SCNScene Scene { get; set; } | ||
| } | ||
| #endif | ||
|
|
||
| [Watch (3,0)] | ||
| [iOS (8,0)] | ||
|
|
@@ -1494,7 +1499,7 @@ interface SCNLightType { | |
| NSString Area { get; } | ||
| } | ||
|
|
||
| #if MONOMAC | ||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 10)] | ||
| [Static] | ||
| interface SCNLightAttribute { | ||
|
|
@@ -1519,7 +1524,6 @@ interface SCNLightAttribute { | |
| [Field ("SCNLightShadowFarClippingKey")] | ||
| NSString ShadowFarClippingKey { get; } | ||
| } | ||
| #endif | ||
|
|
||
| [Watch (3,0)] | ||
| [iOS (8,0)] | ||
|
|
@@ -1784,15 +1788,13 @@ interface SCNSceneLoadingOptions { | |
| [Export ("SCNSceneSourceLoading.OptionPreserveOriginalTopology")] | ||
| bool PreserveOriginalTopology { get; set; } | ||
|
|
||
| #if !TVOS && !WATCH | ||
| // note: generator's StrongDictionary does not support No* attributes yet | ||
|
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. This comment seems important: does the generator's StrongDictionary support No* attributes now? If not, we can't remove the #if conditions (and if it does, then you can remove the comment).
Member
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. @chamons would you happen to know this one?
Contributor
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. I would go check the generated code and see what it generates before and after your change. |
||
| [NoTV] | ||
| [NoWatch] | ||
| float ConvertUnitsToMeters { get; set; } /* 'floating value encapsulated in a NSNumber' probably a float since it's a graphics framework */ | ||
| [NoTV] | ||
| [NoWatch] | ||
| bool ConvertToYUp { get; set; } | ||
| #endif | ||
|
|
||
| [Internal, Export ("SCNSceneSourceLoading.AnimationImportPolicyKey")] | ||
| NSString _AnimationImportPolicyKey { get; set; } | ||
|
|
@@ -2498,35 +2500,28 @@ interface SCNProgram : NSCopying, NSSecureCoding { | |
| [BaseType (typeof (NSObject))] | ||
| [Model, Protocol] | ||
| interface SCNProgramDelegate { | ||
| #if MONOMAC | ||
| #if XAMCORE_3_0 | ||
|
Contributor
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. I don't believe removing XAMCORE_3_0 is a safe transformation.
Contributor
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. we already have XAMCORE_3_0, right? Since NET == XAMCORE_4_0, The if was just around a NoiOS, so it gives no harm since the method was not there.
Member
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. I removed the Any thoughts on this? @mandel-macaque @chamons
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. That's some convoluted code... in general removing XAMCORE_3_0 isn't a safe transformation, but in this particular case, the code inside the XAMCORE_3_0 condition didn't do anything, because it was also inside a |
||
|
|
||
| [Unavailable (PlatformName.iOS)] | ||
| #endif | ||
| [NoTV][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 10)] | ||
| [Export ("program:bindValueForSymbol:atLocation:programID:renderer:")] | ||
| bool BindValue (SCNProgram program, string symbol, uint /* unsigned int */ location, uint /* unsigned int */ programID, SCNRenderer renderer); | ||
|
|
||
| #if XAMCORE_3_0 | ||
| [Unavailable (PlatformName.iOS)] | ||
| #endif | ||
| [NoTV][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 10)] | ||
| [Export ("program:unbindValueForSymbol:atLocation:programID:renderer:")] | ||
| void UnbindValue (SCNProgram program, string symbol, uint /* unsigned int */ location, uint /* unsigned int */ programID, SCNRenderer renderer); | ||
| #endif | ||
|
|
||
| [Export ("program:handleError:")] | ||
| void HandleError (SCNProgram program, NSError error); | ||
|
|
||
| #if MONOMAC | ||
| #if XAMCORE_3_0 | ||
| [NoiOS] | ||
| [NoTV, NoWatch] | ||
| #endif | ||
| [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use the SCNProgram's Opaque property instead.")] | ||
| [NoMacCatalyst] | ||
| [Export ("programIsOpaque:")] | ||
| bool IsProgramOpaque (SCNProgram program); | ||
| #endif | ||
| } | ||
|
|
||
| [Watch (3,0)] | ||
|
|
@@ -3058,15 +3053,14 @@ interface SCNSceneRenderer { | |
| [Export ("context")] | ||
| IntPtr Context { get; } | ||
|
|
||
| #if MONOMAC | ||
| #if NET | ||
| [Abstract] | ||
| #endif | ||
| [NoTV][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 10)] | ||
| [NoiOS] | ||
| [Export ("currentTime")] | ||
| double CurrentTime { get; set; } | ||
| #endif | ||
|
|
||
| [Abstract] | ||
| [Export ("hitTest:options:")] | ||
|
|
@@ -3322,11 +3316,10 @@ interface SCNText { | |
| [Export ("containerFrame")] | ||
| CGRect ContainerFrame { get; set; } | ||
|
|
||
| #if MONOMAC | ||
| // removed in iOS8 beta 5 - but it was already existing in 10.8 ? | ||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Export ("textSize")] | ||
| CGSize TextSize { get; } | ||
| #endif | ||
|
|
||
| [Export ("truncationMode", ArgumentSemantic.Copy)] | ||
| string TruncationMode { get; set; } | ||
|
|
@@ -3489,31 +3482,31 @@ interface SCNView : SCNSceneRenderer, SCNTechniqueSupport { | |
| // [Export ("scene", ArgumentSemantic.Retain)] | ||
| // SCNScene Scene { get; set; } | ||
|
|
||
| #if MONOMAC | ||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Export ("backgroundColor", ArgumentSemantic.Copy)] | ||
| NSColor BackgroundColor { get; set; } | ||
| #endif | ||
|
|
||
| [Export ("allowsCameraControl")] | ||
| bool AllowsCameraControl { get; set; } | ||
|
|
||
| #if MONOMAC | ||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] | ||
| [Export ("openGLContext", ArgumentSemantic.Retain)] | ||
| [NullAllowed] | ||
| NSOpenGLContext OpenGLContext { get; set; } | ||
|
|
||
| [NoiOS][NoTV][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.MacOSX, 10, 14, message: "Please use Metal instead of OpenGL API.")] | ||
| [Export ("pixelFormat", ArgumentSemantic.Retain)] | ||
| [NullAllowed] | ||
| NSOpenGLPixelFormat PixelFormat { get; set; } | ||
| #elif !WATCH && !__MACCATALYST__ | ||
|
|
||
| [NoMac][NoWatch][NoMacCatalyst] | ||
| [Deprecated (PlatformName.iOS, 12, 0, message: "Please use Metal instead of OpenGL API.")] | ||
| [Deprecated (PlatformName.TvOS, 12, 0, message: "Please use Metal instead of OpenGL API.")] | ||
| [Export ("eaglContext", ArgumentSemantic.Retain)] | ||
| [NullAllowed] | ||
| EAGLContext EAGLContext { get; set; } | ||
| #endif | ||
|
|
||
| #if !WATCH | ||
| [iOS (9,0)][Mac (10,11)] | ||
|
|
||
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.
What was that IOS attr doing there?!?!