osgEarth::ImageLayer(const osg::Image) ?

classic Classic list List threaded Threaded
2 messages Options
marlinrowley marlinrowley
Reply | Threaded
Open this post in threaded view
|

osgEarth::ImageLayer(const osg::Image) ?

I'm looking for a simple constructor that will take an osgImage and make it an osgEarth::ImageLayer.  The image can be anything in a picture format (i.e. .tif, .png, .bmp, etc..)

I can not find such a function.  Am I missing something?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth::ImageLayer(const osg::Image) ?

Marlin,
There is no such constructor. You will need to use the "osg" driver and pass that to the image layer.

You can look at the "osgearth_map.cpp" example for guidance. This example does not use the OSG driver, but uses other drivers that demonstrate the process. You will need to

#include <osgEarthDrivers/osg/OSGOptions>

Then populate OSGOptions, and create a layer using those options.

Good luck.
Glenn Waldron / Pelican Mapping