Difference between revisions of "Sprite:setShader"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2015.06.30<br/>
+
'''Available since:''' Gideros 2015.06.30<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
'''Class:''' [[Sprite]]<br/>
=== <translate>Description</translate> ===
+
 
<translate>Set shader for this sprite. If nil is provided, sets default shader for current object</translate>
+
=== Description ===
<source lang="lua">
+
Sets a shader for this sprite. If nil is provided, sets default shader for the current object.
Sprite:setShader(shader)
+
<syntaxhighlight lang="lua">
</source>
+
Sprite:setShader(shader,programType,programVariant,inherit)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''shader''': (Shader) <translate>shader to use for this object</translate> <br/>
+
 
 +
=== Parameters ===
 +
'''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/>
 +
'''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/>
 +
 
 +
{{Sprite}}

Latest revision as of 14:33, 13 July 2023

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