#pragma once

namespace FDK
{
	public enum class RenderState
	{
		AdaptivetessW = D3DRS_ADAPTIVETESS_W,
		AdaptivetessX = D3DRS_ADAPTIVETESS_X,
		AdaptivetessY = D3DRS_ADAPTIVETESS_Y,
		AdaptivetessZ = D3DRS_ADAPTIVETESS_Z,
		AlphaBlendEnable = D3DRS_ALPHABLENDENABLE,
		AlphaFunc = D3DRS_ALPHAFUNC,
		AlphaRef = D3DRS_ALPHAREF,
		AlphaTestEnable = D3DRS_ALPHATESTENABLE,
		Ambient = D3DRS_AMBIENT,
		AmbientMaterialSource = D3DRS_AMBIENTMATERIALSOURCE,
		AntialiasedLineEnable = D3DRS_ANTIALIASEDLINEENABLE,
		BlendFactor = D3DRS_BLENDFACTOR,
		BlendOp = D3DRS_BLENDOP,
		BlendOpAlpha = D3DRS_BLENDOPALPHA,
		CCWStencilFail = D3DRS_CCW_STENCILFAIL,
		CCWStencilFunc = D3DRS_CCW_STENCILFUNC,
		CCWStencilPass = D3DRS_CCW_STENCILPASS,
		CCWStencilZFail = D3DRS_CCW_STENCILZFAIL,
		Clipping = D3DRS_CLIPPING,
		ClipPlaneEnable = D3DRS_CLIPPLANEENABLE,
		ColorVertex = D3DRS_COLORVERTEX,
		ColorWriteEnable = D3DRS_COLORWRITEENABLE,
		ColorWriteEnable1 = D3DRS_COLORWRITEENABLE1,
		ColorWriteEnable2 = D3DRS_COLORWRITEENABLE2,
		ColorWriteEnable3 = D3DRS_COLORWRITEENABLE3,
		CullMode = D3DRS_CULLMODE,
		DebugMonitorToken = D3DRS_DEBUGMONITORTOKEN,
		DepthBias = D3DRS_DEPTHBIAS,
		DestBlend = D3DRS_DESTBLEND,
		destBlendAlpha = D3DRS_DESTBLENDALPHA,
		DiffUseMaterialSource = D3DRS_DIFFUSEMATERIALSOURCE,
		DitherEnable = D3DRS_DITHERENABLE,
		EmissiveMaterialSource = D3DRS_EMISSIVEMATERIALSOURCE,
		EnalbeAdaptiveTessellation = D3DRS_ENABLEADAPTIVETESSELLATION,
		FillMode = D3DRS_FILLMODE,
		FogColor = D3DRS_FOGCOLOR,
		FogDensity = D3DRS_FOGDENSITY,
		FogEnable = D3DRS_FOGENABLE,
		FogEnd = D3DRS_FOGEND,
		FogStart = D3DRS_FOGSTART,
		FogTableMode = D3DRS_FOGTABLEMODE,
		FogVertexMode = D3DRS_FOGVERTEXMODE,
		ForceDWORD = D3DRS_FORCE_DWORD,
		IndexedVertexBlendEnable = D3DRS_INDEXEDVERTEXBLENDENABLE,
		LastPixel = D3DRS_LASTPIXEL,
		Lighting = D3DRS_LIGHTING,
		LocalViewer = D3DRS_LOCALVIEWER,
		MaxTessellationLevel = D3DRS_MAXTESSELLATIONLEVEL,
		MinTessellationLevel = D3DRS_MINTESSELLATIONLEVEL,
		MultiSampleAntialias = D3DRS_MULTISAMPLEANTIALIAS,
		MultiSampleMask = D3DRS_MULTISAMPLEMASK,
		NormalDegree = D3DRS_NORMALDEGREE,
		NormalizeNormals = D3DRS_NORMALIZENORMALS,
		PatchEdgeStyle = D3DRS_PATCHEDGESTYLE,
		PointScaleEnable = D3DRS_POINTSCALEENABLE,
		PointScaleA = D3DRS_POINTSCALE_A,
		PointScaleB = D3DRS_POINTSCALE_B,
		PointScaleC = D3DRS_POINTSCALE_C,
		PointSize = D3DRS_POINTSIZE,
		PointSizeMax = D3DRS_POINTSIZE_MAX,
		PointSizeMin = D3DRS_POINTSIZE_MIN,
		PointSpriteEnable = D3DRS_POINTSPRITEENABLE,
		PositionDegree = D3DRS_POSITIONDEGREE,
		RangeFogEnable = D3DRS_RANGEFOGENABLE,
		ScissorTestEnable = D3DRS_SCISSORTESTENABLE,
		SeparateAlphaBlendEnable = D3DRS_SEPARATEALPHABLENDENABLE,
		ShadeMode = D3DRS_SHADEMODE,
		SlopeScaleDepthBias = D3DRS_SLOPESCALEDEPTHBIAS,
		SpecularEnable = D3DRS_SPECULARENABLE,
		SpecularMaterialSource = D3DRS_SPECULARMATERIALSOURCE,
		SrcBlend = D3DRS_SRCBLEND,
		SrcBlendAlpha = D3DRS_SRCBLENDALPHA,
		SRGBWriteEnable = D3DRS_SRGBWRITEENABLE,
		StencilEnable = D3DRS_STENCILENABLE,
		StancelFail = D3DRS_STENCILFAIL,
		StencilFunc = D3DRS_STENCILFUNC,
		StencilMask = D3DRS_STENCILMASK,
		StencilPass = D3DRS_STENCILPASS,
		StencilRef = D3DRS_STENCILREF,
		StencilWriteMask = D3DRS_STENCILWRITEMASK,
		StencilZFail = D3DRS_STENCILZFAIL,
		TextureFactor = D3DRS_TEXTUREFACTOR,
		TweenFactor = D3DRS_TWEENFACTOR,
		TwoSideStencilMode = D3DRS_TWOSIDEDSTENCILMODE,
		VertexBlend = D3DRS_VERTEXBLEND,
		Wrap0 = D3DRS_WRAP0,
		Wrap1 = D3DRS_WRAP1,
		Wrap2 = D3DRS_WRAP2,
		Wrap3 = D3DRS_WRAP3,
		Wrap4 = D3DRS_WRAP4,
		Wrap5 = D3DRS_WRAP5,
		Wrap6 = D3DRS_WRAP6,
		Wrap7 = D3DRS_WRAP7,
		Wrap8 = D3DRS_WRAP8,
		Wrap9 = D3DRS_WRAP9,
		Wrap10 = D3DRS_WRAP10,
		Wrap11 = D3DRS_WRAP11,
		Wrap12 = D3DRS_WRAP12,
		Wrap13 = D3DRS_WRAP13,
		Wrap14 = D3DRS_WRAP14,
		Wrap15 = D3DRS_WRAP15,
		ZEnable = D3DRS_ZENABLE,
		ZFunc = D3DRS_ZFUNC,
		ZWriteEnable = D3DRS_ZWRITEENABLE,
	};

