Render Order

Is there a way to render a DirectFrame on top of an OnscreenImage?

it does not work:

OnscreenImage.setBin("gui-popup", 0)
DirectFrame.setBin("gui-popup", 1)

If there isn’t a way, can I create a DirectFrame that fits the window size instead of OnscreenImage?

Thanks in advance.

It depends on the specific bin how the ordering is done. Some bins order based on their distance from the camera, some based on their sort value, and others based on their state. The easiest way is to put it in another bin entirely, otherwise you’d have to look at the type of the gui-popup bin and see what you need to do for the nodes to be sorted in the right order.

Yes, you can create a DirectFrame that fits the window size. Reparent it to render2d to prevent it from being scaled by the aspect ratio.

Solved, thanks!