   Render simple collada cube
  Hello.I'm not sure if this is the correct forum for this, but anyways. I've decided to use collada for my hobby 3D engine and made a simple converter from collada to my own format. this is the mesh I've parsed for my test:from cube.dae, the one that follows with collada DOM<mesh> <source id="box-lib-positions" name="position"><float_array id="box-lib-positions-array" count="24">-50 50 50 50 50 50 -50 -50 50 50 -50 50 -50 50 -50 50 50 -50 -50 -50 -50 50 -50 -50 </float_array><technique_common>    <accessor count="8" source="#box-lib-positions-array" stride="3">   <param name="X" type="float"/>   <param name="Y" type="float"/>   <param name="Z" type="float"/>    </accessor></technique_common> </source> <source id="box-lib-normals" name="normal"><float_array id="box-lib-normals-array" count="72">0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 -1 0 0 -1 0 0 -1 0 0 -1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 -1 0 0 -1 0 0 -1 0 0 -1 </float_array><technique_common>    <accessor count="24" source="#box-lib-normals-array" stride="3">   <param name="X" type="float"/>   <param name="Y" type="float"/>   <param name="Z" type="float"/>    </accessor></technique_common> </source> <vertices id="box-lib-vertices"><input semantic="POSITION" source="#box-lib-positions"/> </vertices> <polylist count="6" material="BlueSG"><input offset="0" semantic="VERTEX" source="#box-lib-vertices"/><input offset="1" semantic="NORMAL" source="#box-lib-normals"/><vcount>4 4 4 4 4 4 </vcount><p>0 0 2 1 3 2 1 3 0 4 1 5 5 6 4 7 6 8 7 9 3 10 2 11 0 12 4 13 6 14 2 15 3 16 7 17 5 18 1 19 5 20 7 21 6 22 4 23 </p> </polylist>  </mesh>this is the only mesh and as you can see it contains 24 vertices, 6 faces, 4 vertices per face.When I'm done parsing I've got an array containing all the vertices and create a vertexbuffer (Direc3D 10). Now, when I draw the vertices I just draw from 0 -24 like so:UInt32 stride = sizeof(Vertex);UInt32 offset = 0;   //Toplogy is D3D10_PRIMITIVE_TOPOLOGY_TRIANGLESTRIPm_pD3DDevice->IASetVertexBuffers(0, 1, &m_pVB, &stride, &offset);m_pD3DDevice->Draw(m_numVertices, 0);The result is cube like, but it is full of holes.This is my first attempt to render a collada file and I know that collada is only meant to describe how a model is built, not how it should be drawn. Is drawing the vertices one by one the right way to do it or should i try something else? like making the polylists to a list of tringles?anywas, the vertices i end up with are these and they do seem to be correct:vertex [0] : x:-50y:50z:50vertex [1] : x:-50y:-50z:50vertex [2] : x:50y:-50z:50vertex [3] : x:50y:50z:50vertex [4] : x:-50y:50z:50vertex [5] : x:50y:50z:50vertex [6] : x:50y:50z:-50vertex [7] : x:-50y:50z:-50vertex [8] : x:-50y:-50z:-50vertex [9] : x:50y:-50z:-50vertex [10] : x:50y:-50z:50vertex [11] : x:-50y:-50z:50vertex [12] : x:-50y:50z:50vertex [13] : x:-50y:50z:-50vertex [14] : x:-50y:-50z:-50vertex [15] : x:-50y:-50z:50vertex [16] : x:50y:-50z:50vertex [17] : x:50y:-50z:-50vertex [18] : x:50y:50z:-50vertex [19] : x:50y:50z:50vertex [20] : x:50y:50z:-50vertex [21] : x:50y:-50z:-50vertex [22] : x:-50y:-50z:-50vertex [23] : x:-50y:50z:-50
  I don't know is this should be posted in the DirectX forum instead of alternative librarys?   ;  You also have to parse the polylist/triangles.As show in the sample file the first index is for vertex position and the one after it is the normal. So for example the first polygon consists of (0,0) (2,1) (3,2) (1,3) where each pair stores the position index and the normal index.Also, I suggest you to use the Refinery to convert you polylist into triangles which are what your graphics card probably likes the most.   ;  The test cube only contains a polylist, so I just took the vertices and put them in an array. I got the normals to, the order(index) from p. I just downloaded the refinery and will convert the polylists to trianglelists instead.[Edited by - HermanssoN on June 23, 2009 7:53:15 AM];Quote:Original post by HermanssoNThe test cube only contains a polylist, so I just took the vertices and put them in an array. I got the normals to, the order(index) from . I just downloaded the refinery and will convert the polylists to trianglelists instead.thanks for reply//Hermansson   