Another Beginer Question- How to Correct this error in Multiple Window


I am opening multiple window using fortran and OPENLGL. Now the problem I am facing is that the first window I am opening comes as blank white. I am attaching a snapshot.

I you can help me it will be great. I have attached the image of error to my home site

It has a png file attached

Best Regards


Is it white when you only have one window? Some code might help.


Yes it is white only when I start. On readjusting the window it comes in black background. Also I want white background for that window, but whatever I have tried it comes black.

Any help would be helpful.

Best Regards


Some code might help.


Which code can help. Do you want part of the code I have written


This is Main Display Call Code

    call glutinit()
    call glutinitdisplaymode(ior(GLUT_SINGLE,GLUT_RGB))
    call glClearColor(1.0,1.0,1.0,1.0)   

! Calling Profile Curve
call glutInitWindowSize(width_p,height_p)
call glClearColor(1.0,1.0,1.0,1.0)
wind = glutCreateWindow(“Profile Curve”)
CALL glutPositionWindow(50,50)
! Clear the Screen and Depth Buffer
call glutDisplayFunc(glDraw)
call glutReshapeFunc(myReshape)
! Calling Mean Curve
windm = glutCreateWindow(“Mean Curve”)
CALL glutPositionWindow(50+width_m,50)
call glClearColor(1.0,1.0,1.0,1.0)
call glutDisplayFunc(glDrawMean)
call glutReshapeFunc(myReshapeMean)

    CALL glPushMatrix()
   CALL glFlush()
     call glutMainLoop()

The Draw Subrotuine is

    call glLoadIdentity()    
      call glColor3f(1.0,1.0,0.0)
      call glBegin(GL_LINE_STRIP)                 
      DO i=1,201
            CALL glvertex3f(crv(i,1),crv(i,2),crv(i,3))
    END DO
     call glEnd()

The Reshape Subroutine is
CALL glViewport(10, 10, (width_p-10),( height_p-10))
call glortho(xmin,xmax,ymin,ymax, -1.0_gldouble, 1.0_gldouble)
CALL glLoadIdentity()

Hope this is part of code you where looking for

Thanks for the code.
I am unsure where your third window is coming from; does your app automatically create a window?
You only have logic to render into 2 OpenGL windows.


Actually I have pasted code for 2 windows only, the thrid is repration like mean curve till glPUSHMATRIX . Even with 2 window I am getting same error. Am I missing some command or step which is causing the problem only in first window

Best Regards

I would be looking for a problem that is stopping your draw function being called for that window. I don’t use glut but maybe you have a separate draw function for each window