Yes maybe it is a bit long on one card a faster on another, you can’t do the comparison…
then, it would be faster if you were not specifying material at each vertex.
You should group all primitives that have the same material and call glMaterial once per promitive.
Then, even if this is still long, display lists compilation is not expected to be done each frame… If you have dynamic objects use vbo instead.
You have test it on 2 differents graphic cards, 2 different drivers, ATI and nvidia ones. How could you expect to see the same performances!?
Although, compiling display list as nothing to do with GPU, this is just a precomputation to avoid useless driver calls nothing more.
Can you explain us why are you making such a big deal with a such insignificant thing? :eek:
If you only need diffuse, use glColor and glColorMaterial. The material properties AFAIK are not per-vertex attributes, I don’t know how the driver get’s around this problem, but it is not really important in this case. Nvidia drivers are known to perform better DL optimization then ATI ones, maybe this explains the performance difference.
Thanks to you all guys, I understand all your point of view.
The point is that a customer is trying to give back a new NVIDIA based DELL machine because it is slower to compile DL than their very old ATI based one.
They asked us why we optimize our code for ATI only and wanted to be sure to have done all the best for both graphic card drivers.
I don’t know any tutorials but you find one soon if you google. VBOs are basically server-side vertex arrays. They were introduces several years ago, went into the core in GL 1.5 (if I remember corectly) and are suported on any reasonably new hardware.