Esempio n. 1
0
// Hydra: now returns false if the ORIGINAL shader could not be activated
// (missing texture, or incorrect shader script), true otherwise
// the shader is still activated in all cases.
bool CShader::Activate(){
	Try_Activate();
	if ( !m_pTexture ) {
		m_pTexture = QERApp_Texture_ForName2( SHADER_NOTEX );
		RegisterActivate();
		return false;
	}
	return true;
}
Esempio n. 2
0
void CShader::Activate()
{
	Try_Activate();
	if (!m_pTexture)
	{
		// use the shadernotex.jpg
		//++timo TODO: detect shadernotex.jpg not found and give an error message!
		m_pTexture = QERApp_Texture_ForName2( "textures/radiant/shadernotex" );
		RegisterActivate();
	}
}
Esempio n. 3
0
void CShader::Try_Activate()
{
	m_pTexture = QERApp_Try_Texture_ForName( m_strTextureName );
	if (m_pTexture)
		RegisterActivate();
}
Esempio n. 4
0
void CShader::Try_Activate(){
	m_pTexture = QERApp_Try_Texture_ForName( m_strTextureName.GetBuffer() );
	if ( m_pTexture ) {
		RegisterActivate();
	}
}