[osg-users] Read color from osgTerrain ImageLayer?

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


Hi,

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!

Cheers,
Martin

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







More information about the osg-users mailing list