dispList=glGenLists(1);glNewList(dispList,GL_COMPILE);glBegin(GL_QUADS);// <- the subtle difference is herefor(intx=-768;x<768;x++)for(inty=-768;y<768;y++){glColor3f((double)(rand()%100)/500,(double)(rand()%100)/100,0);glVertex3i((x)*1,(y)*1,0);glVertex3i((x+1)*1,(y)*1,0);glVertex3i((x+1)*1,(y+1)*1,0);glVertex3i((x)*1,(y+1)*1,0);}glEnd();// <- and hereglEndList();
I don’t know if its my graphics drivers, or graphics card or perhaps just me, but the top code maxed out at 60 fps while the bottom code ran at ~10 fps.