/* -----------------------------------------------------------------------------
	nEngine - GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */


#ifndef	__GPU_SHADER_COMPILER__
#define	__GPU_SHADER_COMPILER__


		#include "gpu/gpu_shader_object.h"


namespace GS {
	class String;

	namespace Core { struct Shader; }
	namespace GPU {
		struct Shader;
		class Renderer;

/*!
	@short	GPU shader compiler interface.
	@author	Emmanuel Julien (ejulien@owloh.com)
*/
class	IShaderCompiler
{
protected:

		Renderer	&renderer;

virtual	bool		Link(const Core::Shader &, Shader &) = 0;
virtual	bool		CompileObject(const char *source, ShaderObject &, ShaderObject::Type, const char *source_name, String *error_log) = 0;

public:

virtual	bool		Compile(const Core::Shader &, Shader &, const char *binary_cache_id = 0);

		IShaderCompiler(Renderer &r) : renderer(r) {}
virtual	~IShaderCompiler() {}
};

	} // GPU
} // GS


#endif	// __GPU_SHADER_COMPILER__
