本文整理汇总了C++中CShader::getShaderFileName方法的典型用法代码示例。如果您正苦于以下问题:C++ CShader::getShaderFileName方法的具体用法?C++ CShader::getShaderFileName怎么用?C++ CShader::getShaderFileName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CShader
的用法示例。
在下文中一共展示了CShader::getShaderFileName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QERApp_LoadShadersFromDir
int WINAPI QERApp_LoadShadersFromDir (const char* path)
{
int count = 0;
// scan g_Shaders, and call QERApp_Shader_ForName for each in the given path
// this will load the texture if needed and will set it in use..
int nSize = g_Shaders.GetSize();
for (int i = 0; i < nSize; i++)
{
CShader *pShader = reinterpret_cast<CShader*>(g_Shaders.ElementAt(i));
if (strstr(pShader->getShaderFileName(), path) || strstr(pShader->getName(), path))
{
count++;
// request the shader, this will load the texture if needed and set "inuse"
//++timo FIXME: should we put an Activate member on CShader?
// this QERApp_Shader_ForName call is a kind of hack
IShader *pFoo = QERApp_Shader_ForName(pShader->getName());
#ifdef _DEBUG
// check we activated the right shader
// NOTE: if there was something else loaded, the size of g_Shaders may have changed and strange behaviours are to be expected
if (pFoo != pShader)
Sys_Printf("WARNING: unexpected pFoo != pShader in QERApp_LoadShadersFromDir\n");
#endif
}
}
return count;
}