I'm currently adding about 100 interactive objects to my scene. I'm using [jit.gl.sketch] with manual depth sorting to draw existing objects, so ideally I'd like to draw the 100 new objects from the sketch cmdlist in some way.
Would be nice to have the 100 objects in a [jit.gl.multiple], but the problem with this is that I need more control over each object than multiple can give me. Not only position, rotation, scale and texture, but also several parameters to the associated shader that are used for interaction states etc. So I guess multiple is out.
Currently I'm drawing them manually by banging a single [jit.gl.gridshape] 100 times and setting the other params in between. However, when I want to add this to my sketch list, I cannot set the other parameters. The alternative is to make 100 separate [jit.gl.gridshape] objects and add all of those to sketch, but I'm trying to keep memory usage to a minimum as we're already battling the 2GB limit. Does anyone know a more efficient way? Is it possible in some way to 'break' out of sketch in the middle of a cmd list?
Thanks, Bas van der Graaff