On Mon, Feb 9, 2009 at 3:16 AM, Martin O'Leary <[email protected]> wrote: > > Is there any way, using the Pyglet vertex lists/batches/groups > framework, to support "instancing" of vertex data? I'm talking about > the situation where I have a collection of geometry which I want to > render repeatedly, with different transformations, e.g. a 3d model. At > the moment, it seems that if I want multiple copies of the same > geometry, I need to create multiple identical vertex lists, which > seems rather wasteful, or to make multiple render calls, changing > parameters on the group each time, thereby complicating the rendering > process.
The easiest way is to keep each model in its own batch, then render each batch separately with the different transformation. > Am I missing something? It seems that ideally, there would be a way to > put the same geometry in a batch multiple times, using different > groups. You could add multiple groups to the batch that reference the same vertex data, but there's no interface exposed to do this. The end result will be the same, except that pyglet will be making the multiple draw calls instead of you. Alex. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
