void particles::makeFloorTexture(void)
{
char circles[17][17]= {
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxx....xxxxxxxx",
"xxx......xxxxxxx",
"xxx......xxxxxxx",
"xxx......xxxxxxx",
"xxx......xxxxxxx",
"xxxx....xxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
"xxxxxxxxxxxxxxxx",
};
//GLubyte
//floorTexture[16][16][3];
GLubyte *loc;
int s, t;
/* Setup RGB image for the texture. */
loc = (GLubyte*) floorTexture;
for (t = 0; t < 16; t++) {
for (s = 0; s < 16; s++) {
if (circles[t][s] == 'x') {
/* Nice blue. */
loc[0] = 0x0;//0x1f;
loc[1] = 0x0;//0x1f;
loc[2] = 0x0;//0x8f;
} else {
/* Light gray. */
loc[0] = 0xca;
loc[1] = 0xca;
loc[2] = 0xca;
}
loc += 3;
}
}
result not good
No comments:
Post a Comment