Is it possible to get pixel-perfect precision with glTexCoord2f() somehow? For example, let's assume that I have bound a 512x512 texture to the OpenGL context and now I want to draw an arbitrary area from inside that texture as a quad. Let's also assume that the area I want to draw uses really odd offsets and dimensions that are not a multiple of the texture's size. For instance:
Texture size: 512x512
Area inside the texture that I want to draw: X=131 Y=159 Width=243 Height=33
The problem is that glTexCoord2f() expects values in the range from 0 to 1 so I'd have to do some floating point arithmetic to convert the pixel values into a float value that ranges from 0 to 1 and I'm afraid that pixel-perfect precision might get lost in the course of that integer to float conversion. I know that this conversion won't be a problem if you stick to texture size multiples, i.e. sprite sheets with items sized 16x16, 32x32, 64x64 or something like that but what about addressing really arbitrary offsets within the texture? Is pixel-perfection possible here at all?
ARB_texture_rectangle
? – genpfault