PDA

View Full Version : Help with texture on several objects



Kondrat
03-16-2001, 09:29 AM
Explain me why it work right (show full texture)for example when N=10, and show only piece of texture when N=5...
Can you tell me about technology to put texture on several objrcts..

for(y=0;y<(N-1);y++)
for(x=0;x<(N-1);x++)
{
glBegin(GL_POLYGON);
glTexCoord2d(x/N, y/N);
glVertex3d(x,y,1);
glTexCoord2d(x/N, (y+1)/N);
glVertex3d(x,y+1,1);
glTexCoord2d((x+1)/N, (y+1)/N);
glVertex3d(x+1,y+1,1);
glTexCoord2d((x+1)/N, y/N);
glVertex3d(x+1,y,1);
glEnd();
}

Tim Stirling
03-16-2001, 09:55 AM
Yor code appears ok, could you post more information on what you are doing and seeing, a bit more code would be helpful.

Tim

Kondrat
03-16-2001, 12:36 PM
2Tim: see mail
Thank you!

Tim Stirling
03-17-2001, 01:04 AM
I have sent you an email that should solve it.