// <auto-generated>
// This file is generated by Ghost.NativeWrapperGen. Do not edit manually.
// </auto-generated>

namespace Ghost.Nvtt;

public unsafe partial struct NvttSurfaceSet : System.IDisposable
{
    /// <summary>
    /// From: <see cref="Api.nvttCreateSurfaceSet()" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public static NvttSurfaceSet* Create()
    {
        return Api.nvttCreateSurfaceSet();
    }

    /// <summary>
    /// From: <see cref="Api.nvttDestroySurfaceSet(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Dispose()
    {
        Api.nvttDestroySurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttResetSurfaceSet(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Reset()
    {
        Api.nvttResetSurfaceSet((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetTextureType(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttTextureType GetTextureType()
    {
        return Api.nvttSurfaceSetGetTextureType((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetFaceCount(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetFaceCount()
    {
        return Api.nvttSurfaceSetGetFaceCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetMipmapCount(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetMipmapCount()
    {
        return Api.nvttSurfaceSetGetMipmapCount((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetWidth(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetWidth()
    {
        return Api.nvttSurfaceSetGetWidth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetHeight(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetHeight()
    {
        return Api.nvttSurfaceSetGetHeight((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetDepth(NvttSurfaceSet*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int GetDepth()
    {
        return Api.nvttSurfaceSetGetDepth((NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this));
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetGetSurface(NvttSurfaceSet*, int, int, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttSurface* GetSurface(int faceId, int mipId, NvttBoolean expectSigned)
    {
        return Api.nvttSurfaceSetGetSurface(
            (NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            faceId,
            mipId,
            expectSigned);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetLoadDDS(NvttSurfaceSet*, sbyte*, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean LoadDDS(ReadOnlySpan<byte> fileName, NvttBoolean forcenormal)
    {
        fixed (byte* pfileName = fileName)
        {
            return Api.nvttSurfaceSetLoadDDS(
                (NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pfileName,
                forcenormal);
        }
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetLoadDDSFromMemory(NvttSurfaceSet*, void*, ulong, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean LoadDDSFromMemory(void* data, ulong sizeInBytes, NvttBoolean forcenormal)
    {
        return Api.nvttSurfaceSetLoadDDSFromMemory(
            (NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            data,
            sizeInBytes,
            forcenormal);
    }

    /// <summary>
    /// From: <see cref="Api.nvttSurfaceSetSaveImage(NvttSurfaceSet*, sbyte*, int, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean SaveImage(ReadOnlySpan<byte> fileName, int faceId, int mipId)
    {
        fixed (byte* pfileName = fileName)
        {
            return Api.nvttSurfaceSetSaveImage(
                (NvttSurfaceSet*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
                (sbyte*)pfileName,
                faceId,
                mipId);
        }
    }
}
