forked from Misaki/GhostEngine
Major overhaul of native wrapper generation for ufbx and nvtt. Replaces all hand-written and class-based wrappers with auto-generated partial struct wrappers that directly expose native API methods via pointers. Introduces a new JSON-driven configuration system using "remaps" and "actions" for flexible parameter/return mapping and method routing. Removes legacy config sections and helper classes, focusing solely on method wrappers. Updates all usages and tests to use the new pointer-based API. Cleans up obsolete code and ensures resource management is handled via struct Dispose methods. The result is a thinner, more direct, and maintainable interop layer. BREAKING CHANGE: All managed wrapper classes and helpers are removed in favor of struct-based pointer wrappers. API usage and resource management patterns have changed.
23 lines
997 B
C#
23 lines
997 B
C#
using System.Diagnostics;
|
|
|
|
namespace Ghost.MeshOptimizer
|
|
{
|
|
/// <summary>Defines the annotation found in a native declaration.</summary>
|
|
[AttributeUsage(AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
|
|
[Conditional("DEBUG")]
|
|
internal sealed partial class NativeAnnotationAttribute : Attribute
|
|
{
|
|
private readonly string _annotation;
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="NativeAnnotationAttribute" /> class.</summary>
|
|
/// <param name="annotation">The annotation that was used in the native declaration.</param>
|
|
public NativeAnnotationAttribute(string annotation)
|
|
{
|
|
_annotation = annotation;
|
|
}
|
|
|
|
/// <summary>Gets the annotation that was used in the native declaration.</summary>
|
|
public string Annotation => _annotation;
|
|
}
|
|
}
|