On Mon, Feb 9, 2009 at 1:18 PM, Red15 <[email protected]> wrote: > > Might be a bit out of place here but I was wondering when you are > compiling a displaylist does the amount of calls to glVertex3f (or > other data) have an impact on the time it takes to execute that > display list afterwards ? > > And if so would using glDrawArray make a significant reduction in that > time ?
This is basically an alternative opinion to Tristam's -- I haven't measured the performance difference. It's my understanding that whether you use vertex arrays or immediate mode (glVertex3f, etc) should make no difference once the display list is compiled (of course, it will take longer to specify the vertex data while compiling the display list, but we usually don't care about load times much). > > I'm having an issue where calling a displaylist (containing about 70 > faces) a 100 times is dropping my framerate in the low 20's on a > GeForce 9800X2 .... Cpu usage is also a measly 40-50% so it shouldn't > be bottlenecking the processor and since I'm using glCallList it > shouldn't send all the vertex data over the pipeline each frame > right ? You should use NVProf or a similar tool to discover if data is being sent over the bus. In this case though, I'm pretty sure that even if it is, that's not the performance bottleneck. Calling glCallList 100 times is actually a moderate amount of work for pyglet, especially if you're also calling various transform functions as well -- the Python ctypes function call overhead is not insignificant. A very quick way to check this is to run python with the -O option. When you do this pyglet will not call glGetError after every GL call, which should at least double your running time -- if it does, you know that the function call overhead is the bottleneck, and you should look into reducing the number of them; if not, it may well be some other problem. 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 -~----------~----~----~----~------~----~------~--~---
