I have created a small sprite sheet(64x256) with all the frames of an animated sprite(64x64 each) , and im uploading that
texture into opengl in order to avoid binds for each animation state change.
But im facing a little problem with the mapping , and particurarly with the texture coordinates.
When i attempt to map anything but the first i simply get random parts of the frame rendered.
I think that the problem is with the way im mapping the triangle(i got it to work with deprecated GL_QUADS).
...Seems like i will have to play around with vertices a little more.
I think that the problem is with the way im mapping the triangle(i got it to work with deprecated GL_QUADS).
...Seems like i will have to play around with vertices a little more.
GL_QUAD expects 4 vertices per quad. Hence you need 4 UV coordinate pairs. But you compute 6 pairs, because you handle the quad as 2 triangles.