Do openGL components ignore z order?


It seems when you have an opengl component(that also implements the OpenGLRenderer interface) and a sibling(say a TextButton), the openGL component always draws on top no matter if  you call  toFront(), toBack(),  or setAlwaysOnTop().

Is this a bug or is it supposed to be like this?


Yes, obviously for GL it needs use the OS to create an embedded GL surface which doesn't play nice with other components.

But if you make your top-level window the GL layer then you can mix it up (like in the juce demo app)


What about openGL components on top of openGl Components? What is the best solution ? Having 2 GL components each with their own context and GLRenderer does not seem to work.  I need to create something like this for my company . there is a main openGL component with the bunny and then a tab that opens up a component with a child openGL component with the cross object.


Having multiple GL renderers in the same context is on our to-do-list. (We're going to need it ourselves for some ROLI software)