Difference between revisions of "Shader:setConstant"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2015.06.30<br/> === Description === To change the value of a uniform from lua <source lang="lua"> = Shader:setConstant(uniform namedat...")
 
Line 4: Line 4:
 
To change the value of a uniform from lua
 
To change the value of a uniform from lua
 
<source lang="lua">
 
<source lang="lua">
= Shader:setConstant(uniform namedata typemultdata,)
+
Shader:setConstant(uniform name,data type,mult,data)
 
</source>
 
</source>
'''uniform name:''' (string) The uniform name to change ''''''<br/>
+
'''uniform name''': (string) The uniform name to change ''''''<br/>
'''data type:''' (int) The type if data to set (one of the Shader.Cxxx constants) ''''''<br/>
+
'''data type''': (int) The type if data to set (one of the Shader.Cxxx constants) ''''''<br/>
'''mult:''' (number) number of elements of the given type to set ''''''<br/>
+
'''mult''': (number) number of elements of the given type to set ''''''<br/>
'''data:''' (varies) And the actual data to set, either as a table or as multiple arguments ''''''<br/>
+
'''data''': (varies) And the actual data to set, either as a table or as multiple arguments ''''''<br/>

Revision as of 11:21, 23 August 2018

Available since: Gideros 2015.06.30

Description

To change the value of a uniform from lua

 Shader:setConstant(uniform name,data type,mult,data)

'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 '