Hi, On Tuesday 17 November 2009, Paul Martz wrote: > OK, final flip-flop: I really did encounter a NULL viewport problem. It > occurs on a single GPU dual-head Win32 configuration. The viewport comes > back NULL in this case, and the app crashes. Oddly, if I just pass in > zero for the width and height, the app works for the most part. Seems to > have some flicker in this case though. I've attached my code, which > might still require some modification in the NULL viewport case. > > The attached code also contains the compile fix for Windows math routines. Ok, I will see how I can initially get the right screen size.
So, since you appear to get the correct picture even if the initial size is (0,0), I assume that you get an osg resize event in the event visitor when the window is created? I do not get that on X11, if this is sent on Win32, we probably should also send that on X11. This would actually solve this issue, since I do only need the initial size. On a resize, the event visitor resizes the textures ... > And I also changed the clear color to white, so you might want to change > that back. I noticed the clear color is hard-coded, so I assume this is > unfinished code that you're going to modify anyway? Well, there is some room here. But the Clear color for the pre render cameras should have 0 alpha. The color does not matter. For the compositing step, the clear color is set to the osg default. > Thanks for posting this and letting me look at it, very informative. Well, this is by far not the only possible implementation. If you have a better one, I am interrested too. Things to consider is to do that in a CullCallback without the need of a static amount of cameras. Also, I would wish that osg's cameras/rendering backend would provide some hooks for such image based stuff so that we can have a camera that automatically renders into a screen sized texture and a compositing step that automatically sets up texture coordinate lookup for the screen sized stuff (texture rectangle, nearest interpolation, etc ...). Once I have a better picture of what is needed here and could be reused ... Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
