Difference between revisions of "Sprite:setShader"

From GiderosMobile
(remove language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Sets a shader for this sprite. If nil is provided, sets default shader for the current object.
 
Sets a shader for this sprite. If nil is provided, sets default shader for the current object.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Sprite:setShader(shader,programType,programVariant,inherit)
 
Sprite:setShader(shader,programType,programVariant,inherit)
 
</source>
 
</source>

Revision as of 15:31, 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. <syntaxhighlight lang="lua"> Sprite:setShader(shader,programType,programVariant,inherit) </source>

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