drawInstanced and setDrawRange

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Party member
Posts: 702
Joined: Sat Jul 22, 2017 7:43 pm

drawInstanced and setDrawRange

Post by grump »

When having one mesh for the perinstance attributes of several other meshes that get drawn with drawInstanced, is it possible to set the start index of the vertex from which the attributes will be taken? I tried setDrawRange, but drawinstanced still starts reading the attached attributes from the first vertex.

I want to use one big streamed attribute mesh that holds the render attributes for all objects in the game, to share meshes between objects and keep a low number of draw calls. The alternative, using one attribute mesh per type of mesh would work too, but seems suboptimal.
Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests