diff --git a/src/OpenGL/CGLContext.cs b/src/OpenGL/CGLContext.cs index 0a0c229da499..828188082c4b 100644 --- a/src/OpenGL/CGLContext.cs +++ b/src/OpenGL/CGLContext.cs @@ -30,9 +30,17 @@ using ObjCRuntime; using Foundation; +using System.Runtime.Versioning; namespace OpenGL { - [Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")] +#if !NET + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' Framework instead.")] +#else + [UnsupportedOSPlatform ("macos10.14")] +#if MONOMAC + [Obsolete ("Starting with macos10.14 Use 'Metal' Framework instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif +#endif public class CGLContext : INativeObject, IDisposable { IntPtr handle; diff --git a/src/OpenGL/CGLEnums.cs b/src/OpenGL/CGLEnums.cs index 21fca472e521..b240ad8a2237 100644 --- a/src/OpenGL/CGLEnums.cs +++ b/src/OpenGL/CGLEnums.cs @@ -22,10 +22,18 @@ // using System; using ObjCRuntime; +using System.Runtime.Versioning; namespace OpenGL { - [Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")] +#if !NET + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' Framework instead.")] +#else + [UnsupportedOSPlatform ("macos10.14")] +#if MONOMAC + [Obsolete ("Starting with macos10.14 Use 'Metal' Framework instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif +#endif public enum CGLErrorCode : uint { NoError = 0, /* no error */ @@ -50,7 +58,14 @@ public enum CGLErrorCode : uint } - [Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")] +#if !NET + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' Framework instead.")] +#else + [UnsupportedOSPlatform ("macos10.14")] +#if MONOMAC + [Obsolete ("Starting with macos10.14 Use 'Metal' Framework instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif +#endif public enum CGLPixelFormatAttribute : uint { AllRenderers = 1, diff --git a/src/OpenGL/CGLPixelFormat.cs b/src/OpenGL/CGLPixelFormat.cs index 8c6ecca7f7fb..1263c7cdc287 100644 --- a/src/OpenGL/CGLPixelFormat.cs +++ b/src/OpenGL/CGLPixelFormat.cs @@ -30,9 +30,17 @@ using System.Collections.Generic; using ObjCRuntime; using Foundation; +using System.Runtime.Versioning; namespace OpenGL { - [Deprecated (PlatformName.MacOSX, 10, 14, message : "Use 'Metal' Framework instead.")] +#if !NET + [Deprecated (PlatformName.MacOSX, 10, 14, message: "Use 'Metal' Framework instead.")] +#else + [UnsupportedOSPlatform ("macos10.14")] +#if MONOMAC + [Obsolete ("Starting with macos10.14 Use 'Metal' Framework instead.", DiagnosticId = "BI1234", UrlFormat = "https://github.com/xamarin/xamarin-macios/wiki/Obsolete")] +#endif +#endif public class CGLPixelFormat : INativeObject, IDisposable { internal IntPtr handle;