//********************************************************************
// This source file is part of Ninfa3D Engine
// 
// Copyright (C) 2008-2009 Jose David Paje. All rights reserved.
// 
// LIMITED WARRANTY
// This software is provided "as-is", without any express or implied warranty.
// In no event shall the author be held liable for any damages arising from the use of this software.
// This is a contract. By accepting the Ninfa3D Engine (the SOFTWARE), 
// you (either an individual or a single entity, the LICENSEE) accept the terms and conditions of this licensing agreement.
// 
// If the LICENSEE does not accept the terms and conditions, then LICENSEE must not accept the SOFTWARE.
// If at a later time the LICENSEE decides not to continue licensing the SOFTWARE under these terms and 
// conditions, then the LICENSEE must delete permanently all files constituting the SOFTWARE.
//
//
// LICENSE AGREEMENT
// Ninfa3D Engine Limited grants to the LICENSEE and the LICENSEE hereby accepts a perpetual 
// nontransferable and nonexclusive license to use and distribute the SOFTWARE, for any purpose. 
// In addition, the following conditions apply:
//
// 1) The LICENSEE may not use the SOFTWARE to reverse engineer the computer algorithm used by the SOFTWARE.
// 2) The origin of the SOFTWARE must not be misrepresented; If the LICENSEE uses the SOFTWARE to distribute 
//    a product, the LICENSEE must not claim that He or She wrote the original SOFTWARE.
// 3) The LICENSEE agrees to credit the use of the Ninfa3D Engine in any program information, 
//    including credit screens, "About" dialogs, program notes or instructions and shrink-wrapped packaging.
// 4) The LICENSEE may not redistribute the SOFTWARE, except as part of a compiled software program that is 
//    not itself a physics library.
// 5) The LICENSEE agrees to notify www.mysticrealitystudio.comuv.com of any products, commercial, shareware or free 
//    that incorporate the Ninfa3D Engine technology.
//
// File: Shaders.cpp
//********************************************************************

/*--------------------------------------------------------------------
Includos*/

	#include "..\..\..\Header Files\Ninfa3D.h"
	#include "..\..\..\Codes\CRefractionSceneNode.h"

/*--------------------------------------------------------------------
Variables externas*/

	extern IrrlichtDevice* device;
	extern IVideoDriver* driver;
	extern ISceneManager* SceneManager;

/*--------------------------------------------------------------------
Variables globales*/

	CRefractionSceneNode* Refraction = NULL;

/*--------------------------------------------------------------------
Declaracion global de funciones*/

extern "C"
{

	/*================================================================
	Carga los archivos de efectos graficos*/

	DLL_EXPORT void DLL_APIENTRY ApplyRefraction(ISceneNode* Entity)
	{
		if(!Refraction)
			Refraction = new CRefractionSceneNode();

		Refraction->addEntity(Entity);
	}

	/*================================================================
	Carga los archivos de efectos graficos*/

	DLL_EXPORT void DLL_APIENTRY RenderRefraction()
	{
		Refraction->Render();
	}

}