#pragma once

namespace FDK
{
	public enum class TextureStageState
	{
		ColorOperation = D3DTSS_COLOROP,
		ColorArgument1 = D3DTSS_COLORARG1,
		ColorArgument2 = D3DTSS_COLORARG2,
		AlphaOperation = D3DTSS_ALPHAOP,
		AlphaArgument1 = D3DTSS_ALPHAARG1,
		AlphaArgument2 = D3DTSS_ALPHAARG2,
		BumpEnvironmentMatrix00 = D3DTSS_BUMPENVMAT00,
		BumpEnvironmentMatrix01 = D3DTSS_BUMPENVMAT01,
		BumpEnvironmentMatrix10 = D3DTSS_BUMPENVMAT10,
		BumpEnvironmentMatrix11 = D3DTSS_BUMPENVMAT11,
		TextureCoodinateIndex = D3DTSS_TEXCOORDINDEX,
		BumpEnvironmentLuminanceScale = D3DTSS_BUMPENVLSCALE,
		BumpEnvironmentLuminanceOffset = D3DTSS_BUMPENVLOFFSET,
		TextureTransformFlags = D3DTSS_TEXTURETRANSFORMFLAGS,
		ColorArgument0 = D3DTSS_COLORARG0,
		AlphaArgument0 = D3DTSS_ALPHAARG0,
		ResultArgument = D3DTSS_RESULTARG,
		Constant = D3DTSS_CONSTANT,
		ForceDWORD = D3DTSS_FORCE_DWORD,
	};

	// 以下、SetTextureStageState() で使用される値の一部。

	public enum class TSS_TextureOperation
	{
		Disable = D3DTOP_DISABLE,
		SelectArgument1 = D3DTOP_SELECTARG1,
		SelectArgument2 = D3DTOP_SELECTARG2,
		Modulate = D3DTOP_MODULATE,
		Modulate2X = D3DTOP_MODULATE2X,
		Modulate4X = D3DTOP_MODULATE4X,
		Add = D3DTOP_ADD,
		AddSigned = D3DTOP_ADDSIGNED,
		AddSigned2X = D3DTOP_ADDSIGNED2X,
		Subtract = D3DTOP_SUBTRACT,
		AddSmooth = D3DTOP_ADDSMOOTH,
		BlendDiffuseAlpha = D3DTOP_BLENDDIFFUSEALPHA,
		BlendTextureAlpha = D3DTOP_BLENDTEXTUREALPHA,
		BlendFactorAlpha = D3DTOP_BLENDFACTORALPHA,
		BlendTextureAlphaPreModulate = D3DTOP_BLENDTEXTUREALPHAPM,
		BlendCurrentAlpha = D3DTOP_BLENDCURRENTALPHA,
		PreModulate = D3DTOP_PREMODULATE,
		ModulateAlpha_AddColor = D3DTOP_MODULATEALPHA_ADDCOLOR,
		ModulateColor_AddAplha = D3DTOP_MODULATECOLOR_ADDALPHA,
		ModulateInverseAlpha_AddColor = D3DTOP_MODULATEINVALPHA_ADDCOLOR,
		ModulateInverseColor_AddAlpha = D3DTOP_MODULATEINVCOLOR_ADDALPHA,
		BumpEnvironmentMap = D3DTOP_BUMPENVMAP,
		BumpEnvironmentMapLuminance = D3DTOP_BUMPENVMAPLUMINANCE,
		DotProduct3 = D3DTOP_DOTPRODUCT3,
		MultiplyAdd = D3DTOP_MULTIPLYADD,
		Lerp = D3DTOP_LERP,
		ForceDWORD = D3DTOP_FORCE_DWORD,
	};
	[Flags] public enum class TSS_TextureAlphaFlags
	{
		AlphaReplicate = D3DTA_ALPHAREPLICATE,
		Complement = D3DTA_COMPLEMENT,
		Constant = D3DTA_CONSTANT,
		Current = D3DTA_CURRENT,
		Diffuse = D3DTA_DIFFUSE,
		SelectMask = D3DTA_SELECTMASK,
		Specular = D3DTA_SPECULAR,
		Temp = D3DTA_TEMP,
		Texture = D3DTA_TEXTURE,
		TextureFactor = D3DTA_TFACTOR,
	};
	[Flags] public enum class TSS_TextureCoordinateIndexFlags
	{
		CameraSpaceNormal = D3DTSS_TCI_CAMERASPACENORMAL,
		CameraSpacePosition = D3DTSS_TCI_CAMERASPACEPOSITION,
		CameraSpaceReflectionVector = D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR,
		PassThru = D3DTSS_TCI_PASSTHRU,
		SphereMap = D3DTSS_TCI_SPHEREMAP,
	};
	public enum TextureTransformFlags
	{
		Disable = D3DTTFF_DISABLE,
		Count1 = D3DTTFF_COUNT1,
		Count2 = D3DTTFF_COUNT2,
		Count3 = D3DTTFF_COUNT3,
		Count4 = D3DTTFF_COUNT4,
		Projected = D3DTTFF_PROJECTED,
		ForceDWORD = D3DTTFF_FORCE_DWORD,
	};
}