Hello,
I am trying to make sense of the following documentation:
OpenGL 2.1 Reference documentation:
http://www.opengl.org/sdk/docs/man/
"
glTexParameter - set texture parameters
"
"
GL_TEXTURE_WRAP_S
Sets the wrap parameter for texture coordinate s to either GL_CLAMP,
GL_CLAMP_TO_BORDER, GL_CLAMP_TO_EDGE, GL_MIRRORED_REPEAT, or GL_REPEAT.
GL_CLAMP causes s coordinates to be clamped to the range [0,1] and is useful
for preventing wrapping artifacts when mapping a single image onto an
object. GL_CLAMP_TO_BORDER causes the s coordinate to be clamped to the
range -12N1+12N, where N is the size of the texture in the direction of
clamping.GL_CLAMP_TO_EDGE causes s coordinates to be clamped to the range
12N1-12N, where N is the size of the texture in the direction of clamping.
GL_REPEAT causes the integer part of the s coordinate to be ignored; the GL
uses only the fractional part, thereby creating a repeating pattern.
GL_MIRRORED_REPEAT causes the s coordinate to be set to the fractional part
of the texture coordinate if the integer part of s is even; if the integer
part of s is odd, then the s texture coordinate is set to 1-frac?s, where
frac?s represents the fractional part of s. Border texture elements are
accessed only if wrapping is set to GL_CLAMP or GL_CLAMP_TO_BORDER.
Initially, GL_TEXTURE_WRAP_S is set to GL_REPEAT.
"
I am especially confused about the following lines:
"
GL_CLAMP_TO_BORDER causes the s coordinate to be clamped to the
range -12N1+12N, where N is the size of the texture in the direction of
clamping.GL_CLAMP_TO_EDGE causes s coordinates to be clamped to the range
12N1-12N, where N is the size of the texture in the direction of clamping.
"
The only difference I can see is "coordinate" and "coordinates".
I am confused about this option... and especially the range description:
"-12N1+12N"
What the hell does that mean ?
I am also a little bit confused about GL_CLAMP but I think I understand
that.
Suppose my texture coordinates have range 0 to 1000... then GL_CLAMP would
always "clamp" this to 0..1.
So that would be bad because I would like to keep range 0 to 1000... so I
would need to use another option...
So that's why I am interested in the border or edge option... I just wanna
make sure I understand it correctly...
So some questions:
1. Are these two options the same thing ? (yes/no will do for now see
question 4

)
Suppose my texture coordinates are 800 x 600
2. Will border option clamp to 800x600 ?
3. Will edge option clamp to 800x600 ?
4. Is there a conceptual difference between these two options: border and
egdge ?
If so... then what's the difference, what's the concept for both ?
Bye,
Skybuck.