alok47
1
Can anyone pull me out from this mess ?
I want to specify texture coordinates using
glTexCoord*i ().
Since it doesn’t maps linearly the integer values supplied to the float range [0, 1],
so I cannot access texture coordinates like
[0.5, 0.5].
It only specifies the extreme texture coordinates.
Is their any way by which I can specify different intermediate texels using the integer version of glTexCoordi ?
jide
2
glTexCoord2f would be better i think
JD
alok47
3
I can’t use glTexCoord*f.
I have to use glTexCoord*i or glTexCoordPointer (GL_INT ) version.
Bob
4
Just curious, why can’t you use glTexCoord*f?
Anyways, scale the texture matrix so you can access parts of the texture with integer coordinates.
glMatrixMode(GL_TEXTURE);
glScalef(0.5, 0.5, 1);
glTexCoord2i(1, 1);
That glTexCoord2i call will be scaled to (0.5, 0.5).
kon
5
Maybe he’s using an integer only OpenGL version for platforms which can’t perform floating point arithmetic?
kon