View Full Version : Display Lists and DrawElements performance
I made a comparison of different display methods. I have about 400.000 vertices and QUADS. The elements are grouped depending on a defined property. These groups get different colors. I display the elements with :
A:drawElements, one array for all the indices
B http://www.opengl.org/discussion_boards/ubb/redface.gifne Display List within all the indices and only one color for all the elements.
C:a Display List for each color groupe
The get the best performance with method B, but i can only assign one color. Therefore i created method C: But method C is equal ore slower then A. I get only 6fps in wireframe mode on a Athlon 900 and GeForce 4600. How can i maximize my performance without beeing platform dependent? Should i split up my vertex array, or what??
06-24-2002, 12:06 AM
Depends on the vendor.... http://www.opengl.org/discussion_boards/ubb/smile.gif
Try running some tests at initialisation - you know, try all those methods over a period of 1 second each, and select the method that comes up fastest on the host 3d card.
I am developing using linux and WINXP. I can not test the HP or SGI plattfrom, because i do not have one now. So, do you think that the method i use is dependent on the plattform?
06-24-2002, 12:17 AM
You mean platform literally?
I thought you were confusing terms - I thought you meant platform as in 3dcard.
As for platform as in operating system, then you can use the various 3dcard specific extensions on whichever operating system you wish.
I also want to be independent of 3d Hardware. SO, i do not want to use extensions, which are from NV, or some one else. What do you think about the three methods ore other?? Are there better ones. 6fps is slow!
First, I'm going to assume that 400.000 is four-hundred-thousand, I know some countries use the period seperator.
Anyway, 4hk verts in one array might be killing the cache on your card... perhaps, as you say, splitting the array into more chunks might provide better performace - try chunks of 20-50k or something.
Also, you might try using triangle strips as a primitive rather than quads, although they are brought down internally by the driver (I think) to triangles, strips would allow to specify less vertices on the whole.
I'll see if I can think of anything else.
06-24-2002, 03:38 AM
I found quad strips to be faster than triangle strips - although they are more limited in what you can do with them.
I only have to split up the array of element indices, but not the array of vertex data. Is this right, or should i split my vertex array?
06-24-2002, 05:40 AM
Have you tried seeing what values are reported with a call to
and seen if your numbers fall within those ranges. If I'm not mistaken (please correct me if I'm wrong), I believe those two are supposed to give some idea as to how big of a data set the implementation will support reguarding vertex arrays.
Yes i did. It is 4096. But does it mean that i have to create about 100 arrays holding the vertices and the same for the elements? Then i have to create a call drawelements for each of these arrays. Is this correct??
06-24-2002, 06:02 AM
I think you may have to, 4 hundred thousand verts seems like a lot of data to be trying to process in one big chunk. I would just comment out some of the code you have now and try splitting it up into the smaller, bite sited pieces and see if your performance goes up. If it doesn't, or worse yet, goes down, you can just delete what you put in and uncomment your old code. Do keep in mind though that the GL_MAX_ELEMENTS_VERTICES and GL_MAX_ELEMENTS_INDICES are part of the GL1.2 spec (glDrawRangeElements(***)). If I read the spec properly, glDrawRangeElements is a modified version of glDrawElements that actually calls glDrawElements (once again, feel free to correct me if my assumtion is wrong), and the MAX_ELEMENTS_**** should hold true even when using the vanilla glDrawElements.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.