Hi,
I’m making a UI using OpenGL (buttons, sliders, menus etc all made with colored lines and polygons) There is a large number of these gadgets to draw. As I see it the two options for drawing this UI is to turn off ztest and draw back to front, or turn on ztest and draw front to back with depth values (a layer value basically) for each gadget. I’m wondering if you guys think the performance increase I’ll get from using the ztest and front to back rendering will be worth the extra costs associated with the ztesting and z writting?
Bear in mind that front-to-back-depth-tested won’t work if you have any alpha-blending in your UI.
I’m by no means in favour of the current “theme” stampede to make every window translucent and thereby near-impossible to read, but there are lots of subtle little effects that you might not want to rule out. Antialiased edges on circular radio buttons. Drop-shadows to help identify the focus window. Stuff like that.