I have an application which deals with up to “5 millian vertices” models. I used Immediate Mode to render the model but the rendering is slow whenever I change the viewpoint (i.e. rotate, translate & scale the object).
I can not use Display List because I need to edit (ex: select/cut part of the model, i.e. changing the number of vertices) the model within the application. Then I have the choice of Vertex Array or VBO (Vertex Buffer Object, preferrable than Vertex Array), in which I may change the contents of index for the array (even though I am not 100% sure that will work, but as my understanding it should? ).
However both Vertex Array & VBO have the limit of “GL_MAX_ELEMENTS_VERTICES / INDICES”
that for my video card, GL_MAX_ELEMENTS_VERTICES = GL_MAX_ELEMENTS_INDICES = 1048576, so for a 5 millian vertices model the performance will suffer …
Does anyone have experiences writing application to deal with such a large amount of vertices and meanwhile need to change the contents of the model ?? What kind of rendering technique should I use ??
However both Vertex Array & VBO have the limit of “GL_MAX_ELEMENTS_VERTICES / INDICES”
No, they do not. That limit is for using glDrawRangeElements. This function is for faster drawing, but with restrictions (like staying within those limits). glDrawElements has no limits.
I am rendering about 20+ million points/vertices in real-time. I don’t have any problems with limits as such. As long as the memory is enough, it should be fine.
I have not done any real-time editing of the vertices though. Its a static model.
@Fugitive: by “rendering about 20+ million points/vertices in real-time” you meant rendering the model in “Immediate Mode” or “Display List”? Did you not have any delay whenever you change view point (rotate, translate & scaling)? Do you render only points, or triangles with colors?
I think Dorbie’s “max vertex” was referring to my “GL_MAX_ELEMENTS_VERTICES / INDICES”
Alex, I have tried all three. Using immediate mode is insansely slow, obviously.
Display lists stop working on some cards (I tried both ATI and NVidia) beyond a certain number of vertices (about 10+ million I think). My assumption is thats because Display Lists take more memory than raw vertices and the GPU was running out of memory. There was definately lag in rotation/translation, but it was still useable at 10 million or so vertices. It was interactive.
Using VBOs currently, I get completely smooth movement. One thing to note is that I was drawing points rather than triangles. Triangles/polygons are dog slow beyond a few million polygons, even on VBOs.
As for “GL_MAX_ELEMENTS_VERTICES / INDICES”, as Alfonse pointed out, thats for glDrawRangeElements only.