Difference between revisions of "Mesh:setInstanceCount"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2019.12<br/> '''Class:''' Mesh<br/> === Description === Enables instanced rendering and sets the number of instances to draw. <so...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Enables instanced rendering and sets the number of instances to draw.
 
Enables instanced rendering and sets the number of instances to draw.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Mesh:setInstanceCount(count)
 
Mesh:setInstanceCount(count)
</source>
+
</syntaxhighlight>
  
 
The GPU will draw your mesh a number of times instead of just once. This isn’t very useful unless you make a shader that is aware of it and can change vertices positions for each instance (''please see Gideros Studio sample code'').
 
The GPU will draw your mesh a number of times instead of just once. This isn’t very useful unless you make a shader that is aware of it and can change vertices positions for each instance (''please see Gideros Studio sample code'').

Latest revision as of 14:30, 13 July 2023