The input now works, but the program still gives me a blank window.

Code :
void double_cube(GLfloat firstNum, GLboolean buff, Display * visual, Window readout, XEvent * horizon)
{
...
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    gluLookAt(0.0, 1.0, (0.0 - (firstNum * 3.0)), 0.0, 0.0, (0.0 - (firstNum *3.0)), 0.0, 2.0, 0.0);
    #if DEBUG
    std::cout<<"check\n";
    #endif
    do{
        XNextEvent(visual, horizon);
        #if DEBUG
        std::cout<<"check\n";
        #endif
        switch(horizon->type)
        {
           ...
 
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 gluLookAt(0.0, 1.0, (0.0 - (firstNum * 3.0)), 0.0, 0.0, (0.0 - (firstNum *3.0)), 0.0, 2.0, 0.0);
            case KeyPress:
            {
                KeySym keysym;
                XKeyEvent * kevent;
                char buffer[1];
                /* It is necessary to convert the keycode to a
                * keysym before checking if it is an escape */
                kevent = (XKeyEvent *)horizon;
                if ((XLookupString((XKeyEvent *)horizon, buffer, 1, &keysym, NULL) == 1) && (keysym == (KeySym)XK_Escape))
                {
                    exit(0);
                }
                else
                {
                    if (stage <= 9)
                    {
                        switch(stage)
                        {
                            case 1:
                            {
                                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
                                allPoints[2] = new geopoint((0.0 - firstNum), 0.0, 0.0);
                                allPoints[3] = new geopoint(firstNum, 0.0, 0.0);
                                allPoints[4] = new geopoint(0.0, 0.0, (0.0 - firstNum));
                                allPoints[5] = new geopoint(0.0, 0.0, firstNum);
                                allLines[1] = new geoline(allPoints[2], allPoints[3]);
                                allLines[1]->drawShape();
                                std::cout<<"First, we must draw a line twice the length of the original dimension.\n";
                                std::cout<<"We cannot use this line to build the new cube directly, as it would be more than twice the size of the initial cube.\n";
                                stage++;
                                break;
                            }

I have tried pretty much everything, so if you are reading this and you can suggest anything, please respond.