OpenGL, Viewport, & the Z-order

I have a viewport attached to a component with a GL context with the intention of being able to scroll around the GL component if it exceeds the size of its area. Functionally it works fine, but the GL context renders on top of everything, including the scrollbars and other UI components it scrolls into the area of.

Is there any workaround for getting the GL context to go behind other components? Haven’t been able to figure anything out.

1 Like

So you can kind of do what you want…

You can’t have components in front of the openGL context, but you can have the OpenGL context render those components. The way this looks, is you’d have everything in the area on concern wrapped in a container component, and make that container component the OpenGL renderer that owns the openglContext and all the children components you want to be painted on top of your render code.

1 Like

I have a mainDisplay child component with an attached open gl context housing everything and “acting” like the highest parent.

But I don’t think you can display a peer over it.