#include"CSurface.h"
#include"CResourceNameGenerator.h"


namespace Maid
{
ReferenceCount<mstring>	CSurface::s_Cache;
unt CSurface::s_AutoCount;

CSurface::CSurface()
{

}

CSurface::~CSurface()
{
	Destroy();

}

void CSurface::Create( const SIZE2DI& size, PIXELFORMAT fmt )
{

	++s_AutoCount;
}

void CSurface::Destroy()
{
	if( m_ID.empty() ) { return ; }

	if( s_Cache.Del(m_ID) )
	{
	//	boost::shared_ptr<RenderMessage::DeleteVertex> pMess( new RenderMessage::DeleteVertex );

	//	pMess->DeleteID = m_VertexName;

	//	GlobalPointer<CGraphicCore>::Get()->PostRenderMessage( pMess );
	}

	m_ID.clear();
}

mstring CSurface::GetID()const
{
	return m_ID;
}


}

