Difference between revisions of "Mesh:setInstanceCount"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
Line 7: Line 7:
 
<syntaxhighlight 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 15:30, 13 July 2023