Hi, I'm working on a QT application that has several views / viewports onto a scene (different perspectives and projections). One of these needs to have a transparent QT HUD. I've spent a lot of time going over examples and archive posts, and it seems to me that the most up-to-date way to do this is to render the QT Hud onto a QGraphicsScene attached to a QGraphicsView, and to set the Viewport of the QGraphicsView to be the osg GLWidget. This is how QT supports using generic GL Widget rendering as the background of a QGraphicsView (the QT Boxes demo is a good example). However, I'm running into a couple of problems that are preventing me from fully realizing the goals of my application.
The main points that I need to hit: 1. Composite Viewer managing multiple views 2. (At least) One of the views needs to support a QGraphicsScene HUD. (1) is easy - the osgViewerQt example covers it pretty simply, and modifying that to use a QGraphicsView with the viewport set to the GL widget rather than adding the GLWidget to the layout directly worked just fine. I was able to get (2) working for a single view without too much additional difficulty. However, when I add more views to the compositeViewer after the first with the HUD, I start to get rendering errors. The console spits out "Warning: detected OpenGL error 'invalid value' at after RenderBin::draw(..)" over and over, and it appears that all of the views are rendering to the same viewport. I think it has something to do with the context not switching properly, because frame() gets called from within the QGraphicsScene's drawBackground() method. I thought to try to subclass the compositeViewer and override frame() to allow you to call it seperately for each view attached to the viewer, but that's a pretty serious undertaking and I'm not even sure it is going to address my problem. Cheers, Nick ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=61202#61202 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org