mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
Update Slang, Vulkan, Gltf and ImGui. Offload natives to sub-packages.
Public-PR: https://github.com/ahwootech/BRUTAL/pull/9 Public-PR: https://github.com/ahwootech/BRUTAL/pull/15 Public-PR: https://github.com/ahwootech/BRUTAL/pull/21 Fixes: ahwootech/BRUTAL#8 Fixes: ahwootech/BRUTAL#22 Co-authored-by: Laurens de Voogd <laurens@devoogd.be> Co-authored-by: sGo7-Dev <goulax16@gmail.com> Co-authored-by: Capsup <capsup@live.dk>
This commit is contained in:
parent
a25cdf80b2
commit
4ac91e105e
1 changed files with 2034 additions and 318 deletions
27
Brutal.Gltf/GltfApi/GltfJsonContext.cs
Normal file
27
Brutal.Gltf/GltfApi/GltfJsonContext.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Brutal.GltfApi;
|
||||
|
||||
/// <summary>
|
||||
/// Source-generated System.Text.Json metadata for the glTF schema, so that loading and saving
|
||||
/// works without reflection (trimming and Native AOT).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The generator emits the other half of this class (<c>GeneratedSchema/GltfJsonContext.gen.cs</c>) with every
|
||||
/// <see cref="JsonSerializableAttribute"/>: the document root, every extension root type, the nested enums and
|
||||
/// <see cref="JsonElement"/>. Don't add <see cref="JsonSerializableAttribute"/> here; the System.Text.Json source
|
||||
/// generator fails when more than one partial declaration carries it.
|
||||
/// </remarks>
|
||||
[JsonSourceGenerationOptions(
|
||||
// glTF has no concept of an explicit JSON null; absent optional properties must be
|
||||
// omitted entirely or strict validators reject the asset (e.g. "uri": null in GLB).
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
|
||||
Converters = [
|
||||
typeof(JsonHelpers.Float3JsonConverter),
|
||||
typeof(JsonHelpers.Float4JsonConverter),
|
||||
typeof(JsonHelpers.FloatQuatJsonConverter),
|
||||
typeof(JsonHelpers.Float4X4JsonConverter),
|
||||
]
|
||||
)]
|
||||
internal partial class GltfJsonContext : JsonSerializerContext;
|
||||
Loading…
Reference in a new issue