I just toyed around with a Sphere as a Geometry. When it has more than about 67000+ vertices, it gets broken somehow.
I tried several combinations of z Samples and radial Samples, and it seems to be the product of those two numbers that must be below around 66000.
I analyzed it with wireframe state and that clearly shows that the mesh is clearly defect.
On my machine I get this:
[Java]Sphere s = new Sphere(180,360,1); //okay, all there
Sphere s = new Sphere(181,360,1); //okay, all there
Sphere s = new Sphere(182,360,1); //okay, all there
Sphere s = new Sphere(183,360,1); //okay, all there
Sphere s = new Sphere(184,360,1); //broken (some triangles are missing)
Sphere s = new Sphere(284,360,1); //extremely broken (one third is missing)
That does also explain the weird shape that I get with visual debugging.
Wonder if this might be also true in general? No more than 65536 indices in any one single mesh? Or can you switch to Integer buffers (max=2Gig…4Gig) ?
This is only true for meshes that use Short index buffers. If you use regular Int index buffers then there is essentially no limit but now your index buffer takes twice the space.
Sphere rightly uses a Short index buffer because 99.999% of all Spheres will be less than 65536 points and anyone trying to do more doesn’t really want the sphere but wants something else that they should be coding themselves.