#pragma once

#include "dllinterface.h"
#include "..\Utilities\list.h"
#include "font.h"

class DynamicVB;
class ShaderEffect;
class DeviceStateManager;

class DXFUNCTIONS_API FontManager
{
	DeviceStateManager* m_Device;
	LList<Font>			m_Fonts;

protected:
	friend Font;

	DynamicVB*			m_VB;
	ShaderEffect*		m_FX;
	LPDIRECT3DVERTEXDECLARATION9 m_VDecl; 

	void Release(Font*fnt);

public:
	FontManager(DeviceStateManager*device);
	~FontManager(void);

	void Restore(void);
	void Invalidate(void);

	Font* Create(FontParam &fntp);

	DeviceStateManager* GetDevice(void){return m_Device;}
};
