how to do HUD?

Don’t know how GL games make their HUD (control pannel, speed metres, life bar, game menus etc.). I’ve tried to load them as textures and then map them onto quads fixed before the carema view. This approach works fine till you use too big textures. The FPS will then suffer a lot and at the end the display memory overflows.

I guess there must be some other way to do this. Anyone knows how, please help.

Thanks so much in advance.


To my mind, the best way to achieve this is to use GL_LINES primitive calls.

There are several ways to do it :

1 - Draw a sphere made of lines all around the aircraft ; draw a line every 10 degrees for example ; rotate this sphere as the heading of the aircraft evolves.

2 - Draw some lines directly on a virtual HUD. The hurdle you’re liable to face is to determinate the screen coordinates of these lines and IT IS NO EASY TASK ! Be prepared to work with quaternions and to suffer !

Have a look at : There is an example of the 2nd solution.


You might want to look into overlay planes. By using those you can save on speed (you don’t have to redraw the world if only the user interface has changed).
Good luck,


Thanks for your kind reply.

Martin, please tell me more about what you called Overlay Plane. What’s it and how to do it?

Thanks again.