How to efficiently render different things at different times in a game?

Posted by Baqjohanson on Stack Overflow See other posts from Stack Overflow or by Baqjohanson
Published on 2010-05-21T03:38:17Z Indexed on 2010/05/21 3:40 UTC
Read the original article Hit count: 121

Filed under:
|

Sorry for the ambiguous title. What I am wondering is what is an efficient way to alternate rendering between lets say a main menu, options menu, and "in the game."

The only two ways I've come up with so far are to have 1 render function, with code for each part (menu, ...) and a variable to control what gets drawn, or to have multiple render functions, and use a function pointer to point to the appropriate one, and then just call the function pointer.

I always wonder how more professional games do it.

© Stack Overflow or respective owner

Related posts about c++

Related posts about game