I have a program that pulls some terrain and water flows on it (a cheap and easy way is). >
Updating water was like using OpenMP, so I can update ~ 50 per second. The problem is that even with a small amount of water, my draw per second is very low (starts from 5 and droplets of about 2 are once a significant amount of water).
This is not a problem video card because the area is more complex and ready so fast that boost :: timer
tells me if I turn off the water I get a draw every second. It may be related to memory bandwidth (since I believe the model stays on the card and is not transferred every time).
Why do I worry that on every draw, I have about one million times (maximum size 450 * 600, each 4 in the corner) about 'mL calling
So .. is it that there is a way to make the list parallel and then to pass OpenGL one at a time? Or is it some other way to draw it faster? Am I using the wrong method (except for the obvious "use less bees")?
Your approach to drawing is in contrast to what you really should do in parallel. Graphics hardware is naturally parallel and there is not much use in trying to call as much as possible in a short time. It is important to create huge calls which send data to hardware where parallel processing can occur. All your glVertex ()
calls are exactly the opposite.
As George pointed out: glVertexPointer ()
with glDrawElements ()
or glDrawArrays ()
a good for your position If they are not enough, then you should take steps for the vertical buffer object. One has to calculate in the GPU with the direct shaders. In all those ways, you get free charity in the GPU.
Comments
Post a Comment