本文整理汇总了C++中CPVRTString::toLower方法的典型用法代码示例。如果您正苦于以下问题:C++ CPVRTString::toLower方法的具体用法?C++ CPVRTString::toLower怎么用?C++ CPVRTString::toLower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPVRTString
的用法示例。
在下文中一共展示了CPVRTString::toLower方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PVRTStringGetFileExtension
/*!****************************************************************************
@Function LoadTextures
@Return bool true if no error occured
@Description Loads the textures required for this training course
******************************************************************************/
bool OGLES2FilmTV::LoadTextures(CPVRTString* pErrorStr)
{
/*
Loads the textures.
For a more detailed explanation, see Texturing and IntroducingPVRTools
*/
/*
Initialises an array to lookup the textures
for each material in the scene.
*/
m_puiTextureIDs = new GLuint[m_Scene.nNumMaterial];
if(!m_puiTextureIDs)
{
*pErrorStr = "ERROR: Insufficient memory.";
return false;
}
for(unsigned int i = 0; i < m_Scene.nNumMaterial; ++i)
{
m_puiTextureIDs[i] = 0;
SPODMaterial* pMaterial = &m_Scene.pMaterial[i];
if(pMaterial->nIdxTexDiffuse != -1)
{
/*
Using the tools function PVRTTextureLoadFromPVR load the textures required by the pod file.
Note: This function only loads .pvr files. You can set the textures in 3D Studio Max to .pvr
files using the PVRTexTool plug-in for max. Alternatively, the pod material properties can be
modified in PVRShaman.
*/
CPVRTString sTextureName = m_Scene.pTexture[pMaterial->nIdxTexDiffuse].pszName;
if(sTextureName == "TV.pvr")
m_uiTVScreen = i;
if(PVRTTextureLoadFromPVR(sTextureName.c_str(), &m_puiTextureIDs[i]) != PVR_SUCCESS)
{
*pErrorStr = "ERROR: Failed to load " + sTextureName + ".";
// Check to see if we're trying to load .pvr or not
CPVRTString sFileExtension = PVRTStringGetFileExtension(sTextureName);
if(sFileExtension.toLower() != "pvr")
*pErrorStr += "Note: FilmTV can only load .pvr files.";
return false;
}
}
}
return true;
}