OpenGL's matrix stack vs Hand multiplying

Posted by deft_code on Game Development See other posts from Game Development or by deft_code
Published on 2011-01-13T06:04:20Z Indexed on 2011/01/13 6:58 UTC
Read the original article Hit count: 608

Filed under:
|
|
|

Which is more efficient using OpenGL's transformation stack or applying the transformations by hand.

I've often heard that you should minimize the number of state transitions in your graphics pipeline. Pushing and popping translation matrices seem like a big change. However, I wonder if the graphics card might be able to more than make up for pipeline hiccup by using its parallel execution hardware to bulk multiply the vertices.

My specific case. I have font rendered to a sprite sheet. The coordinates of each character or a string are calculated and added to a vertex buffer. Now I need to move that string. Would it be better to iterate through the vertex buffer and adjust each of the vertices by hand or temporarily push a new translation matrix?

© Game Development or respective owner

Related posts about opengl

Related posts about optimization