View Full Version : how to do HUD?
12-19-2002, 08:51 PM
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.
12-20-2002, 07:45 AM
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 menez.thomas.free.fr : There is an example of the 2nd solution.
12-20-2002, 10:25 AM
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).
12-20-2002, 11:07 PM
Thanks for your kind reply.
Martin, please tell me more about what you called Overlay Plane. What's it and how to do it?
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.