OK,
Got this working for some cases. For example, I used Lightwave to create a
box with a colorbar texture placed on it so I would know for sure that the
color returned was correct. The texture I used was a plain jpg. The problem is
when using some other .ive , ost, or .osgt files. These have embedded textures
of some unknown format. Do I need to somehow use set/getPixelFromat in order to
be able to retrieve to right values for the texture color ?
I am using this to check the color values for the picked texture:
Code:
osg::Image *myImage = myTexture->getImage(0);
if (myImage) {
osg::Vec4 textureColor =
myImage->getColor(tc);
std::cout << "textureColor = " <<
textureColor.x()*255 << "," << textureColor.y()*255 << "," <<
textureColor.z()*255 << std::endl;
}
Thank you!
Cheers,
Mike
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64938#64938
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org