I have put this in the beginner section although I don't consider myself a beginner at CG, but I do have some gaps in knowledge with OpenGL so please forgive if I am doing something stupid... and thanks for reading this through.
I realize that from this general description people cannot immediately put their finger on the problem... What I am hoping for is that someone can point out something that I may be missing. I think I have tried everything, so obviously there is something I have not considered..
I have a vertex array of about 1,000,000 points which in a GLUT Sandbox I have created works perfectly.. It uses quite a complex set of threading, load balancing, and multiple display lists to get this dynamic field of stars to draw very very quickly, and update on a per case basis.
The threading, load balancing, and even point update sections can be turned off and it will revert to simply a set of display lists which will just blat the points from a vertex array into our viewing context.
When I put this into a main loop in my main simulation on the first pass through the loop the points draw perfectly. On subsequent passes through the loop the geometry seems to be off, and I get strange patters of points, often in spherical arrangements, and sometimes nothing at all... This is affected by my viewpoint position and orientation.
So in order I started looking for matrix, attribute, and even shader settings which I may have left on from a previous part of the main loop. I then sequentially commented everything out of the main loop apart from the points plotting. Grrr! No change.
I have no OpenGL errors, and no stack errors, and have even tried drawing these points with a newly created view and model-view matrix which overrides any matrix settings when we enter the point code.
I have tried setting, re-setting and also protecting state variables and so on.. and also checking what Client States I have enabled, and re-disabling anything which might conflict. but nothing seems to solve this problem.
I have read the OpenGL list of common pitfalls about 20 times, and keep thumbing my Red Book looking for what simple thing I must be missing...
It's totally ironic that I have shader driven water and such like coming out of my ears in this sim, and yet on a simple glDrawArrays() I am falling down!
Anyone point me in the direction of something else to research.. After 2 days looking at this on and off I am now considering reworking my entire main app... which seems stupid for such a trivial problem..
Thanks for any help.