I have a program that draws some landscape and simulates the water flowing over it (in a cheap and easy way).
Water updates were easy to parallelize using OpenMP, so I can do ~ 50 updates per second. The problem is that even with a small amount of water, my draws per second are very low (start at 5 and drop to 2 if there is a significant amount of water).
This is not a problem with the video card, because the terrain is more complex and builds up so fast that it boost::timertells me that I get endless draws per second if I turn off the water. This may be due to the memory bandwidth (although I assume that the model remains on the card and should not be transferred every time).
What bothers me is that on every draw I call glVertex3f()about a million times (the maximum size is 450 * 600, 4 vertices each), and it runs completely sequentially because Glut won't allow me to call something in parallel .
So .. is there any way to build the list in parallel and then pass it to OpenGL right away? Or some other way to do it faster? Am I using the wrong method (besides the obvious โusing smaller verticesโ)?
source
share