#ifndef _MUFFIN_RENDER_ENUMS_H_
#define _MUFFIN_RENDER_ENUMS_H_

#include "muffin_core/common.h"

typedef enum MufFormat_e {
    MUF_ENUM_UNKNOWN(MUF_FORMAT),
    MUF_FORMAT_R8_UINT,
    MUF_FORMAT_R8_SINT,
    MUF_FORMAT_R8_UNORM,
    MUF_FORMAT_R8_SNORM,
    
    MUF_FORMAT_R8G8_UINT,
    MUF_FORMAT_R8G8_SINT,
    MUF_FORMAT_R8G8_UNORM,
    MUF_FORMAT_R8G8_SNORM,

    MUF_FORMAT_R8G8B8_UINT,
    MUF_FORMAT_R8G8B8_SINT,
    MUF_FORMAT_R8G8B8_UNORM,
    MUF_FORMAT_R8G8B8_SNORM,

    MUF_FORMAT_R8G8B8A8_UINT,
    MUF_FORMAT_R8G8B8A8_SINT,
    MUF_FORMAT_R8G8B8A8_UNORM,
    MUF_FORMAT_R8G8B8A8_SNORM,

    MUF_FORMAT_R16_UINT,
    MUF_FORMAT_R16_SINT,
    MUF_FORMAT_R16_UNORM,
    MUF_FORMAT_R16_SNORM,

    MUF_FORMAT_R16G16_UINT,
    MUF_FORMAT_R16G16_SINT,
    MUF_FORMAT_R16G16_UNORM,
    MUF_FORMAT_R16G16_SNORM,

    MUF_FORMAT_R16G16B16_UINT,
    MUF_FORMAT_R16G16B16_SINT,
    MUF_FORMAT_R16G16B16_UNORM,
    MUF_FORMAT_R16G16B16_SNORM,

    MUF_FORMAT_R16G16B16A16_UINT,
    MUF_FORMAT_R16G16B16A16_SINT,
    MUF_FORMAT_R16G16B16A16_UNORM,
    MUF_FORMAT_R16G16B16A16_SNORM,

    MUF_FORMAT_R32_UINT,
    MUF_FORMAT_R32_SINT,
    MUF_FORMAT_R32_UNORM,
    MUF_FORMAT_R32_SNORM,
    MUF_FORMAT_R32_FLOAT,

    MUF_FORMAT_R32G32_UINT,
    MUF_FORMAT_R32G32_SINT,
    MUF_FORMAT_R32G32_FLOAT,

    MUF_FORMAT_R32G32B32_UINT,
    MUF_FORMAT_R32G32B32_SINT,
    MUF_FORMAT_R32G32B32_FLOAT,

    MUF_FORMAT_R32G32B32A32_UINT,
    MUF_FORMAT_R32G32B32A32_SINT,
    MUF_FORMAT_R32G32B32A32_FLOAT,

    MUF_FORMAT_D16_UNORM,
    MUF_FORMAT_D32_FLOAT,
    MUF_FORMAT_D24_UNORM_S8_UINT,
    MUF_FORMAT_D32_FLOAT_S8_UINT,
    MUF_ENUM_COUNT(MUF_FORMAT)
} MufFormat;

typedef enum MufColorMask_e {
    MUF_ENUM_UNKNOWN(MUF_COLOR_MASK),
    MUF_COLOR_MASK_NONE,
    MUF_COLOR_MASK_R,
    MUF_COLOR_MASK_G,
    MUF_COLOR_MASK_B,
    MUF_COLOR_MASK_A,
    MUF_COLOR_MASK_RG,
    MUF_COLOR_MASK_RB,
    MUF_COLOR_MASK_RA,
    MUF_COLOR_MASK_GB,
    MUF_COLOR_MASK_GA,
    MUF_COLOR_MASK_BA,
    MUF_COLOR_MASK_RGB,
    MUF_COLOR_MASK_GBA,
    MUF_COLOR_MASK_RGBA,
    MUF_ENUM_COUNT(MUF_COLOR_MASK)
} MufColorMask;

typedef enum MufCompareOperator_e {
    MUF_ENUM_UNKNOWN(MUF_COMPARE_OP),
    MUF_COMPARE_OP_ALWAYS,
    MUF_COMPARE_OP_NEVER,
    MUF_COMPARE_OP_LESS,
    MUF_COMPARE_OP_GREATER,
    MUF_COMPARE_OP_EQUAL,
    MUF_COMPARE_OP_NEQUAL,
    MUF_COMPARE_OP_LEQAUL,
    MUF_COMPARE_OP_GEQUAL,
    MUF_ENUM_COUNT(MUF_COMPARE_OP)
} MufCompareOperator;

typedef enum MufSampleCount_e {
    MUF_ENUM_UNKNOWN(MUF_SAMPLE_COUNT),
    MUF_SAMPLE_COUNT_1,
    MUF_SAMPLE_COUNT_2,
    MUF_SAMPLE_COUNT_4,
    MUF_SAMPLE_COUNT_8,
    MUF_SAMPLE_COUNT_16,
    MUF_ENUM_COUNT(MUF_SAMPLE_COUNT)
} MufSampleCount;

typedef enum MufFaceFlags_e {
    MUF_FACE_FLAGS_NONE         = 0x0000,
    MUF_FACE_FLAGS_FRONT        = 0x0001,
    MUF_FACE_FLAGS_BACK         = 0x0002,
    MUF_FACE_FLAGS_FRONT_BACK   = MUF_FACE_FLAGS_FRONT | MUF_FACE_FLAGS_BACK
} MufFaceFlags;

typedef enum MufStencilFaceFlags_e {
    MUF_STENCIL_FACE_FLAGS_NONE         = 0x0000,
    MUF_STENCIL_FACE_FLAGS_FRONT        = 0x0001,
    MUF_STENCIL_FACE_FLAGS_BACK         = 0x0002,
    MUF_STENCIL_FACE_FLAGS_FRONT_BACK   = MUF_STENCIL_FACE_FLAGS_FRONT | MUF_STENCIL_FACE_FLAGS_BACK
} MufStencilFaceFlags;

typedef enum MufShaderStageFlags_e {
    MUF_SHADER_STAGE_FLAGS_NONE = 0x0000,
    MUF_SHADER_STAGE_FLAGS_VERTEX = 0x0001,
    MUF_SHADER_STAGE_FLAGS_TESSELLATION = 0x0002,
    MUF_SHADER_STAGE_FLAGS_TESS_CONTROL = 0x0004,
    MUF_SHADER_STAGE_FLAGS_TESS_EVALUATION = 0x0008,
    MUF_SHADER_STAGE_FLAGS_GEOMETRY = 0x0010,
    MUF_SHADER_STAGE_FLAGS_FRAGMENT = 0x0020,

    MUF_SHADER_STAGE_FLAGS_ALL = MUF_SHADER_STAGE_FLAGS_VERTEX |
        MUF_SHADER_STAGE_FLAGS_TESSELLATION |
        MUF_SHADER_STAGE_FLAGS_TESS_CONTROL
} MufShaderStageFlags;

#endif