The interleaved print out of fps and "compiled..." is fine. It may be a threading issue anyway. The demo uses multi-threading in two ways. The first way is in the renderer itself. The second part is when calculating normals (which should be not related to this issue) and when filling the buffers to render. I've uploaded a new version (again...
) and a different one. The new version still uses multi-threading for the renderer but not any longer for the filler. The second one (
http://www.jpct.net/download/beta/car_nt.exe) doesn't use MT at all. Maybe one of those will work?
BTW: I was able to verify the occasional crashes on my machine. They seem to be gone with both new versions, but that's just me...
Edit: And thank you very much for your patience...
Edit 2: This really annoys me. The problem (at least the crash that i get on my machines from time to time) is somehow related to the filling. What i call "filling" here, is copying an Object3D's mesh data into java.nio.FloatBuffer...nothing too special at all. This used to happen in multiple threads on multi-core machines to speed it up. The filling itself went fine (at least without errors) but rendering the result afterwards caused a crash sometimes. The crashes got more likely the larger the FloatBuffers were. With a batch size of 50000, i got a crash for sure. With 10000, it was like a 20% chance. I've ensured that each object is compiled exactly once, i.e. not two threads are working on the same buffers. There is nothing static in the structure that holds the buffers, all buffers are filled and ready to render when starting to compile the display lists from them (which is the step that caused the crashes). So the only option left that could cause these crashes is bad data in the buffers! But i've no f***ing idea what causes this. It makes no sense at all. Four threads working on four completely different sets of data with no interaction between them...how could this cause bad data in some of them? If i wouldn't know it better (i don't, but i've the feeling that i should...), i would think that this is a problem with java.nio, not with my code.
Anyway, i've removed the multi-threaded code from this section now and it seems to work. At least i can't reproduce the crashes i got before anymore.