I assume it ran into a deadlock. Till today I didn’t know that multiple notify() calls can cause only one wait() to wake up if they happen at exactly the same time (and it happened …)
I once more changed the threading concept. I hope it now works without deadlocks. It starts 8 rendering worker threads and one program thread, and is capped at 60 FPS for those with real powerful machines. I can’t test the capping though, I don’t reach that much FPS with my hardware
I want to call this the “Turn up your fans, maximum core!” edition ;D
http://www.java-gaming.org/user-generated-content/members/132627/simpleray-r4.jar
3 mirror balls, one infinite plane and a sky sphere, give me ~30 FPS. I’m somewhat certain that I can’t achieve big speedups anymore, but I’ll see what I can do with it. It’s a nice toy for sure
@Roquen: I’ve got one volatile variable which is increased by the worker threads to count how many workers are done yet. Now that you mention it, I must say that I’m not quite sure what happens with the frame buffer, which is written to by all worker threads.
@alesky: Thanks
@ra4king: Wow, that is some gaming equipment you have there! Raytracing is a simple concept, but vector math … well you know how to use OpenGL, so I assume have already learned most it