Original Post
I need help getting the texture coordinate arrays to work properly in OpenGL.
this is the content of my coordinate array
1.000000 1.000000
0.000000 1.000000
0.000000 0.000000
1.000000 1.000000
0.000000 0.000000
1.000000 0.000000
I call this array like the following
glTexCoordPointer(2, GL_FLOAT, 0, TexCoords);
Here is the output...
On left is what it should look like, the right is what i''m actually getting
It might be worth noting that I use indexed vertex arrays.
This is what the vertex array looks like...
1.000000 1.000000 0.000000
1.000000 -1.000000 0.000000
-1.000000 -1.000000 0.000000
-1.000000 1.000000 0.000000
this is what the index array looks like....
0 3 2
0 2 1
it is called like this....
glVertexPointer(3, GL_FLOAT, 0, Vert_public);
glDrawElements(GL_TRIANGLES, header.numFaces*3, GL_UNSIGNED_INT, index);
''Vert_public'' is the vertex array, and ''index'' is the index array.
I''m so very desperate right now, any assistance at all is helpful, i''ve been over this a million times, and can''t figure it out.
It might be worth noting that I use indexed vertex arrays.
This is what the vertex array looks like...
1.000000 1.000000 0.000000
1.000000 -1.000000 0.000000
-1.000000 -1.000000 0.000000
-1.000000 1.000000 0.000000
this is what the index array looks like....
0 3 2
0 2 1
it is called like this....
glVertexPointer(3, GL_FLOAT, 0, Vert_public);
glDrawElements(GL_TRIANGLES, header.numFaces*3, GL_UNSIGNED_INT, index);
''Vert_public'' is the vertex array, and ''index'' is the index array.
I''m so very desperate right now, any assistance at all is helpful, i''ve been over this a million times, and can''t figure it out.