Difference between revisions of "Mesh:setGenericArray"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2017.4<br/> === Description === <br /> Assigns new content to a generic additional array to be used by a shader. It accepts multiple v...")
 
Line 6: Line 6:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
= Mesh:setGenericArray(indextypemultcountdata,)
+
Mesh:setGenericArray(index,type,mult,count,data)
 
</source>
 
</source>
'''index:''' (number) The data attribute index in the corresponding shader ''''''<br/>
+
'''index''': (number) The data attribute index in the corresponding shader ''''''<br/>
'''type:''' (number) The data type, one of Shader.Dxxx constants ''''''<br/>
+
'''type''': (number) The data type, one of Shader.Dxxx constants ''''''<br/>
'''mult:''' (number) The vector dimension (1 for simple values, 2 for a vec2/float2, etc) ''''''<br/>
+
'''mult''': (number) The vector dimension (1 for simple values, 2 for a vec2/float2, etc) ''''''<br/>
'''count:''' (number) The number of elements in the array ''''''<br/>
+
'''count''': (number) The number of elements in the array ''''''<br/>
'''data:''' (any) The actual values ''''''<br/>
+
'''data''': (any) The actual values ''''''<br/>

Revision as of 10:19, 23 August 2018

Available since: Gideros 2017.4

Description


Assigns new content to a generic additional array to be used by a shader. It accepts multiple values or a Lua array.

 Mesh:setGenericArray(index,type,mult,count,data)

'index: (number) The data attribute index in the corresponding shader '
'type: (number) The data type, one of Shader.Dxxx constants '
'mult: (number) The vector dimension (1 for simple values, 2 for a vec2/float2, etc) '
'count: (number) The number of elements in the array '
'data: (any) The actual values '