mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Core - Added the ability to change graphics context at runtime
Settings - Added setting for switching between software-based and Vulkan-based rendering
This commit is contained in:
1 parent
d7e302fb23
commit
f888fb5697
19 files changed
+281
-270
No files matched your search
@@ -2,9 +2,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Artemis.Core.JsonConverters;
|
||||
using Artemis.Core.Services;
|
||||
using Artemis.Core.Services.Core;
|
||||
using Artemis.Core.SkiaSharp;
|
||||
using Newtonsoft.Json;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core
|
||||
{
|
||||
@@ -118,20 +119,10 @@ namespace Artemis.Core
|
||||
typeof(decimal)
|
||||
};
|
||||
|
||||
private static GRContext? _skiaGraphicsContext;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the graphics context to be used for rendering by SkiaSharp
|
||||
/// Gets the graphics context to be used for rendering by SkiaSharp. Can be set via
|
||||
/// <see cref="IRgbService.UpdateGraphicsContext" />.
|
||||
/// </summary>
|
||||
public static GRContext? SkiaGraphicsContext
|
||||
{
|
||||
get => _skiaGraphicsContext;
|
||||
set
|
||||
{
|
||||
if (_skiaGraphicsContext != null)
|
||||
throw new ArtemisCoreException($"{nameof(SkiaGraphicsContext)} can only be set once.");
|
||||
_skiaGraphicsContext = value;
|
||||
}
|
||||
}
|
||||
public static IManagedGraphicsContext? ManagedGraphicsContext { get; internal set; }
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user