#ifndef CRenderMessageImpl1_h
#define CRenderMessageImpl1_h

#include"../../Setup/CompileMode.h"
#include"CRenderMessage.h"
#include"Core/Driver/CVideoCardDriver.h"

#include"Color.h"

//	このヘッダには補助的なメッセージを定義する

namespace Maid
{
	namespace RenderMessage
	{
		class ClearColor : public Base
		{
		public:
			ClearColor() : Base(RENDERTARGET_CLEAR_COLOR){}

			COLOR_R08G08B08I	Color;	//	塗りつぶし色
		};

		class ClearZ : public Base
		{
		public:
			ClearZ() : Base(RENDERTARGET_CLEAR_Z){}

			float	val;	//	塗りつぶし色
		};

		class ResetRenderTarget : public Base
		{
		public:
			ResetRenderTarget() : Base(RESETRENDERTARGET){}

			enum TARGET
			{
				TARGET_COLOR,		//	リセット先は　カラーバッファ
				TARGET_DEPTHSTENCIL,//	リセットは　深度バッファ
			};

			TARGET	Target;
		};

		class SetRenderTarget : public Base
		{
		public:
			SetRenderTarget() : Base(SETRENDERTARGET){}

			enum TYPE
			{
				TYPE_SURFACE,	//	設定元はサーフェス
				TYPE_TEXTURE,	//	設定元はテクスチャ
			};

			enum TARGET
			{
				TARGET_COLOR,		//	設定先は　カラーバッファ
				TARGET_DEPTHSTENCIL,//	設定先は　深度バッファ
			};

			mstring	ID;

			TYPE	Type;
			TARGET	Target;
		};

		class SetTexture : public Base
		{
		public:
			SetTexture() : Base(SETTEXTURE){}

			mstring	ID;
			int		Stage;
		};

		class UnsetTexture : public Base
		{
		public:
			UnsetTexture() : Base(UNSETTEXTURE){}

			int		Stage;
		};

		class SetVertex : public Base
		{
		public:
			SetVertex() : Base(SETVERTEX){}

			mstring	ID;
			int pos;
		};

		class SetIndex : public Base
		{
		public:
			SetIndex() : Base(SETINDEX){}

			mstring	ID;
		};

		class SetVertexShader : public Base
		{
		public:
			SetVertexShader() : Base(SETVERTEXSHADER){}

			mstring	ID;
		};

		class SetVertexShaderConstF : public Base
		{
		public:
			SetVertexShaderConstF() : Base(SETVERTEXSHADER_CONSTF){}
			int pos;
			VECTOR4DF vec;
		};

		class SetVertexDeclaration : public Base
		{
		public:
			SetVertexDeclaration() : Base(SETVERTEXDECLARATION){}

			mstring	ID;
		};

		class SetPixelShader : public Base
		{
		public:
			SetPixelShader() : Base(SETPIXELSHADER){}

			mstring	ID;
		};





		class SetViewPort : public Base
		{
		public:
			SetViewPort() : Base(SETVIEWPORT){}

			RECT2DI Screen;
			float	MinZ;
			float	MaxZ;
		};

		class SetRenderState : public Base
		{
		public:
			SetRenderState() : Base(SETRENDERSTATE){}

			IVideoCardDriver::RENDERSTATE state;
			unt	Value;
		};

		class SetSamplerState : public Base
		{
		public:
			SetSamplerState() : Base(SETSAMPLERSTATE){}

			int	Stage;
			IVideoCardDriver::SAMPLERSTATE State;
			unt	Value;
		};


		class CopySurface : public Base
		{
		public:
			CopySurface() : Base(COPYSURFACE){}

			mstring ID;
		};

		class GetVideoInfo : public Base
		{
		public:
			GetVideoInfo() : Base(GETVIDEOINFO){}
		};
	}

}


#endif
