Hi Robert,

As part of the task in moving our applications to OSG 2.0 I discovered
there is a change in the behaviour of the API when binding an image with
a PBO to a TextureRectangle.

Using 1.2 we could set the image on the texture and then simply call
setImage on the image object and the TextureRectangle would automaticaly
update. Since moving to 2.0 we have to call dirty on the Image after the
setImage call. This is not a big deal for me as it is an easy change to
make but I thought this might not have been an intentional change. I had
a quick look to see what this was the case but couldn't track it down.

This is what the code looks like:

//set things up
image = new Image();
image->setPixelBufferObject(new PixelBufferObject(image));
m_YTexture->setImage(image);    

//the on update call...
Vimage->setImage(0.5 * m_imageWidth,0.5 * m_imageHeight,1,GL_LUMINANCE,
GL_LUMINANCE,
GL_UNSIGNED_BYTE,VBuffer,Image::AllocationMode::NO_DELETE);
//Since 2.0 we now also have to call the following for the texture to
update
Vimage->dirty();     


As I said this is not an issue as such just thought you might have
wanted the behaviour to be consistent between versions.

Cheers,

Brad



DISCLAIMER:---------------------------------------------------------------------------
This Email may contain confidential and/or privileged information and is 
intended 
solely for the addressee(s) named. If you have received this information in 
error, or
are advised that you have been posted this Email by accident, please notify the 
sender by return Email, do not redistribute it, delete the Email and keep no 
copies.
--------------------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to