Archived

This topic is now archived and is closed to further replies.

AbsentMinded

implementing a ui

Recommended Posts

AbsentMinded    122
I was just wanting get some opinions on something... What is the best way to render the UI(inventory, msg windows, etc...) of a game? In the past I just switched to ortho mode when rendering the ui, but I was wondering if it would be better to stay in perspective and just draw the interface items to always face the camera(billboard it?) what do you guys think?

Share this post


Link to post
Share on other sites
dopeflow    124
Whats so bad about switching perspective??

I think its really nice in opengl to be able to render your game in 3d then switch to orthogonal to render the gui. Makes it really easy since you specify all forms in screen coordinates.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
Technically, it is faster to use transformed polys [ no need to switch ], however if you have to calc the points every frame then you should use ortho. Ortho coordinates are mapped directly to the screen...

Share this post


Link to post
Share on other sites
marijnh    182
I recommend going to orthogonal mode, if your UI has any kind of complexity it is much more convenient to be able to specity it''s coordinates in 2d and not bother with transformations. If you push the pespective projectionmatrix before going to ortho mode and then pop it back the overhead will not be significant.

Marijn

Share this post


Link to post
Share on other sites