Z-order without z-buffer

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

hamidsang007
Just popping in
Just popping in
Posts: 4
Joined: Wed Mar 11, 2015 11:37

Z-order without z-buffer

Postby hamidsang007 » Sun Jul 12, 2015 13:39

Hi guys!
I just wanna ask about the order in depth of GUI components ! after checking all geometry buffers i found that all widgets are rendered on the plan z=0, so how u guys manage the z-order of widgets in rendering according to their hierarchy (Parent/child)? and does just the fact that in window::render() that drawSelf comes before render childen get the job done? and does children order in childrenList matters?
thank u !

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Z-order without z-buffer

Postby Ident » Sun Jul 12, 2015 16:37

CEGUI handles occlusion by draw-order. Basically this is a type of back-to-front rendering, whereas the vey back is the root, and the very front is the lowest hierarchy child, of course there is also siblings, since the elements are a part of a tree structure. I think the children order does matter, yes, but I am not sure right now without having seen the code recently. And yes it definitely matters that the window draws itself before it draws its children (otherwise it would result in front-to-back rendering and the parent could occlude the child window)

A disadvantage of this is that there is a lot of overdraw and the hardware cannot perform early-z and similar optimisations. An advantage is that we dont need depth checks and no depth buffer - albeit a small advantage. We might change this in default branch at some point, so it uses a depth buffer.
CrazyEddie: "I don't like GUIs"


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 8 guests