offset attribute

hi

i have a really small questions, just to be sure:
what exactely does the offset in a polylist define. here an example:


<polylist count="1" material="glassShape-lib-Material">
                    <input offset="0" semantic="VERTEX" source="#glassShape-lib-vertices"/>
                    <input offset="1" semantic="TEXCOORD" source="#glassShape-lib-uvs" set="0"/>
                    <vcount>4</vcount>
                    

0 0 1 1 2 2 3 3</p>
</polylist>

so, will the indexlist for the vertices be: 0, 0, 1, 1 (first for for offset 0) or 0, 1, 2, 3 (offset applied on every entry)

i bet on the second guess, but as i said, just have to be sure.

thanks!

It says that you have 2 indexes (inputs) per entry in the

element.
The vcount tells you you have 4 elements (of size 2) in the following

element
The first (offset=0) of those 2 indexes is the VERTEX semantic, the second (offset=1) is the TEXCOORD

It defines the offset position within the

list of indices for that <input> stream.

The latter. The example shown will feed index lists to the <input> streams as follows:


Assemble Primitive (vcount=4)

    VERTEX   [ 0 1 2 3 ]
    TEXCOORD [ 0 1 2 3 ]

Primitive [ P0[0 0] P1[1 1] P2[2 2] P3[3 3] ], where:

P0 [ VERTEX[0] TEXCOORD[0] ]
P1 [ VERTEX[1] TEXCOORD[1] ]
P2 [ VERTEX[2] TEXCOORD[2] ]
P3 [ VERTEX[3] TEXCOORD[3] ]

The result is a quadrilateral with vertex attributes that include VERTEX (at least POSITION) and TEXCOORD.