Taking Christian's advice to use Mark Harris's pbuffer lib and modeling after 18opengl_slave.cpp has worked well for me: http://sourceforge.net/mailarchive/forum.php?thread_id=7014657&forum_id=2633
Just remember that pbuffers have their own context, so your draw calls have to *all* be between RenderTexture::BeginCapture and RenderTexture::EndCapture, including setting up the projection matrix and any other overhead. I have also experimented with EXT_framebuffer_object (FBO) recently. If you are currently working on Windows with NVidia graphics, or you can wait a couple months for FBO to be more widely available, I suggest you do it. From what I have seen, FBO is *much* better than pbuffers in every possible way. -- Terry Welsh - mogumbo 'at' gmail.com www.reallyslick.com | www.infiscape.com | www.vrsource.org > Message: 2 > Subject: Re: [Opensg-users] Render-to-Texture > From: Dirk Reiners <[EMAIL PROTECTED]> > To: users <[email protected]> > Date: Fri, 22 Apr 2005 09:40:54 -0500 > Reply-To: [email protected] > > Hi Estee, > > On Fri, 2005-04-22 at 10:03 +0900, [EMAIL PROTECTED] wrote: > > Hi all, > > > > I want to render to a texture for my two pass rendering. :) > > I heard that someone used an external PBuffer wrapper lib successfully > > in OpenSG. > > If you did it, could you please give me an example or a clue how to > > use it in OpenSG? > > there are (at least) two ways of doing that. One is using a > PassiveWindow on a PBuffer (somebody else can hopefully answer that). > > The other is using two viewports on top of each other, and using a > TextureGrabForeground or Background. There are some simple examples for > both of those at Source/WindowSystem/GLUT/ called testWindowGLUTTGB.cpp > and testWindowGLUTTGF.cpp. > > Hope it helps > > Dirk > > -- > -- Dirk Reiners OpenSG Forum [EMAIL PROTECTED] > -- The OpenSG Open Source Scenegraph: http://www.opensg.org > -- Join the list at http://lists.sf.net/lists/listinfo/opensg-users > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&opÿick _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
