forked from amkovkov/GranuSightSoftware2
15 lines
462 B
C#
15 lines
462 B
C#
// Основан на примере GpuInterop Avalonia
|
|
// https://github.com/AvaloniaUI/Avalonia/blob/5f3dbae22244e830b464fc680c6c28ca124be41a/samples/GpuInterop/VulkanDemo/VulkanExtensions.cs
|
|
|
|
using Silk.NET.Vulkan;
|
|
|
|
namespace GSS2.Vulkan;
|
|
|
|
public static class VulkanExtensions
|
|
{
|
|
public static void ThrowOnError(this Result result)
|
|
{
|
|
if (result != Result.Success)
|
|
throw new Exception($"Unexpected API error \"{result}\"");
|
|
}
|
|
} |