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

namespace Ghost.Nvtt;

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

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

    /// <summary>
    /// From: <see cref="Api.nvttSetContextCudaAcceleration(NvttContext*, NvttBoolean)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void SetCudaAcceleration(NvttBoolean enable)
    {
        Api.nvttSetContextCudaAcceleration(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            enable);
    }

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

    /// <summary>
    /// From: <see cref="Api.nvttContextOutputHeader(NvttContext*, NvttSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean OutputHeader(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextOutputHeader(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            mipmapCount,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextCompress(NvttContext*, NvttSurface*, int, int, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean Compress(NvttSurface* img, int face, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextCompress(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            face,
            mipmap,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextEstimateSize(NvttContext*, NvttSurface*, int, NvttCompressionOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int EstimateSize(NvttSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions)
    {
        return Api.nvttContextEstimateSize(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            mipmapCount,
            compressionOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextQuantize(NvttContext*, NvttSurface*, NvttCompressionOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void Quantize(NvttSurface* tex, NvttCompressionOptions* compressionOptions)
    {
        Api.nvttContextQuantize(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            tex,
            compressionOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextOutputHeaderCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean OutputHeaderCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextOutputHeaderCube(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            mipmapCount,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextCompressCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean CompressCube(NvttCubeSurface* img, int mipmap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextCompressCube(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            mipmap,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextEstimateSizeCube(NvttContext*, NvttCubeSurface*, int, NvttCompressionOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int EstimateSizeCube(NvttCubeSurface* img, int mipmapCount, NvttCompressionOptions* compressionOptions)
    {
        return Api.nvttContextEstimateSizeCube(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            img,
            mipmapCount,
            compressionOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextOutputHeaderData(NvttContext*, NvttTextureType, int, int, int, int, NvttBoolean, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean OutputHeaderData(NvttTextureType type, int w, int h, int d, int mipmapCount, NvttBoolean isNormalMap, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextOutputHeaderData(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            type,
            w,
            h,
            d,
            mipmapCount,
            isNormalMap,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextCompressData(NvttContext*, int, int, int, int, int, float*, NvttCompressionOptions*, NvttOutputOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean CompressData(int w, int h, int d, int face, int mipmap, float* rgba, NvttCompressionOptions* compressionOptions, NvttOutputOptions* outputOptions)
    {
        return Api.nvttContextCompressData(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            w,
            h,
            d,
            face,
            mipmap,
            rgba,
            compressionOptions,
            outputOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextEstimateSizeData(NvttContext*, int, int, int, int, NvttCompressionOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public int EstimateSizeData(int w, int h, int d, int mipmapCount, NvttCompressionOptions* compressionOptions)
    {
        return Api.nvttContextEstimateSizeData(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            w,
            h,
            d,
            mipmapCount,
            compressionOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextCompressBatch(NvttContext*, NvttBatchList*, NvttCompressionOptions*)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public NvttBoolean CompressBatch(NvttBatchList* lst, NvttCompressionOptions* compressionOptions)
    {
        return Api.nvttContextCompressBatch(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            lst,
            compressionOptions);
    }

    /// <summary>
    /// From: <see cref="Api.nvttContextEnableTiming(NvttContext*, NvttBoolean, int)" />
    /// </summary>
    [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]
    public void EnableTiming(NvttBoolean enable, int detailLevel)
    {
        Api.nvttContextEnableTiming(
            (NvttContext*)System.Runtime.CompilerServices.Unsafe.AsPointer(ref this),
            enable,
            detailLevel);
    }

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