I want to texture a polygon with glTexCoords2s. I can texture polygons correctly if I use glTexCoords2f. Since 4 bytes for a simple texel coordinate is a bit memory consuming, I thought I would use glTexCoords2s. I thought this would mean I could use the full range of 0…$7fff to mean 0.0 to 1.0. Unfortunately, 0 means 0 and 1 means 1.0 When I supply anything except these two, I get either a texture tiling or texture clamped, depending on how I set the parameters. I tried setting up a texture matrix of
1/65536 0 0 0
0 1/65536 0 0
0 0 1 0
0 0 0 1
to generate coords between 0 and 1, but that did nothing.
I’m sure this is a relatively easy thing, but I am at a loss. My OpenGL documentation does nothing but use floating point texel coordinates.
Which brings me to ask, what exactly is the texture matrix used for?