Hello Michael,
On 12/16/2010 09:11 AM, Michael Raab wrote:
> I've added the following lines at line 1438 in FBOViewport.cpp.
>
> else if(getReadBuffer()&& depthTex)
> {
> ImagePtr texImg = depthTex->getImage();
>
> if((texImg->getWidth () != getStorageWidth ())
> ||
> (texImg->getHeight() !=
> getStorageHeight()) ||
> (texImg->getData () == NULL ) )
> {
> SINFO<< "FBOViewport::render: (Re)Allocating image"
> << "for read-back."
> << endLog;
>
> texImg->set(texImg->getPixelFormat(),
> getStorageWidth(),
> getStorageHeight() );
I think it is better to not use the default values for the other
arguments to Image::set() here, but instead take the ones of the
existing image (ie. use texImg->getFoo()).
> }
>
> glReadBuffer(GL_DEPTH_ATTACHMENT_EXT);
> glReadPixels(0, 0,
> getStorageWidth(),
> getStorageHeight(),
> texImg->getPixelFormat(),
> texImg->getDataType(),
> texImg->editData());
> glReadBuffer(GL_NONE);
> }
>
> I had no chance to test yet, but I'll do tomorrow. I'm not sure about the FBO
> emulation passage, as I have no idea what it should do? Do you think there
> has to be something similar inserted?
yes, it should essentially do the same, just reading from the
application frame buffer (instead of a user created FBO).
Cheers,
Carsten
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users