On 8/31/2011 8:02 AM, Kevin DeMott wrote:
I'm trying to create a 4x1 (row x col) grid on top of my scene. The rows should
equally fill up the height of the window while the column width should be 1/4
the width of the window. The intent is to have the user be able to specify a
color for each cell. Not all cells may be specified at a given time. Cells with
a specified color should be on top of the scene. IE the scene is not visible in
those locations.
I have tried to create this using an osgWidget::Table. However, it appears you
have to create widgets for all the cells in order to ensure that cell ends up
in the correction location in the grid overlay. Is there perhaps a way to
specify a widget that is transparent in order for the scene to be shown?
I also tried to use an osgWidget::Canvas. This allowed me to place widgets in
the correct cells. However, if had cell 1 and cell 3 defined with separate
colors then cell 2 would be colored white even though there was no widget
defined there. I'm assuming this is a property of the window/window manager.
However, I can't seem to figure out how to make this transparent either.
Any help or ideas on how to achieve this would be greatly appreciated.
Is there a reason why you have to use osgWidget for this? It sounds like it is
the source of your problems, as it was probably not designed for your usage.
It should be pretty straightforward to use a Camera configured for 2D rendering
(post render, clear z buffer only, etc).
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org