On Sat, Mar 29, 2008 at 11:04 PM, Serg Kovrov <[EMAIL PROTECTED]> wrote: > > On Mar 29, 2:04 am, "Alex Holkner" <[EMAIL PROTECTED]> wrote: > > > > The texture coordinate array is enabled but not valid in these cases. > > The following is a simple fix: > > > > glDisableClientState(GL_TEXTURE_COORD_ARRAY) > > glDrawArrays(GL_POINTS, 0, len(self.__particles)) > > glEnableClientState(GL_TEXTURE_COORD_ARRAY) > > > > I tend to glPushClientAttrib, enable just the necessary arrays, draw, > > then glPopClientAttrib to avoid these kinds of problems (at the cost > > of some state switching overhead). > > Excellent pointer, Alex - thanks! This seems to be the case. > > By the way is this overhead measurable? I mean, to have hundreds of > pushes/enables/pops vs hundreds n-times enables/disables per frame?
The time to perform a single ctypes function call is measurable. I don't imagine you will measure a difference between pushing and popping vs. enabling and disabling if the required number of ctypes function calls is the same (just speculation though, I haven't experimented). 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 -~----------~----~----~----~------~----~------~--~---
