PDA

View Full Version : texture mapping-makeImage



sarahippo
05-01-2003, 12:00 PM
Hi,
I am a total beginner!
can someone explain the following code?
how does it make an image?
Thanks!

void makeCheckImage(void)
{
int i, j, c;

for (i = 0; i < checkImageHeight; i++) {
for (j = 0; j < checkImageWidth; j++) {
c = ((((i&0x8)==0)^((j&0x8))==0))*255;
checkImage[i][j][0] = (GLubyte) c;
checkImage[i][j][1] = (GLubyte) c;
checkImage[i][j][2] = (GLubyte) c;
}
}
}

shinpaughp
05-01-2003, 03:09 PM
It just alters the values in an array which when viewed as a texture form an image.