Corrupted image when the mesh gets larger.

I have a piece code that renders a mesh using VBO. It works OK but when the number of vertices is getting close to a milion a part of the image gets corrupted. This does not happen for example on NVidia 9800GT but many older videocards do show the problem. Same thing happens when I use vertex arrays instead of VBO.
I spent some time to reorganize the algorithm to split the mesh into several smaller pieces and put them into separate VBOs. But to my suprisies when I finished I still see the problem.
The vertices that come first render correctly but when the vertex count hits some threshold the mesh displas banding and some vertices are missing. Did you experience something similar ?

I am very new to OpenGL myself but this looks like vertex data not drawn always using the same orientation. The “winding” of every triangle you draw should be the same. Also if you draw using quads you have to be sure the vertex are on the same plane. Applying transformation to quads can displays the problems you seem to be having if the vertex are sligtly changed with rotation for example (floating point issues).

Like I said, I’m very new to OpenGL so that may not be your problem. Anyway, hope this can help.

I am afraid the problem is somewhere else.
Below is the corrupted part of the mesh. Since the same code runs without problem on more recent videocards I do not expect an error in the mesh creating algorithm. Is there a limit on how many vertices one can display ? I start seeing the problem when the number of vertices is close to a million. The size of the data per vertex is 48 bytes so it comes to 48 MB - still not to big to not fit into most videocards memory.

I found out about this on another forum :

glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &value);

How do you draw the vertices ? Maybe you exceed the limit of elements you can draw with one call ?

Here is the link, hope it helps :

Yes, in my original post I mentioned that I split the mesh into smaller pieces, which did not help at all.

Well, sorry I don’t know what could be the problem then. Hope someone with more experience can help. Good luck !