#include #include #include #define TEX_HEIGHT 317 #define TEX_WIDTH 317 static GLubyte image[TEX_HEIGHT][TEX_WIDTH][4]; void initTexture(void) { FILE *fp; int x, z; /* texture file open */ if((fp=fopen("niko.tga", "rb"))==NULL){ fprintf(stderr, "texture file cannot open\n"); return; } fseek(fp, 18, SEEK_SET); for(x=0;x