User Interface

Started by
14 comments, last by JodoKast 19 years, 11 months ago
quote:Original post by Raduprv
Well, it''s always a good idea to draw the GUI last, Z test disabled. It''s safer, because you don''t want the have parts of the GUI covered by a clif or something (by accident).


yep, but at the same time the gui is usually cheap and simple and might hide a lot of multitextured fancy shaded geometry. not to mention that drawing it last automatically wastes more fillrate. i would expect drawing in ortho mode making it easy to assure the gui is ending up with 0 in the z-buffer. using less instead of less-equal should prevent anything sticking through it.

of course clipping early would be even better for parts completely covered by the gui. yes, i know.. performance junky.

f@dzhttp://festini.device-zero.de
Advertisement
I always set up my GUI to render last incase I ever want anything alpha-blended against my rendered scene - the fillrate cost is a valid concern, but the HUD should never be too complex anyways.
If you use a scissor test, or having the game scene viewport smaller than the gui, then no fillrate/performance is wasted.
And as Sphet well said, you can get alpha blending this way as well (we actually even have most of the menus alpha blended with the scene).
How about some sample code?
Sample code for what exactly?
[edit] All you need can be found here: The red book

[edited by - Raduprv on May 18, 2004 7:37:20 PM]
quote:Original post by Sphet
I always set up my GUI to render last incase I ever want anything alpha-blended against my rendered scene


good point. i think im developing a fill rate phobia. cards can push a million triangles at 100fps, but fancy texturing and vegetation can still kill your app.

f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement