Exemplo n.º 1
0
/*
================
 Font::init

 Loads font data and font texture.
================
*/
bool Font::init( ID3D10Device* device, char* fontFilename, WCHAR* textureFilename)
{
	bool result;

	result = loadFontData(fontFilename);
	if (!result)
	{
		return false;
	}

	result = loadTexture(device, textureFilename);
	if (!result)
	{
		return false;
	}

	return true;
}
Exemplo n.º 2
0
bool Font::initialise(ID3D11Device* currDevice, char* texturePath, char* dataPath)
{
	if(!mFont)
	{
		mFont = new FontInfo[SYMBOL_NUMBER];
		ZeroMemory(mFont, sizeof(FontInfo) * SYMBOL_NUMBER);
	}

	if(!loadFontTexture(currDevice, texturePath))
	{
		return false;
	}
	
	if(!loadFontData(dataPath))
	{
		return false;
	}

	return true;
}