The OSG allows you to share arrays so there isn't a problem.  If you
don't want to share then just now reuse the same array over and over
again.

Robert.

On 7/18/06, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hello,

In my geometry I've got 7 different texture (which correspond to 7
different faces) and I want to store
the texture coord of my vertices in 7 different TexCoorArray. Do you see
what I mean ?

My code is:

osg::Vec2Array* texcoords = new osg::Vec2Array;

for (noFac = 0; noFac < nbFac; noFac++) {

      optCarTer.facette = noFac;
      GeolibTerCarac(fid_ter, GEOLIB_TER_CAR_NUMFACE, &optCarTer,
                  &noFace, p_erreur);
      VerifCode(OASIS2OSG_ERR_GEO, -1);

      optCarTer.face = noFace;

       GeolibTerCarac(fid_ter, GEOLIB_TER_CAR_NLIGTEX, &optCarTer,
                  &nligTex, p_erreur);

      GeolibTerCarac(fid_ter, GEOLIB_TER_CAR_NCOLTEX, &optCarTer,
                  &ncolTex, p_erreur);


       for (noSom = 0; noSom < 3; noSom++) {

            optCarTer.sommet = noSom;
            GeolibTerCarac(fid_ter, GEOLIB_TER_CAR_COORDTEXSOM, &optCarTer,
                           coordTexSom, p_erreur);
            VerifCode(OASIS2OSG_ERR_GEO, -1);


texcoords->push_back(osg::Vec2((marge+coordTexSom)/(ncolTex-1),
                               1-(marge+coordTexSom[0])/(nligTex-1)));

            geometry->setTexCoordArray(noFace, texcoords);

        }
}

The problem is that  all my texture coord are store in the texture unit 0:
in my file I obtain:

 TexCoordArray 0 UniqueID Vec2Array_0 Vec2Array 366
      {
        0.44427 0.498689
        0.564294 0.499072
        0.564435 0.587068
        0.44427 0.498689
        ..... etc.....
      }
      TexCoordArray 1 Use Vec2Array_0
      TexCoordArray 2 Use Vec2Array_0
      TexCoordArray 3 Use Vec2Array_0
      TexCoordArray 4 Use Vec2Array_0
      TexCoordArray 5 Use Vec2Array_0
      TexCoordArray 6 Use Vec2Array_0

Thanks!!



DUSSEL Dorian
Stagiaire Alcatel Alenia Space
Master Pro Télédétection/ Imagerie numérique
Université Paul Sabatier TOULOUSE







This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error,
please delete it and immediately notify the sender. Any use not in accord
with its purpose, any dissemination or disclosure, either whole or partial,
is prohibited except formal approval. The internet can not guarantee the
integrity of this message. ALCATEL ALENIA SPACE (and its subsidiaries)
shall (will) not therefore be liable for the message if modified.

Ce message et toutes les pieces jointes (ci-apres le "message") sont
etablis a l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce message non conforme a
sa destination, toute diffusion ou toute publication, totale ou partielle,
est interdite, sauf autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, ALCATEL ALENIA SPACE (et ses filiales)
decline(nt) toute responsabilite au titre de ce message, dans l'hypothese
ou il aurait ete modifie.


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to