Thank you for your answer and I am sorry I didn't give enought info.

So first the geometry :

I have two rings of N vertices indexed 0 to N-1 for the first and N to 2N-1
for the second

  1     *-----------------*   4
       /                  /  \
     /      * 2          /_-*    5
0  *--------------------*
                        3

every vertex has correct normal and position, so far I have
6 indices, 6 positions, 6 normals

I also use N quads : (*facepalm* just realized something, my indexing wasn't
that simple)

so in fact the index until now was just virtualy, it is the order in wich I
generate my vertices, my positions..

here the inexing for the quads :

                indices->addValue(vertexlist[j]->index);
                indices->addValue(vertexlist[j+1]->index);
                indices->addValue(vertexlist[j+1]->index);
                indices->addValue(vertexlist[j]->index);

and for the last quad :

                indices->addValue(vertexlist[j]->index);
                indices->addValue(vertexlist[0]->index);
                indices->addValue(vertexlist[0]->index);
                indices->addValue(vertexlist[j]->index);

this gives the following array : 0143 1254 2035
those are the correct quads

..this all works fine, but now I want a texture all around the tube

Carsten wrote :

It seems you want to use a vertex just once, but give it two different
> texture coordinates? You can store the vertex position once and use
> different indices for position and texture coordinate to get something
> similar, i.e. one position *used* twice, each time with a different tex
> coord.


that would be perfect :) ..but how can I do that? this is my first selfmade
geometry (except for the water of the tutorial) I realy could need some code
examples ^^

There exist other methods for texturecoords like setTexCoords1 or
setTexCoords2 etc.. what are they for? could they be usefull here?

thank you for your help,

Victor
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to