Hey guys,

Need some help here, before I'm losing my mind while figuring out what I'm doing wrong.

I've been trying to get objects loaded from a fbx or collada file (they are largely similar). Mind you for the moment I'm only interested in loading the vertex info and texture coordinates thats it. No animations or any other info.
Here's the problem: I'm able to load my model just fine, it's the textures however that fail horribly.

In fbx format you have the following info for just two triangles:
Code:
Vertices:-2.5,-2.5,2.5,-2.5,2.5,2.5,2.5,-2.5,2.5,-2.5,-2.5,-1.69999992847443
        PolygonVertexIndex: 1,0,-3,3,2,-1
        GeometryVersion: 124
        LayerElementUV: 0 {
            Version: 101
            Name: "Texture"
            MappingInformationType: "ByPolygonVertex"
            ReferenceInformationType: "IndexToDirect"
            UV:        0.00744416890665889,0.915632724761963,
       0.00744416890665889,0.468982636928558,
       0.454094290733337,0.468982636928558,

       0.355433821678162,0.454094290733337,
       0.838598906993866,0.00744416890665889,
       0.355433821678162,0.00744416890665889
            UVIndex: 0,1,2,3,4,5
        }
The parts that matter are underlined. If I use that info in my code I get this as a result.

I rotated the model so you can see underneath it, but as you can see the texture coordinates are wrong. I have tried many different things, such as changing the order of the coordinates, but without good results.

Code:
       0.00744416890665889,0.915632724761963,  //1
       0.00744416890665889,0.468982636928558,  //2
       0.454094290733337,0.468982636928558,     //3

       0.355433821678162,0.454094290733337,    //4
       0.838598906993866,0.00744416890665889,  //5
       0.355433821678162,0.00744416890665889  //6
//become s
       0.00744416890665889,0.468982636928558,  //2
       0.00744416890665889,0.915632724761963,  //1
       0.454094290733337,0.468982636928558,     //3

       0.355433821678162,0.454094290733337,    //4
       0.838598906993866,0.00744416890665889,  //5
       0.355433821678162,0.00744416890665889  //6
For example when the second set is changed only the upper triangle is displayed correctly.
No matter what else I change, the other one only gets worse, and never as it should be.
I'm running out of options. It's probably something I'm overlooking, but I don't see it. Perhaps I need to rearrange something else? I don't know....

Anyway, I hope any of you have dealt with this before and knows what to do.
If you want to try the source code, you can download if from [here] (it's mostly a derivative of the tutorial I translated earlier) The fbx file is included as well.

A big big thanks if you can help me solve this.