开发者

OpenGL skeletal animation performance

开发者 https://www.devze.com 2023-01-25 14:12 出处:网络
I\'m in a bit of a situation. You see, when rend开发者_开发技巧ering my model with my renderMesh() function, the game was at about 30fps. When rendering to a display list, and running that, the fps w

I'm in a bit of a situation.

You see, when rend开发者_开发技巧ering my model with my renderMesh() function, the game was at about 30fps. When rendering to a display list, and running that, the fps went to about 450fps. Thats a gain of 1500%. I was overjoyed by this, for it meant that OpenGL wasn't the cause of the lag, it was the function, and that can be optimized.

But now I want to render a skinned mesh, so I will need to update the vertex positions per frame, but nothing else. So it would be a waste of time running renderMesh() because the overhead of patching together all the faces, ect... is unnecessary. I want to cache this data, but display lists won't work because of the volatile vertex coords.

What would be the best solution (other than to optimize my renderMesh(), which I will be doing anyway).


I can only suggest:

  1. Using fewer vertices
  2. Moving your vertices (or most of them) in rigid groups --- that way each group can be a list
  3. Vertex Buffer Objects


You could use VBOs and get improvement. Should be same or better then lists. 1500% improvement is strange. Are you sure you measuring FPS right?

0

精彩评论

暂无评论...
验证码 换一张
取 消