rem: line[x] = (0xff * x / width) | (0xff00 * y / height) & 0xff00;
add: line[x] = (0xff * x / width) | ((0xff00 * y / height) & 0xff00);
context: int main(int argc, char** argv) {  glutInit(&argc, argv);  glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_DEPTH);  glutInitWindowSize(640, 480);  glutCreateWindow("GLUT Program");      glutDisplayFunc(display);  glutReshapeFunc(reshape);  glutIdleFunc(idle);  glGenTextures(1, &tex);  glBindTexture(GL_TEXTURE_RECTANGLE_ARB, tex);  glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST);  glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST);  glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);  glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);  glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0,	       iformat,	       width, height, 0,	       format, type,	       NULL);  buf = calloc(width * height, sizeof *buf);  int x, y;  for (y = 0; y < height; ++y) {    uint32_t* line = buf + width * y;    for (x = 0; x < width; ++x) {      line[x] = (0xff * x / width) | (0xff00 * y / height) & 0xff00;    }  }    glEnable(GL_TEXTURE_RECTANGLE_ARB);  glutMainLoop();  return EXIT_SUCCESS;}