Hi Robert,

The osg::Camera has a post and final draw callbacks which are perfect
for implementing custom read pixel operations, and already work
seamlessly with the code in RenderStage.  So rather than attach your
own osg::Image to the Camera and expect it to be filled in a custom
way the appropriate thing to do is attach a post draw callback to the
Camera instead and let it do what it wants - including call
osg::Image::readPixels if it sees so fit.

Robert.

On Mon, Dec 7, 2009 at 7:20 PM, Robert Milharcic
<[email protected]> wrote:
>
> Hi Robert,
>
> I don't understand why you are using a readPixels() callback.  Why not
> just avoid calling readPixels() completely and have your own custom
> method in your own code.
>
> Is it there is some higher level OSG functionality that you're
> actually trying to customize?
>
>
> Yes, that is correct! Image::readPixels is called by the framework 
> (osgUtil::RenderStage::drawInner) when you attach image to the camera. Hence, 
> if one decides to go custom way he/she is left with no other option but to 
> duplicate well-written and well-tested camera attachement code. But as I said 
> before, readPixels callback is low priority feature which may be left out if 
> no one cares...
>
>
>
> On Mon, Dec 7, 2009 at 2:18 PM, Robert Milharcic
> <[email protected]> wrote:
>> Attached is modified (SVN) osg/Image header and osg/image.cpp that adds 
>> ReadPixels callback. It can be used to override default Image::readPixels 
>> implementation. The reasons I'm proposing this *low priority* addition are 
>> as follows:
>>
>> - one can change how pixel packing is handled
>> - implement alternative image allocation strategies (for image banding and 
>> tiling as an example)
>> - on a fly pixel data processing
>> .. and more.
>>
>> Robert M.
>>
>> _______________________________________________
>> osg-submissions mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>>
>>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to