implementing a ui

Started by
3 comments, last by AbsentMinded 20 years, 7 months ago
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?
Advertisement
Use transformed polys. No perspective switching and very little overhead.

Mark
Cornutopia Games
http://www.cornutopia.net
Bytten Independent Games Magazine
http://www.bytten.com
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.

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...
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

This topic is closed to new replies.

Advertisement