	// 以下、RenderState の DWORD 値で使われる特定の値。

	public enum class RS_ZBufferType {
		False = D3DZB_FALSE,
		True = D3DZB_TRUE,
		UseWBuffer = D3DZB_USEW,
		ForceDWORD = D3DZB_FORCE_DWORD,
	};
	public enum class RS_FillMode
	{
		Point = D3DFILL_POINT,
		WireFrame = D3DFILL_WIREFRAME,
		Solid = D3DFILL_SOLID,
		ForceDWORD = D3DFILL_FORCE_DWORD,
	};
	public enum class RS_ShadeMode
	{
		Flat = D3DSHADE_FLAT,
		Gouraud = D3DSHADE_GOURAUD,
		Phong = D3DSHADE_PHONG,
		ForceDWORD = D3DSHADE_FORCE_DWORD,
	};
	public enum class RS_Blend
	{
		Zero = D3DBLEND_ZERO,
		One = D3DBLEND_ONE,
		SourceColor = D3DBLEND_SRCCOLOR,
		InverseSourceColor = D3DBLEND_INVSRCCOLOR,
		SourceAlpha = D3DBLEND_SRCALPHA,
		InverseSourceAlpha = D3DBLEND_INVSRCALPHA,
		DestinationAlpha = D3DBLEND_DESTALPHA,
		InverseDestinationAlpha = D3DBLEND_INVDESTALPHA,
		DestinationColor = D3DBLEND_DESTCOLOR,
		InverseDestinationColor = D3DBLEND_INVDESTCOLOR,
		SourceAlphaSaturated = D3DBLEND_SRCALPHASAT,
		BothSourceAlpha = D3DBLEND_BOTHSRCALPHA,
		BothInverseSourceAlpha = D3DBLEND_BOTHINVSRCALPHA,
		BlendFactor = D3DBLEND_BLENDFACTOR,
		InverseBlendFactor = D3DBLEND_INVBLENDFACTOR,
		SourceColor2 = D3DBLEND_SRCCOLOR2,
		InverseSourceColor2 = D3DBLEND_INVSRCCOLOR2,
		ForceDWORD = D3DBLEND_FORCE_DWORD,
	};
	public enum class RS_Cull
	{
		None = D3DCULL_NONE,
		Clockwise = D3DCULL_CW,
		Counterclockwise = D3DCULL_CCW,
		ForceDWORD = D3DCULL_FORCE_DWORD,
	};
	public enum class RS_CmpFunc
	{
		Never = D3DCMP_NEVER,
		Less = D3DCMP_LESS,
		Equal = D3DCMP_EQUAL,
		LessEqual = D3DCMP_LESSEQUAL,
		Greater = D3DCMP_GREATER,
		NotEqual = D3DCMP_NOTEQUAL,
		GreaterEqual = D3DCMP_GREATEREQUAL,
		Always = D3DCMP_ALWAYS,
		ForeceDWORD = D3DCMP_FORCE_DWORD,
	};
	public enum class RS_FogMode
	{
		None = D3DFOG_NONE,
		Exponential = D3DFOG_EXP,
		ExponentialSquared = D3DFOG_EXP2,
		Linear = D3DFOG_LINEAR,
		ForceDWORD = D3DFOG_FORCE_DWORD,
	};
	[Flags] public enum class RS_StencilCaps 
	{
		Decrement = D3DSTENCILCAPS_DECR,
		DecrementSaturated = D3DSTENCILCAPS_DECRSAT,
		Increment = D3DSTENCILCAPS_INCR,
		IncrementStaturated = D3DSTENCILCAPS_INCRSAT,
		Invert = D3DSTENCILCAPS_INVERT,
		Keep = D3DSTENCILCAPS_KEEP,
		Replace = D3DSTENCILCAPS_REPLACE,
		TwoSided = D3DSTENCILCAPS_TWOSIDED,
		Zero = D3DSTENCILCAPS_ZERO,
	};
	public enum class RS_StencilOperation
	{
		Keep = D3DSTENCILOP_KEEP,
		Zero = D3DSTENCILOP_ZERO,
		Replace = D3DSTENCILOP_REPLACE,
		IncrementSaturate = D3DSTENCILOP_INCRSAT,
		DecrementSaturate = D3DSTENCILOP_DECRSAT,
		Invert = D3DSTENCILOP_INVERT,
		Increment = D3DSTENCILOP_INCR,
		Decrement = D3DSTENCILOP_DECR,
		ForceDWORD = D3DSTENCILOP_FORCE_DWORD,
	};
	public enum class RS_MaterialColorSource
	{
		Material = D3DMCS_MATERIAL,
		Color1 = D3DMCS_COLOR1,
		Color2 = D3DMCS_COLOR2,
		ForceDWORD = D3DMCS_FORCE_DWORD,
	};
	public enum class RS_VertexBlentFlags
	{
		Disable = D3DVBF_DISABLE,
		Weight1 = D3DVBF_1WEIGHTS,
		Weight2 = D3DVBF_2WEIGHTS,
		Weight3 = D3DVBF_3WEIGHTS,
		Tweening = D3DVBF_TWEENING,
		Weight0 = D3DVBF_0WEIGHTS,
	};
	public enum class RS_PatchEdgeStyle
	{
		Discrete = D3DPATCHEDGE_DISCRETE,
		Continuous = D3DPATCHEDGE_CONTINUOUS,
		ForceDWORD = D3DPATCHEDGE_FORCE_DWORD,
	};
	public enum class RS_DebugMonitorTokens
	{
		Enable = D3DDMT_ENABLE,
		Disable = D3DDMT_DISABLE,
		ForceDWORD = D3DDMT_FORCE_DWORD,
	};
	public enum class RS_BlendOperation
	{
		Add = D3DBLENDOP_ADD,
		Subtract = D3DBLENDOP_SUBTRACT,
		ReverseSubtract = D3DBLENDOP_REVSUBTRACT,
		Minimum = D3DBLENDOP_MIN,
		Maximum = D3DBLENDOP_MAX,
		ForceDWORD = D3DBLENDOP_FORCE_DWORD,
	};
	public enum class RS_DegreeType
	{ 
		Linear = D3DDEGREE_LINEAR,
		Quadratic = D3DDEGREE_QUADRATIC,
		Cubic = D3DDEGREE_CUBIC,
		Quintic = D3DDEGREE_QUINTIC,
		ForceDWORD = D3DCULL_FORCE_DWORD,
	};
}