Menu overlay with many sub-windows

I am currently working on an app (win32 console) that uses GLUT and a bunch of other libraries requiring GLUT. It has a main window containing many sub windows. It used the GLUT popup menus before but I would like to migrate to something better looking (AntTweakBar). The restriction is that each popup menu is restricted to its context(glutSubWindow) and some of the windows are quite small. I would like them to popup on top of multiple child windows. Here are the things I tried:

  • glutEstablishOverlay: seems to never have worked with win32 GLUT?

  • wglcreatelayercontext: Event google didn’t turn up much. Seems like this is old stuff requiring hardware overlays? I tried a sample from Nate Robins (SigGraph 97) and couldn’t get it to create an overlay on an NVidia Quadro4800

I am now looking for any and all advice on strategies to get something like that working.

I also thought of rendering all subwindows in fbos/textures, and compositing them on the screen with menus on top with am currently using GLUT for mouse and keyboard input on a per-window basis.

Thanks for you input!

After further research, it looks like I am really stuck with GLUT since the project uses a library that depends on it (glvu). I haven’t found any pointers on wglContext stuff and GLUT interaction so I guess this topic is now more of a GLUT thing.

The only avenue that looks feasible is the time I have for the project is to use a single GLUT Window, re-dispatch mouse/keyboard calls to “virtual” sub-windows based on screen position, draw each subwindow in an FBO and finally draw the FBO on-screen.

I wonder if it’s best to draw the menus in the fbo or on screen directly? Probably the later with AntTweakBar.