EngineRemoveShaderFromWorldTexture: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool engineRemoveShaderFromWorldTexture ( element shader, string textureName )
bool engineRemoveShaderFromWorldTexture ( element shader, string textureName [, element targetElement ] )
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''shader:''' The shader which is to be removed
*'''shader:''' The shader which is to be removed
*'''textureName:''' The name of the world texture to remove the shader from. It should be exactly the same string as used with [[engineApplyShaderToWorldTexture]] when the shader was initially applied
*'''textureName:''' The name of the world texture to remove the shader from. It should be exactly the same string as used with [[engineApplyShaderToWorldTexture]] when the shader was initially applied.
 
===Optional Arguments===
{{New feature/item|4.0140|1.3.0|4140|
*'''targetElement:''' The element to remove the shader from. It should be the same element as used with [[engineApplyShaderToWorldTexture]] when the shader was initially applied.
}}


===Returns===
===Returns===
Line 20: Line 25:
engineRemoveShaderFromWorldTexture ( myShader, "des_logwall" )
engineRemoveShaderFromWorldTexture ( myShader, "des_logwall" )
</syntaxhighlight>
</syntaxhighlight>
==Changelog==
{{ChangelogHeader}}
{{ChangelogItem|1.3.0-9.04140|Added targetElement argument}}


==See Also==
==See Also==
{{Engine_functions}}
{{Engine_functions}}
{{Drawing_functions}}
{{Drawing_functions}}

Revision as of 16:25, 24 May 2012

This function removes a shader from one or more world textures.

Syntax

bool engineRemoveShaderFromWorldTexture ( element shader, string textureName [, element targetElement ] )

Required Arguments

  • shader: The shader which is to be removed
  • textureName: The name of the world texture to remove the shader from. It should be exactly the same string as used with engineApplyShaderToWorldTexture when the shader was initially applied.

Optional Arguments

ADDED/UPDATED IN VERSION 1.3.0 r4140:
  • targetElement: The element to remove the shader from. It should be the same element as used with engineApplyShaderToWorldTexture when the shader was initially applied.

Returns

Returns true if the shader was successfully removed, false otherwise.

Example

This example will remove a previously created shader from the "des_logwall" world texture

engineRemoveShaderFromWorldTexture ( myShader, "des_logwall" )

Changelog

Version Description
1.3.0-9.04140 Added targetElement argument

See Also