Difference between revisions of "Mesh:setGenericArray"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2017.4<br/>
'''<translate>Available since</translate>:''' Gideros 2017.4<br/>
+
'''Class:''' [[Mesh]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Mesh|Mesh]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Assigns a new content to a generic additional array to be used by a shader.
Assigns new content to a generic additional array to be used by a shader. It accepts multiple values or a Lua array.<br />
+
<syntaxhighlight lang="lua">
<br /></translate>
+
Mesh:setGenericArray(index,type,mult,count,data)
<source lang="lua">
+
</syntaxhighlight>
Mesh:setGenericArray(index,type,mult,count,data)
+
 
</source>
+
It accepts multiple values or a Lua array.
=== <translate>Parameters</translate> ===
+
 
'''index''': (number) <translate>The data attribute index in the corresponding shader</translate> <br/>
+
=== Parameters ===
'''type''': (number) <translate>The data type, one of Shader.Dxxx constants</translate> <br/>
+
'''index''': (number) the data attribute index in the corresponding shader<br/>
'''mult''': (number) <translate>The vector dimension (1 for simple values, 2 for a vec2/float2, etc)</translate> <br/>
+
'''type''': (number) the data type, one of Shader.Dxxx constants<br/>
'''count''': (number) <translate>The number of elements in the array</translate> <br/>
+
'''mult''': (number) the vector dimension (1 for simple values, 2 for a vec2/float2, etc)<br/>
'''data''': (any) <translate>The actual values</translate> <br/>
+
'''count''': (number) the number of elements in the array<br/>
 +
'''data''': (any) the actual values<br/>
 +
 
 +
{{Mesh}}

Latest revision as of 14:30, 13 July 2023

Available since: Gideros 2017.4
Class: Mesh

Description

Assigns a new content to a generic additional array to be used by a shader.

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

It accepts multiple values or a Lua array.

Parameters

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