   Displaying problems.
  Hi,So, I have the following function that is passed in the "glutDisplayFunc". void drawScene() {//Clear information from last drawglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glMatrixMode(GL_MODELVIEW); //Switch to the drawing perspectiveglLoadIdentity(); //Reset the drawing perspective//Declare varaibles.//This is for rows.int row = 0;//Goes through array NOT for the drawing.int i;//This is for drawing. Because it can be reset with affecting the length of the loop.int g;for (i = 0; i < 100; i++){g++;if (cellActivation == false){glColor3f(1.0f, 1.0f, 1.0f);glBegin(GL_QUADS);glVertex3f(g-3, row, -10);glVertex3f(g-2, row, -10);glVertex3f(g-2, row-1, -10);glVertex3f(g-3, row-1, -10);glEnd();}else if (cellActivation == true){glColor3f(0.2f, 0.3f, 1.0f);glBegin(GL_QUADS);glVertex3f(g-3, row, -10);glVertex3f(g-2, row, -10);glVertex3f(g-2, row-1, -10);glVertex3f(g-3, row-1, -10);glEnd();}if(g == 5){row--;g = 0;}}glutSwapBuffers(); //Send the 3D scene to the screen}And it does make a "grid" but, it only generates the "grid" after I move the window. This probably (not quite sure though) has to do with redisplaying caused by "glutReshapeFunc" but I do not know exactly why. Any suggestions?   
  I solved it. I needed to make "int g;" a "static int g;".   