[osg-users] glCopyTexImage2D or Frame Buffer Object

"Martin Großer" Grosser.Martin at gmx.de
Tue Apr 19 23:58:39 PDT 2011


Ok thank you. And what do you think about osg::Texture2D::copyTexImage2D(...)? Is this a worse solution than the FBO?

Thank you very much.

Best regards

Martin


-------- Original-Nachricht --------
> Datum: Tue, 19 Apr 2011 16:03:03 +0100
> Von: Robert Osfield <robert.osfield at gmail.com>
> An: OpenSceneGraph Users <osg-users at lists.openscenegraph.org>
> Betreff: Re: [osg-users] glCopyTexImage2D or Frame Buffer Object

> Hi Martin,
> 
> FBO's do support multi-sampling - but the setup is different from the
> frame buffer set up of multi-sampling, instead you you provide the
> settings when you call Camera::attach().  The relevant methods are:
> 
>         /** Attach a Texture to specified buffer component.
>           * The level parameter controls the mip map level of the
> texture that is attached.
>           * The face parameter controls the face of texture cube map
> or z level of 3d texture.
>           * The mipMapGeneration flag controls whether mipmap
> generation should be done for texture.*/
>         void attach(BufferComponent buffer, osg::Texture* texture,
> unsigned int level = 0, unsigned int face=0, bool
> mipMapGeneration=false,
>             unsigned int multisampleSamples = 0,
>             unsigned int multisampleColorSamples = 0);
> 
>         /** Attach a Image to specified buffer component.*/
>         void attach(BufferComponent buffer, osg::Image* image,
>             unsigned int multisampleSamples = 0,
>             unsigned int multisampleColorSamples = 0);
> 
> As for anaglyphic stereo, this is managed currently by
> osgUtil::SceneView for frame buffers where it sets up two traversals
> one for each eye, and sets up the color write mask to render the cyan
> and red for the left and right eye traverals.  A straight render to
> texture Camera won't use this higher level feature, if you want to
> implement stereo within a render to texture camera you'll need to
> manage the left/right eye passes as a subgraph of the Camera, or have
> two Camera and share the same FBO.
> 
> Robert.
> 
> 
> 2011/4/19 "Martin Großer" <Grosser.Martin at gmx.de>:
> > Hello,
> >
> > Few month ago, I got an application, which realized a "render to
> texture" with glCopyTexImage2D(GL_TEXTURE_2D,0,...) and the antialiasing and the
> anaglyphic works well. Today I tried the render-to-texture with the frame
> buffer object as render target for the osg::Camera and in this case the
> antialiasing doesn't work. Also the anaglyphic view doesn't work.
> >
> > Why did antialiasing and anaglyphic work with glCopyTexImage2D?
> >
> > I have read that the frame buffer object doesn't support antialiasing,
> is it true?
> >
> > Thanks
> >
> > Martin
> > --
> > GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> > gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
> > _______________________________________________
> > osg-users mailing list
> > osg-users at lists.openscenegraph.org
> >
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de



More information about the osg-users mailing list