[osg-users] How to grab color from a point on a model?

Dan Flickinger dmflickinger at gmail.com
Thu Oct 8 13:40:19 PDT 2015


Robert,

Thank you very much for the swift reply. Good point on switching to PolytopeIntersector. Another part of the project is already using that for something else. LineSegmentIntersector is finding intersections, so at least it's assumed to work okay for now. I'll definitely switch over once I get this piece working.

I did find an instance of osgUtil::Optimizer in the code, and I disabled it. The images are still dereferenced in the textures though. In checking each texture with osg::Texture::getUnRefImageDataAfterApply(), it's still set to true. Is there anything else that would enable this aside from running the optimizer?

I found where each model has its osg::Node initialized, but I'm at a loss in pulling out references to the textures from that. (In order to call setUnRefImageDataAfterApply() there.) Do I need to dig through the attribute list to find a state attribute that is a texture? I'm concerned that if I call setUnRefImageDataAfterApply() at initialization, it will still get reset to true by something else.

Thanks for all the help!

Best regards,

Dan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65330#65330








More information about the osg-users mailing list