Sign in to follow this  

collada and polylist

Recommended Posts

im writing a loader for collada and ive just gotten to the "polylist"... to my understanding this is the indexbuffer... however im having some difficulties understanding how it works...

                <polylist count="2144" material="blinn3SG">
                    <input offset="0" semantic="VERTEX" source="#LOD3spShape-lib-vertices"/>
                    <input offset="1" semantic="NORMAL" source="#LOD3spShape-lib-normals"/>
                    <input offset="2" semantic="TEXCOORD" source="#LOD3spShape-lib-map1" set="0"/>
                    <vcount>4 4 4 4  """values removed""" </vcount>
                    <p>89 0 23 243 1 26 90 2 28 6 3 29 91 4 30 243 1 26 89 0 23 5 5 31 92 6 33 244 7 35 91 4 """values removed"""</p>

as u can see it gives a "vcount" of value between 3-5... shouldnt this be the number of vertices in a primitive? how would i know how to triangualte a primitive with 4 or 5 vertices?! also im unsure about the offset values... any help?

Share this post

Link to post
Share on other sites
ok i solved that problem by using triangulated collada models...

however now i got another problem... all the data arrays (position, normals, texcoord) have their own index in the index array... and somehow i have to convert this to normal data with one data array with vertex data and one indexbuffer...

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this