NextGen GUI system idea

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

NextGen GUI system idea

Post by devsh »

Essentially give a Z-layer parameter to each GUI element and use that to enforce rendering.

This combines nicely with deferring draws (amassing a command buffer/list) and eliminating draw call.

Irrlicht's GUI draws more in "immediate mode" right now.

Dig in!
https://github.com/buildaworldnet/Irrli ... -3D-Engine
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: NextGen GUI system idea

Post by Mel »

Is it really worth to add a ZBuffer to the whole GUI thing? The reason for the GUI to be in "immediate mode" is to ensure the rendering order of the elements and to avoid any aditional overhead that otherwise could be sorted out by enforcing a strict rendering order. Also Transparency doesn't get along with ZBuffered rendering, so i think it is better an immediate approach.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Re: NextGen GUI system idea

Post by devsh »

ZBuffer is optional, only there to prevent overdraw, only pixels with 100% would draw to it.

Sometimes your animation or gui logic code for maintainability reasons will need to be traversed in an order vastly different to rendering order.

Also with vulkan, etc. You need to create a command buffer anyway.

But more importantly opengl 3.2 core onwards demands the use of a VAO so immediate mode is out of question, so you better pack all gui in one mesh with same material.
Not to mention the cost of switching descriptor sets (text is es, vaos, etc.) if you draw immediate without packed textures.
Post Reply