Draw 3D geometry in GUI


#1

GUIElement allows customization but only supports 2D geometry.
Our game has items as renderable scene objects. The player can pick up these items and view them in his inventory.
What is the canonical way to draw these 3D items in GUI?
Is there a way to create a separate scene and populate it with items just as the original scene?


#2

The intended approach is to use Renderable for 3D as normal, and then position GUIWidget in world space so GUI renders behind the 3D objects. Although this isn’t something I’ve yet tested, so it might not be fully functional.

An alternate approach is to render the 3D objects into a separate texture, and then just use it in GUI through GUITexture. You can use Camera & Renderable layers to filter parts of the scene that camera sees. Or you can just use low level rendering to render the objects.

There is no support for multiple scenes, but you can use layers for the same purpose. Full multi-scene support is on my agenda and should be added in fairly near future.