Core - Reworked rendering pipeline to work with different contexts

Core - Added GPU-based Vulkan rendering context
This commit is contained in:
Robert committed 2021-03-21 22:40:23 +01:00
1 parent 34b9d69ed8
commit a02431bb82
17 files changed
+489 -56

No files matched your search

+17
View File
@@ -4,6 +4,7 @@ using System.IO;
using Artemis.Core.JsonConverters;
using Artemis.Core.Services.Core;
using Newtonsoft.Json;
using SkiaSharp;
namespace Artemis.Core
{
@@ -116,5 +117,21 @@ namespace Artemis.Core
typeof(double),
typeof(decimal)
};
private static GRContext? _skiaGraphicsContext;
/// <summary>
/// Gets or sets the graphics context to be used for rendering by SkiaSharp
/// </summary>
public static GRContext? SkiaGraphicsContext
{
get => _skiaGraphicsContext;
set
{
if (_skiaGraphicsContext != null)
throw new ArtemisCoreException($"{nameof(SkiaGraphicsContext)} can only be set once.");
_skiaGraphicsContext = value;
}
}
}
}