//------------------------------------------------------------------------------------
// irr::video::IGPUProgrammingServices wrappers
//
// WARNING: this cannot be created manually.  it can be obtained by calling
// IVideoDriver::getGPUProgrammingServices()
//------------------------------------------------------------------------------------

extern "C" {

s32 IrrVideo_IGPUProgrammingServices_addHighLevelShaderMaterial(
	IGPUProgrammingServices* gpusrv,
	const c8 *vertexShaderProgram, 
	const c8 *vertexShaderEntryPointName,
	E_VERTEX_SHADER_TYPE vsCompileTarget, 
	const c8 *pixelShaderProgram,
	const c8 *pixelShaderEntryPointName, 
	E_PIXEL_SHADER_TYPE psCompileTarget,
	const c8* geometryShaderProgram,
	const c8* geometryShaderEntryPointName = "main",
	E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
	E_PRIMITIVE_TYPE inType = EPT_TRIANGLES,
	E_PRIMITIVE_TYPE outType = EPT_TRIANGLE_STRIP,
	u32 verticesOut = 0,	
	IShaderConstantSetCallBack *callback=0, 
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{

	if (!geometryShaderEntryPointName) geometryShaderEntryPointName="main";
	
	if (gpusrv)
		return gpusrv->addHighLevelShaderMaterial(
			vertexShaderProgram,
			vertexShaderEntryPointName,
			vsCompileTarget,
			pixelShaderProgram,
			pixelShaderEntryPointName, 
			psCompileTarget,
			geometryShaderProgram,
			geometryShaderEntryPointName,
			gsCompileTarget,
			inType,
			outType,
			verticesOut,	
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addHighLevelShaderMaterialFromFileStream(
	IGPUProgrammingServices* gpusrv,
	io::IReadFile *vertexShaderProgram,
	const c8 *vertexShaderEntryPointName=0,
	E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1,
	io::IReadFile *pixelShaderProgram=0,
	const c8 *pixelShaderEntryPointName=0,
	E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1,
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (!vertexShaderEntryPointName) vertexShaderEntryPointName="main";
	if (!pixelShaderEntryPointName) pixelShaderEntryPointName="main";

	if (gpusrv)
		return gpusrv->addHighLevelShaderMaterialFromFiles(
			vertexShaderProgram,
			vertexShaderEntryPointName,
			vsCompileTarget,
			pixelShaderProgram,
			pixelShaderEntryPointName,
			psCompileTarget,
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addHighLevelShaderMaterialFromFilesIO(
	IGPUProgrammingServices* gpusrv,
	io::IReadFile* vertexShaderProgram,
	const c8* vertexShaderEntryPointName,
	E_VERTEX_SHADER_TYPE vsCompileTarget,
	io::IReadFile* pixelShaderProgram,
	const c8* pixelShaderEntryPointName,
	E_PIXEL_SHADER_TYPE psCompileTarget,
	io::IReadFile* geometryShaderProgram,
	const c8* geometryShaderEntryPointName = "main",
	E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
	scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
	scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
	u32 verticesOut = 0,	
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (!geometryShaderEntryPointName) geometryShaderEntryPointName="main";

	if (gpusrv)
		return gpusrv->addHighLevelShaderMaterialFromFiles(
			vertexShaderProgram,
			vertexShaderEntryPointName,
			vsCompileTarget,
			pixelShaderProgram,
			pixelShaderEntryPointName,
			psCompileTarget,
			geometryShaderProgram,
			geometryShaderEntryPointName,
			gsCompileTarget,
			inType,
			outType,
			verticesOut,	
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addHighLevelShaderMaterialFromFiles(
	IGPUProgrammingServices* gpusrv,
	const c8 * vertexShaderProgramFileName,
	const c8* vertexShaderEntryPointName,
	E_VERTEX_SHADER_TYPE vsCompileTarget,
	const c8 * pixelShaderProgramFileName,
	const c8* pixelShaderEntryPointName,
	E_PIXEL_SHADER_TYPE psCompileTarget,
	const c8 * geometryShaderProgramFileName,
	const c8* geometryShaderEntryPointName = "main",
	E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
	scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
	scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
	u32 verticesOut = 0,	
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (!geometryShaderEntryPointName) geometryShaderEntryPointName="main";

	if (gpusrv)
		return gpusrv->addHighLevelShaderMaterialFromFiles(
			path(vertexShaderProgramFileName),
			vertexShaderEntryPointName,
			vsCompileTarget,
			path(pixelShaderProgramFileName),
			pixelShaderEntryPointName,
			psCompileTarget,
			path(geometryShaderProgramFileName),
			geometryShaderEntryPointName,
			gsCompileTarget,
			inType,
			outType,
			verticesOut,	
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addShaderMaterial(
	IGPUProgrammingServices* gpusrv,
	const c8 *vertexShaderProgram=0,
	const c8 *pixelShaderProgram=0,
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (gpusrv)
		return gpusrv->addShaderMaterial(
			vertexShaderProgram,
			pixelShaderProgram,
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addShaderMaterialFromFiles(
	IGPUProgrammingServices* gpusrv,
	const c8 *vertexShaderProgramFileName,
	const c8 *pixelShaderProgramFileName,
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (gpusrv)
		return gpusrv->addShaderMaterialFromFiles(
			path(vertexShaderProgramFileName),
			path(pixelShaderProgramFileName),
			callback,
			baseMaterial,
			userData);
	else return -1;
}

s32 IrrVideo_IGPUProgrammingServices_addShaderMaterialFromFileStream(
	IGPUProgrammingServices* gpusrv,
	io::IReadFile *vertexShaderProgram,
	io::IReadFile *pixelShaderProgram,
	IShaderConstantSetCallBack *callback=0,
	E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID,
	s32 userData=0)
{
	if (gpusrv)
		return gpusrv->addShaderMaterialFromFiles(
			vertexShaderProgram,
			pixelShaderProgram,
			callback,
			baseMaterial,
			userData);
	else return -1;
}

} // extern "C"

