PDA

View Full Version : glTexCoordPointer question



Dumbledore
10-27-2009, 07:40 AM
What is the bounds of the texture coordinates?

I thought the bounds were 0.0 ... 1.0 but I have some code here that works on GL 2.0 despite all of it's values being greater than 1.0

Then when I port this code to GL ES 1.0 it does not map texture coordinates properly. (It is possible the GL ES implementation is buggy, but I would like to be certain I am passing valid values to it before I draw conclusions.)

So are the bounds 0.0 ... 1.0? If not, how does GL handle values > than 1.0?

ydroneaud
10-30-2009, 03:13 AM
Texture bounds are usually 0.0 ... 1.0, even if it's not square.

If you go beyond those bounds, I think texture will wrap when using glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_{S,T}, GL_REPEAT).