Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 9 of 9

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

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8

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

    Hi,

    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

    https://sites.google.com/site/shukla...ltiwindowerror

    It has a png file attached

    Best Regards

    Apurva


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    Is it white when you only have one window? Some code might help.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8
    Hi,

    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

    Apurva

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    Some code might help.

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8
    Quote Originally Posted by tonyo_au View Post
    Some code might help.
    Hi,

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

    Apurva

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2012
    Posts
    8
    Quote Originally Posted by tonyo_au View Post
    Some code might help.
    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 glMatrixMode(GL_PROJECTION)
    call glortho(xmin,xmax,ymin,ymax, -1.0_gldouble, 1.0_gldouble)
    CALL glClear(GL_COLOR_BUFFER_BIT)
    CALL glMatrixMode(GL_MODELVIEW)
    CALL glLoadIdentity()

    Hope this is part of code you where looking for

  7. #7
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    Location
    Australia
    Posts
    1,117
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •