Difference between revisions of "Shader:setConstant"

From GiderosMobile
Line 10: Line 10:
  
 
=== <translate>Parameters</translate> ===
 
=== <translate>Parameters</translate> ===
'''uniform name''': (string) <translate>The uniform name to change</translate> <br/>
+
'''uniformName''': (string) <translate>The uniform name to change</translate> <br/>
'''data type''': (int) <translate>The type if data to set (one of the Shader.Cxxx constants)</translate> <br/>
+
'''dataType''': (int) <translate>The type if data to set (one of the Shader.Cxxx constants)</translate> <br/>
 
'''mult''': (number) <translate>number of elements of the given type to set</translate> <br/>
 
'''mult''': (number) <translate>number of elements of the given type to set</translate> <br/>
 
'''data''': (varies) <translate>And the actual data to set, either as a table or as multiple arguments</translate> <br/>
 
'''data''': (varies) <translate>And the actual data to set, either as a table or as multiple arguments</translate> <br/>
  
 
{{Shader}}
 
{{Shader}}

Revision as of 05:25, 31 December 2020


Available since: Gideros 2015.06.30
Class: Shader

Description

To change the value of a uniform from lua

 Shader:setConstant(uniformName,dataType,mult,data)

Parameters

uniformName: (string) The uniform name to change
dataType: (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