Sprite:setShader: Difference between revisions

From GiderosMobile
remove language stuff
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''Available since:''' Gideros 2015.06.30<br/>
'''<translate>Available since</translate>:''' Gideros 2015.06.30<br/>
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
=== Description ===
<translate>Set shader for this sprite. If nil is provided, sets default shader for current object</translate>
Sets a shader for this sprite. If nil is provided, sets default shader for the current object.
<source lang="lua">
<source lang="lua">
Sprite:setShader(shader,programType,programVariant,inherit)
Sprite:setShader(shader,programType,programVariant,inherit)
</source>
</source>


=== <translate>Parameters</translate> ===
=== Parameters ===
'''shader''': (Shader) <translate>shader to use for this object</translate> <br/>
'''shader''': (Shader) shader to use for this object<br/>
'''programType''': (int) The type of program this shader should replace. Use nil for any. '''optional''' <br/>
'''programType''': (int) the type of program this shader should replace. Use nil for any '''optional'''<br/>
'''programVariant''': (int) The variant of program this shader should replace. '''optional''' <br/>
'''programVariant''': (int) the variant of program this shader should replace '''optional'''<br/>
'''inherit''': (boolean) This shader should be used for sub-sprite too. '''optional''' <br/>
'''inherit''': (boolean) this shader should be used for sub-sprite too '''optional'''<br/>
 
{{Sprite}}
{{Sprite}}

Revision as of 21:22, 2 February 2021

Available since: Gideros 2015.06.30
Class: Sprite

Description

Sets a shader for this sprite. If nil is provided, sets default shader for the current object.

Sprite:setShader(shader,programType,programVariant,inherit)

Parameters

shader: (Shader) shader to use for this object
programType: (int) the type of program this shader should replace. Use nil for any optional
programVariant: (int) the variant of program this shader should replace optional
inherit: (boolean) this shader should be used for sub-sprite too optional