Hi Lokesh,

Your OpenFlight model references all the textures it needs, and if you
want to replace or apply new ones you should simply reload the model
in Creator or other compatible modelling tool and apply the changes
you need then save again.

Robert.

On 23 May 2013 07:58, Lokesh Kumar <[email protected]> wrote:
> Hi,
>
> I have a flt model and multiple *.dds texture files in a Directory :-
>
> my folder contains :-
>
> (1) terrain.flt
> (2) road.dds
> (3) buildings.dds
> (4) banners.dds
>
> I know how to read and apply single  .dds texture file to my model
> (terrain.flt) :-
>
>     osg::ref_ptr<osg::Node> terrainModel (osgDB::readNodeFile
> ("c:/my_folder/terrain.flt"));
>     osg::ref_ptr<osg::Texture2D> tex (new osg::Texture2D);
>     osg::ref_ptr<osg::Image> image (osgDB::readImageFile
> ("c:/my_folder/road.dds "));
>
>     tex->setImage(image.get());
>
>     osg::ref_ptr<osg::StateSet> state=terrainModel->getOrCreateStateSet();
>
>     state->setTextureAttributeAndModes(0,tex.get
> (),osg::StateAttribute::ON);
>
>
>
> but i don't know how to read and apply all these textures to my model
> (terrain.flt).
>
> Help me.
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to