[osg-users] Read color from osgTerrain ImageLayer?

Martin Scheffler osgforum at tevs.eu
Sun Nov 29 10:04:57 PST 2009


a question: How can I get a terrain color from a specific position?

ImageLayer::getValue(int, int, osg::Vec4) is not implemented. 

When I try to read from the Image with the command imageLayer->getImage()->getColor(i, j);
I always get (1,1,1,1) as a return value. This seems to happen because the _pixelFormat value (33776) is not caught by the switch statement in Image::_readColor. 

I use a VPB built terrain.
So how can I get at the color? Thanks!


Read this topic online here:

More information about the osg-users mailing list