This is a somewhat follow-up from my previous post about Icosahedrons, I can draw them now, but I'm having difficulties texturing them.
I read that textures need to have dimensions in powers of 2, so I made a simple 256x256 texture with a bunch of numbers (to help with debugging). I understand that the texture coordinates need to be from 0.0 - 1.0 (anything less/greater will result in clamping based on the rules established). I took a look at the pixel information for a particular triangle (specifically, triangle number 1, in numbers.png) and found the 3 vertices to be (from the top left):
2,44 (bottom left)
49,44 (bottom right)
And to convert these into values from 0 - 1, I divide each point by 256 (the width and height of the texture), and get:
0.097656f, 0.019531f (top)
0.007813f, 0.171875f (bottom left)
0.191406f, 0.171875f (bottom-right)
However, as you can see by the texture-test.jpg, it doesn't quite map it properly (I added the red triangle to emphasize error). I tried rearranging the order of the coordinates as well as changing the rendering to clock-wise, but no combination of either of the two modifications made any improvement (and in most cases, made it worse).
I've included the Icosahedron file I'm using incase anyone wanted to try it and see if they get the same results I'm using. Any help would be appreciated.