Robert once said that less lines of code constitutes cleaner code.
Here is an example that is three times cleaner than osgprerender:
In a nutshell, the program does just what you are asking for:
1. Camera one is set up to render to a PBuffer
2. A post draw callback copies the contents of the pbuffer to an osg::Image
3. Camera 2 is set up to render to a Window.
4. At frame time, it does a BLT (with a single glDrawPixels()) to the window.
You may do image processing on the image between camera 1's frame and camera 2's frame.
Cheers,
-don
On 9/28/06, Brad Colbert <[EMAIL PROTECTED]> wrote:
Oliver,
You can set up your camera to render to an image. Look at the
osgprerender example. It should explain much.
Cheers,
-Brad
---
RSC
BDC
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] ] On Behalf Of Oliver Kutter
> Sent: Thursday, September 28, 2006 7:20 AM
> To: osg users
> Subject: [osg-users] more than one window
>
> Hi,
>
> I wonder if it's possible that more than one window can be used in one
> application? I found the osgwindows example, but this is not what I
need.
> I want to do an offscreen rendering which I save into an image, then I
> do some image processing and at last I want to show only that image in
a
> seperate window (without 3D, only a plane 2D image). I don't want to
use
> anymore viewports but more windows instead.
> I thought of using qt as a window manager but I would rather use the
> Producer.
>
> It this possible?
>
> regards,
> Oliver
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
