Difference between revisions of "Sprite:setShader"

From GiderosMobile
Line 6: Line 6:
 
<translate>Set shader for this sprite. If nil is provided, sets default shader for current object</translate>
 
<translate>Set shader for this sprite. If nil is provided, sets default shader for current object</translate>
 
<source lang="lua">
 
<source lang="lua">
  Sprite:setShader(shader)
+
  Sprite:setShader(shader,programType,programVariant,inherit)
 
</source>
 
</source>
 +
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
 
'''shader''': (Shader) <translate>shader to use for this object</translate> <br/>
 
'''shader''': (Shader) <translate>shader to use for this object</translate> <br/>

Revision as of 13:49, 7 January 2021


Available since: Gideros 2015.06.30
Class: Sprite

Description

Set shader for this sprite. If nil is provided, sets default shader for 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