   Texture coordinates (why cant i use integers)
  I am currently placing multiple graphics in one texture. I then calculate the texture coordinates based on the position of the graphic within the texture and the size of the texture.x1 = xpos / textureWidth;y1 = ypos / textureHeight;x2 = ( xpos + imageWidth ) / textureWidth;y2 = ( ypos + imageHeight ) / textureHeight;This does work but why can I not just specify these coordinates as integers and pass GL_SHORT to glTexCoordPointer?    
  You cannot specify fractional coordinates using integers, because integers cannot store fractional numbers. You can use integer coordinates, but you are, obviously, limited to integer coordinates. You can, however, scale the texture coordinates by applying scaling to the GL_TEXTURE matrix stack.   ;  Are you saying the following should work:1) create a 512x512 texture2) load a 50x50 graphic into it at 100, 1003) display the texture with the following:(following is assuming a 2d setup)GLuint verts[] = { 100, 100,    100, 150,    150, 100,    150, 150 };glVertexPointer(2, GL_SHORT, 0, verts);glTexCoordPointer(2, GL_SHORT, 0, verts);glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);This never produces the results that I want and I always thought it was because it cant work that way.   ;  No, I'm saying the opposite. In that case you need texture coordinates 0.1953 and 0.2930 (approximately 100/512 and 150/512, respectively), but you cannot represent those numbers with integers. You can only reference integers, and so only the whole texture, or multiples of it.But, as I said, you can scale the texture matrix.glMatrixMode(GL_TEXTURE);glLoadIdentity();glScale(1.0/512, 1.0/512, 1);Now you can pass those texture coordinates, and they will be scaled by 1/512 to the desired normalized coordinates.   ;  A reason why you can't specify coordinates to the pixel is that you generally want to be independent from texture sizes. Thus you need to specify coords in range [0.0, 1.0] instead of pixel x/y coords.Imagine a situation in which you display a quad with a texture (e.g. a billboard). Now what would you do if you wanted to support different resolutions - low resolution textures for low-memory cards and high resolution textures for cards with more memory? Would you provide a set of coordinates for each resolution? What if you want to modify the coords to achieve some effects? The simple answer is: use relative coordinates which are independent of resolution. [smile]   