mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-29 06:28:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
25
Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs
Normal file
25
Brutal.Ktx/Abstractions/KtxAstcParamsPartial.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
namespace Brutal.KtxApi;
|
||||
|
||||
public partial struct KtxAstcParams
|
||||
{
|
||||
/// <summary>
|
||||
/// Initialises the StructSize field to the correct value.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This constructor only runs when you call <c>new KtxAstcParams()</c> explicitly - it is
|
||||
/// bypassed by <c>default(KtxAstcParams)</c>, array elements (<c>new KtxAstcParams[n]</c>),
|
||||
/// and struct fields in other types, all of which leave StructSize at 0. Prefer
|
||||
/// <see cref="Create"/> when you're not immediately assigning every field via an object
|
||||
/// initializer.
|
||||
/// </remarks>
|
||||
public unsafe KtxAstcParams()
|
||||
{
|
||||
StructSize = (uint)sizeof(KtxAstcParams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a KtxAstcParams with StructSize correctly initialised. Preferred over
|
||||
/// <c>default(KtxAstcParams)</c> or array/field initialization, which leave StructSize at 0.
|
||||
/// </summary>
|
||||
public static KtxAstcParams Create() => new();
|
||||
}
|
||||
Loading…
Reference in a new issue