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


#ifndef	__NRENDER_RESOURCE_FACTORY__
#define	__NRENDER_RESOURCE_FACTORY__


		#include "core/render_data.h"
		#include "core/resource_factory_event_interface.h"


namespace GS {
	namespace Render {

struct	ResourceFactory
{
		sIResourceFactoryEvent event_handler;

virtual	Geometry	*NewGeometry() = 0;
virtual	Material	*NewMaterial() = 0;
virtual	Texture		*NewTexture() = 0;
virtual	Shader		*NewShader() = 0;

virtual	Geometry	*LoadGeometry(const char *, bool bypass_cache = false, Geometry * = 0) = 0;
virtual	Material	*LoadMaterial(const char *, bool bypass_cache = false, Material * = 0) = 0;
virtual	Texture		*LoadTexture(const char *, bool bypass_cache = false, Texture * = 0) = 0;
virtual	Shader		*LoadShader(const char *, bool bypass_cache = false, Shader * = 0) = 0;

virtual	void		ListCachedResources() {}

virtual	uint		GetCachedResourceCount() { return 0; }
virtual	uint		PurgeCache() { return 0; }

		ResourceFactory() : event_handler(new IResourceFactoryEvent) {}
virtual	~ResourceFactory() {}
};

	} // Render
} // GS


#endif	// __NRENDER_RESOURCE_FACTORY__
