#pragma once
#include "Resource.h"
#include "VertexDesc.h"

namespace gui {

	/**
	 * Enum that specifies which language to use when generating source code for shaders.
	 */
	enum ShaderLanguage {
		STORM_NAME(shaderNone, none),
		STORM_NAME(shaderHLSL, hlsl),
		STORM_NAME(shaderGLSL, glsl),
	};

	// Get the current platform's default shader language.
	ShaderLanguage STORM_FN defaultShaderLanguage();


	/**
	 * Base class for all shaders.
	 *
	 * This is a generic interface that allows the C++ implementation to ask Storm about the
	 * characteristics of the shader.
	 */
	class Shader : public Resource3D {
		STORM_ABSTRACT_CLASS;
	public:
		// Create.
		STORM_CTOR Shader();

		// Generate source code.
		virtual Str *STORM_FN source(ShaderLanguage language) ABSTRACT;
	};


	/**
	 * Base class for vertex shaders.
	 */
	class VertexShader : public Shader {
		STORM_ABSTRACT_CLASS;
	public:
		// Create.
		STORM_CTOR VertexShader();

		// Get information about the input format.
		virtual VertexDesc *STORM_FN inputDescription() ABSTRACT;
	};


	/**
	 * Base class for pixel shaders.
	 */
	class PixelShader : public Shader {
		STORM_ABSTRACT_CLASS;
	public:
		// Create.
		STORM_CTOR PixelShader();
	};

}
