[osg-users] "LOS" materail query

Mike Greene mgreene at hiwaay.net
Fri Aug 28 11:18:45 PDT 2015


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








More information about the osg-users mailing list