Just a heads up. I am trying to port an engine that was using a prerelase OgreNext version 2.1 to OgreNext 3.0.
I have a font.fontdef that is using the type image (not "truetype"), and this no longer looks supported.
In OgreFontManager I see:
Code: Select all
StringUtil::toLowerCase( params[1] );
if( params[1] == "truetype" )
{
pFont->setType( FT_TRUETYPE );
}
else
{
pFont->setType( FT_IMAGE );
}
but in OgreFont.cpp
Code: Select all
if (mType == FT_TRUETYPE)
{
createTextureFromFont();
texLayer = mMaterial->getTechnique(0)->getPass(0)->getTextureUnitState(0);
// Always blend by alpha
blendByAlpha = true;
}
else
{
// Manually load since we need to load to get alpha
mTexture = TextureManager::getSingleton().load(mSource, mGroup, TEX_TYPE_2D, 0);
blendByAlpha = mTexture->hasAlpha();
texLayer = mMaterial->getTechnique(0)->getPass(0)->createTextureUnitState(mSource);
}
the else part is missing in 3.0. mTexture is only created when creating texture from ttf. At first glance I thought OgreFont stayed the same as in 2.1 but it looks like I was wrong.
So just a heads up: fonts using images as source are no longer supported.