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


#ifndef	__NCACHEDGRAPHICRESOURCEFACTORY__
#define	__NCACHEDGRAPHICRESOURCEFACTORY__


		#include "core/graphic_resource_factory.h"
		#include "core/geometry.h"
		#include "core/emitter.h"
		#include "core/shader.h"
		#include "picture/pict.h"
		#include "metafile/nml_object.h"


namespace GS {
	namespace Core {

/*
	@short	Cached graphic resource factory.
	@author	Emmanuel Julien (ejulien@gsworks.fr)
*/
struct	CachedResourceFactory : public ResourceFactory
{
		SharedList <Geometry *> geometries;
		SharedList <Material *> materials;
		SharedList <Shader *> shaders;
		SharedList <ParticleModel *> particle_models;
		SharedList <Picture *> pictures;

virtual	Picture			*LoadPicture(const char *);
virtual	Geometry		*LoadGeometry(const char *);
virtual	Material		*LoadMaterial(const char *);
virtual	Shader			*LoadShader(const char *);
virtual	ParticleModel	*LoadParticleModel(const char *);

virtual	uint			GetCachedResourceCount();
virtual	uint			PurgeCache();
};

	} // Graphic
} // GS


#endif	// __NCACHEDGRAPHICRESOURCEFACTORY__
