Exemple #1
0
//++timo rename as QERApp_Texture_ForName after getting rid of the old one
qtexture_t* WINAPI QERApp_Texture_ForName2( const char *filename)
{
	qtexture_t* q;
	q = QERApp_Try_Texture_ForName(filename);
	if (q)
		return q;
	// not found? use "texture not found"
	q = QERApp_Try_Texture_ForName( "textures/radiant/notex" );
	if (q)
		return q;
	// still not found?
	return notexture;
}
Exemple #2
0
/*!
This should NEVER return NULL, it is the last-chance call in the load cascade
*/
qtexture_t *WINAPI QERApp_Texture_ForName2 (const char *filename)
{
  qtexture_t *q;
  q = QERApp_Try_Texture_ForName (filename);
  if (q)
    return q;
  // not found? use "texture not found"
  q = QERApp_Try_Texture_ForName (SHADER_NOT_FOUND);
  if (q)
    return q;

  // still not found? this is a fatal error
  g_FuncTable.m_pfnError("Failed to load " SHADER_NOT_FOUND ". Looks like your installation is broken / missing some essential elements.");
  return NULL;
}
Exemple #3
0
void CShader::Try_Activate()
{
	m_pTexture = QERApp_Try_Texture_ForName( m_strTextureName );
	if (m_pTexture)
		RegisterActivate();
}
Exemple #4
0
void CShader::Try_Activate(){
	m_pTexture = QERApp_Try_Texture_ForName( m_strTextureName.GetBuffer() );
	if ( m_pTexture ) {
		RegisterActivate();
	}
}