diff --git a/binding/SkiaSharp/GRGlInterface.cs b/binding/SkiaSharp/GRGlInterface.cs index a82222267e..f49ae6ab0e 100644 --- a/binding/SkiaSharp/GRGlInterface.cs +++ b/binding/SkiaSharp/GRGlInterface.cs @@ -34,12 +34,16 @@ private static GRGlInterface CreateGl () public static GRGlInterface CreateAngle () { +#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS) // a cross-platform TFM or windows-only if (PlatformConfiguration.IsWindows) { return CreateAngle (AngleLoader.GetProc); } else { // return null on non-DirectX platforms: everything except Windows return null; } +#else + return null; +#endif } // Create* (assemble) @@ -112,6 +116,7 @@ internal static GRGlInterface GetObject (IntPtr handle) => // +#if (NETSTANDARD || NET6_0_OR_GREATER || NET40_OR_GREATER) && (!NETPLATFORM || WINDOWS) private static class AngleLoader { private static readonly IntPtr libEGL; @@ -175,6 +180,7 @@ public static IntPtr GetProc (string name) return proc; } } +#endif #if __TIZEN__ private class EvasGlLoader diff --git a/scripts/azure-templates-stages.yml b/scripts/azure-templates-stages.yml index 15841c6a79..f21fbec13b 100644 --- a/scripts/azure-templates-stages.yml +++ b/scripts/azure-templates-stages.yml @@ -481,6 +481,9 @@ stages: - name: native_winui_x86_windows - name: native_winui_x64_windows - name: native_winui_arm64_windows + - name: native_winui_angle_x86_windows + - name: native_winui_angle_x64_windows + - name: native_winui_angle_arm64_windows # Nano Server - name: native_win32_x64_nanoserver_windows # iOS diff --git a/source/SkiaSharp.Build.props b/source/SkiaSharp.Build.props index cab2f8f29d..f3714cd921 100644 --- a/source/SkiaSharp.Build.props +++ b/source/SkiaSharp.Build.props @@ -184,6 +184,10 @@ $(DefineConstants);NETSTANDARD + + $(DefineConstants);NETPLATFORM + + true