On 8/23/08, stampson <[EMAIL PROTECTED]> wrote: > > > How hard would it be for a group in a batch to have a visibility > toggle? Or would it be better to simply have multiple batches?
There are a couple of OpenGL tricks you could use in Group.set_state to effectively make a group invisible (for example, setting a 0-size scissor region, or translating everything out of the view frustum). This still has the performance overhead of sending the geometry to the GPU. It would be possible to modify Batch to check a visibility flag on each group before drawing, but this obviously adds a performance overhead for every group draw (if you're interested in doing this, you'll need to modify the lambda function within Batch._update_draw_list). Alternatively you could modify _update_draw_list to omit invisible groups, and rebuild the draw list whenever visibility changes (you would have to manually trigger this). Whether this is feasible or not depends on how often groups are changing visibility. 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 -~----------~----~----~----~------~----~------~--~---
