|
|
On 17 May 2011, at 22:21, Andrew Waldrum wrote:
> I am trying to create a control panel that will appear or hide on a full
> screen Fl_Gl_Window. When I attempt this my buttons work(I can press,
> select, slide things) but are visually overwritten by the openGL
> window. I have played around with reordering the updates and explicitly
> redrawing the buttons without success. I am currently working with the
> CubeView example program trying to make it's sliders appear over the
> image when moved on top of the image window.
>
> Any ideas on how to make my buttons visible?
Yup, this is a tricky one - as I summarise it, you are trying to lay "regular" fltk widgets on top of a GL window, is that right?
There's a basic problem with this, that the GL context doesn't even know the non-GL widgets are there, so can behave "badly" towards them, which is what you are seeing. Note that quite how that manifests itself can depend on what platform you are on, and how the graphics driver behaves, and, well, stuff...
So, as to a solution: Matt has (or used to have, anyway) a demo of how to render some derived widgets using GL, in the GL context - then GL knows they are there and things work a bit better.
That might work for you, too.
(Longer term, we do hope to get better integration, and leverage our new device layer to allow GL to be used as an option for all rendering, which would of course alleviate your situation - but that 'aint working yet...)
Another approach, which I did try with some success (albeit on only one platform, so I don't know how generic this is) was to render the GL scene into an offscreen buffer, and then blit that offscreen onto the display window and lay the regular widgets on top of the blitted scene. This worked (much to my surprise) but I did not persist with it, so I don't know if it is any use to you or not...
[ Direct Link to Message ] | |
|
| |