Difference between revisions of "Sprite:setShaderConstant"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''<translate>Available since</translate>:''' Gideros 2017.4<br/> | '''<translate>Available since</translate>:''' Gideros 2017.4<br/> | ||
+ | '''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/> | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate>To change the value of a uniform from lua</translate> | <translate>To change the value of a uniform from lua</translate> |
Revision as of 09:28, 24 August 2018
Available since: Gideros 2017.4
Class: Sprite
Description
To change the value of a uniform from lua
Sprite:setShaderConstant(uniform name,data type,mult,data)
Parameters
uniform name: (string) The uniform name to change
data type: (int) The type if data to set (one of the Shader.Cxxx constants)
mult: (number) number of elements of the given type to set
data: (varies) And the actual data to set, either as a table or as multiple arguments