#include <iostream>using namespace std;
#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>#define checkImageWidth 64 //图片宽度
#define checkImageHeight 64 //图片高度static GLubyte checkImage[checkImageWidth][checkImageHeight][4];//定义图片,RBGA//生成黑白相间的图片
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;checkImage[i][j][3] = (GLubyte) 255;}}
}