Hi JP,

I'm using a 3rd party library to do filtering on the rendered image. They
do all their magic using opengl in a function call from the
postdrawcallback.

Here's what it currently does:

draw -> FBO -> copy to cpu -> postdraw

The postdraw operates on the FBO after it's been copied to the cpu and I
never see it.

Here's what I want to do:

draw -> FBO -> postdraw -> copy to cpu

I want to access the image with the filtering effects included.

Does this make it clearer?

My fallback is to not attach an image to the FBO and do the copying myself
in the postdrawcallback after the filtering.

Brian


This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery.
NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
any order or other contract unless pursuant to explicit written agreement
or government initiative expressly permitting the use of e-mail for such
purpose. •
-----osg-users-boun...@lists.openscenegraph.org wrote: -----

To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
From: "J.P. Delport" <jpdelp...@csir.co.za>
Sent by: osg-users-boun...@lists.openscenegraph.org
Date: 08/05/2009 02:17PM
Subject: Re: [osg-users] RenderStage::draw order of copyTexture   and
PostDrawCallback

Hi Brian,

Brian R Hill wrote:
> Sorry about the multiple posts/wrong subjects. Another copy/paste
artifact.
>
> Folks,
>
> I'm doing offscreen rendering using fbos with attached images. I'm also
> using the postdrawcallback to do additional processing. Currently the
> image/texture copy occurs before the postdrawcallback resulting in the
> image/texture not having the postdraw effects.
>
> Is there a reason why the copy isn't after the postdrawcallback?

Copy to where?

In the postdrawcallback you have the result of the rendering to FBO
copied back to the CPU (osg::Image) if an image was attached to your FBO
camera. You can modify the data in the callback and then call dirty on
the image and the texture would be updated on GPU. If you then use this
texture you should see changes. The osgprerender example does exactly
this. I'm not sure if you are expecting anything else? If so, please
provide more details on what you want to do.

cheers
jp

>
> Thanks,
>
> Brian
>
> This is a PRIVATE message. If you are not the intended recipient, please
> delete without copying and kindly advise us by e-mail of the mistake in
> delivery.
> NOTE: Regardless of content, this e-mail shall not operate to bind CSC to
> any order or other contract unless pursuant to explicit written agreement
> or government initiative expressly permitting the use of e-mail for such
> purpose. •
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> 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
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to