Hi,
I use a CameraNode to render my scene to an image:
cameraNode->attach(osg::CameraNode::COLOR_BUFFER, _image.get());
Later I want to change the image content by setting the r,g & b values
of the image data:
// myCamera is the class which provides the rendering to the image
osg::Image* image = myCamera->getImage();
unsigned char* data = image->data();
int size = image->s() * image->t();
// just as an example: I want to set the image color to black
for (int i=0; i<size*3; i++) {
data[i] = 0;
}
But I don't get the image color set to black. I wonder what kind of data
I get with image->data()? The const or the non-const data? Because I
think that I should be able to change the color if I get the non-const
data. So I think that I'm getting the const data.
But what do I get exactly?
regards
Oliver
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/