Difference between revisions of "Mesh:setGenericArray"

From GiderosMobile
(removed language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Assigns a new content to a generic additional array to be used by a shader.
 
Assigns a new content to a generic additional array to be used by a shader.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Mesh:setGenericArray(index,type,mult,count,data)
 
Mesh:setGenericArray(index,type,mult,count,data)
 
</source>
 
</source>

Revision as of 15:28, 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. <syntaxhighlight lang="lua"> Mesh:setGenericArray(index,type,mult,count,data) </source>

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