#ifndef swShader_Stream_hpp
#define swShader_Stream_hpp

#include "Lockable.hpp"

namespace swShader
{
	class VS_2_0Assembler;

	class Stream : public Lockable
	{
		friend VS_2_0Assembler;

	public:
		enum Type
		{
			TYPE_INVALID,

			TYPE_FLOAT1,
			TYPE_FLOAT2,   // Stored as float4
			TYPE_FLOAT3,   // Stored as float4
			TYPE_FLOAT4,
			TYPE_UBYTE4,
			TYPE_COLOR   // Color<byte>
		};

		enum Usage
		{
			USAGE_INVALID,

			USAGE_POSITION,
			USAGE_BLENDWEIGHT,
			USAGE_BLENDINDICES,
			USAGE_NORMAL,
			USAGE_PSIZE,
			USAGE_TEXCOORD,
			USAGE_TANGENT,
			USAGE_BINORMAL,
			USAGE_TESSFACTOR,
			USAGE_POSITIONT,
			USAGE_COLOR,
			USAGE_FOG,
			USAGE_DEPTH,
			USAGE_SAMPLE
		};

		Stream();
		Stream(Type type, Usage usage, const void *buffer);

		~Stream();

		Type getType() const;
		Usage getUsage() const;
		const void *getBuffer();
		void setBuffer(const void *buffer);

	private:
		Type type;
		Usage usage;
		const void *buffer;
	};
}

#endif   // swShader_Stream_hpp
