Advertisement

glTexCoord

Started by March 11, 2002 12:19 PM
0 comments, last by circuit 22 years, 11 months ago
I am using a texture mapped quad as a sprite. The texture size is 256x256 RGBA. The sprite is animated so the texture that I am using has 4x3=12 frames of animation on it. The proplem is that if I want to have the right frame on the quad I have to use texture coordinates like this: glTexCoord2f(0.25, 0.33203125); It is not very "exact" so 1 or 2 pixels on the edge of the quad are from a wrong frame. Is there more exact way?
the only other method that provides you "exact" coordinates is to create more than one texture, ie create 12 textures of 1 image instead of 1 texture of 12 images.

Moreover the method you''re currently using may also yield unexpected results with mipmaps.

This topic is closed to new replies.

Advertisement