Thanx I've done and it works fine.<ÎÅÉLittle question about attaching input textures - what do you recommend attach 2 FBO textures and switch them in shader<ÎÅÉOr switch textures in stateset?<ÎÅÉ <ÎÅÉ<ÎÅÉ-----Original Message-----<ÎÅÉFrom: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of J.P. Delport<ÎÅÉSent: Wednesday, April 30, 2008 12:21 PM<ÎÅÉTo: OpenSceneGraph Users<ÎÅÉSubject: Re: [osg-users] Ping Pong rendering<ÎÅÉ<ÎÅÉHi,<ÎÅÉ<ÎÅÉRoman Grigoriev wrote:<ÎÅÉ> Sorry for my outlook but here is the original message<ÎÅÉThanx for your<ÎÅÉ> reply but I need to explain what I want<ÎÅÉI've seen stereomatch but I need<ÎÅÉ> to implement another thing.<ÎÅÉI try to explain. So I try to make clouds<ÎÅÉ> rendering on GPU using cellular automata.<ÎÅÉSo initial states are in<ÎÅÉ> texture1 and using FBO, attached to texture2 and pixel shader, I calculate<ÎÅÉ> states and write it to FBO texture2.<ÎÅÉSo now for this steps initial steps<ÎÅÉ> are in texture2 and here is the main question how can I "disapply" texture2<ÎÅÉ> from FBO and apply to texture1.<ÎÅÉIn OSGPPU it was made by copying to<ÎÅÉ> additional texture so there is no any discomfort to programmer. But this<ÎÅÉ> trick need to use additional pass <ÎÅÉIn my case copying 2048*2048 textures<ÎÅÉ> can take very long time. so I need dynamically change FBO -<ÎÅÉ> tex1,nextframe-tex2,nextframe-tex1,nextframe-tex2.<ÎÅÉThe main problem that<ÎÅÉ> FBO statically applying when you create camera and in current OSG you can't<ÎÅÉ> dynamically change FBO attachment.<ÎÅÉSo I'm newbie in OSG so if some<ÎÅÉ> explanations with code are welcome.<ÎÅÉThanx in advance<ÎÅÉPS: I found<ÎÅÉ<ÎÅÉ> another technique. <ÎÅÉWhat do you thing about<ÎÅÉ> that?<ÎÅÉhttp://www.m3xbox.com/GPU_blog/?tag=ping-pong<<ÎÅÉ<ÎÅÉ<ÎÅÉ<ÎÅÉI think this is exactly what I described in my previous mail. You could <ÎÅÉeven get away with not calling glDrawBuffer every frame, because if you <ÎÅÉuse glDrawBuffers (multiple render targets, see <ÎÅÉosgmultiplerendertargets) then both textures are attached every frame <ÎÅÉanyway.<ÎÅÉ<ÎÅÉregards<ÎÅÉjp<ÎÅÉ<ÎÅÉ> <ÎÅÉ> <ÎÅÉ> _______________________________________________<ÎÅÉ> osg-users mailing list<ÎÅÉ> [email protected]<ÎÅÉ> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org<ÎÅ É<ÎÅÉ-- <ÎÅÉThis message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. <ÎÅÉThe full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.<ÎÅÉ<ÎÅÉThis message has been scanned for viruses and dangerous content by MailScanner, <ÎÅÉand is believed to be clean. MailScanner thanks Transtec Computers for their support.<ÎÅÉ<ÎÅÉ_______________________________________________<ÎÅÉosg-users mailing list<[EMAIL PROTECTED]<ÎÅÉhttp://lists.openscenegraph.or g/listinfo.cgi/osg-users-openscenegraph.org<ÎÅÉ
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

