terencegbh
11-29-2010, 10:35 PM
Hi,
I am using fortran to run a simulation program and has a opengl display code as below:
call fauxInitDisplaymode (IOR(AUX_SINGLE,AUX_RGB))
call fauxInitPosition (0, 0, 400, 400)
ret = fauxInitWindow ("Bubble window"C)
call fglClearColor (0.0, 0.0, 0.0, 0.0)
call fglClear(GL_COLOR_BUFFER_BIT)
call fglMatrixMode (GL_PROJECTION)
call fglLoadIdentity ()
call fglOrtho(DBLE(-1.0),DBLE(1.0),DBLE(-1.0),DBLE(1.0),
& DBLE(-1.0),DBLE(1.0))
call fglColor3f (1.0, 1.0, 1.0)
call fglBegin(GL_POINTS)
do I=1, 102
call fglVertex2f(rj(I)*mult, -(zj(I)+0.d0)*mult) !Plot points
enddo
do I=1, 102
call fglVertex2f(-rj(I)*mult, -(zj(I)+0.d0)*mult) !Mirror to -x
ENDDO
call fglEnd()
call fglFlush()
call fglClear(GL_DEPTH_BUFFER_BIT)
call fglClear(GL_COLOR_BUFFER_BIT)
my problem is that as long as i dont touch it, it will display perfectly, however as long as i click on any other windows or move this display window, the whole screen will turn blank thereafter. Hope anyone can assist me in this.
Thanks.
terence
I am using fortran to run a simulation program and has a opengl display code as below:
call fauxInitDisplaymode (IOR(AUX_SINGLE,AUX_RGB))
call fauxInitPosition (0, 0, 400, 400)
ret = fauxInitWindow ("Bubble window"C)
call fglClearColor (0.0, 0.0, 0.0, 0.0)
call fglClear(GL_COLOR_BUFFER_BIT)
call fglMatrixMode (GL_PROJECTION)
call fglLoadIdentity ()
call fglOrtho(DBLE(-1.0),DBLE(1.0),DBLE(-1.0),DBLE(1.0),
& DBLE(-1.0),DBLE(1.0))
call fglColor3f (1.0, 1.0, 1.0)
call fglBegin(GL_POINTS)
do I=1, 102
call fglVertex2f(rj(I)*mult, -(zj(I)+0.d0)*mult) !Plot points
enddo
do I=1, 102
call fglVertex2f(-rj(I)*mult, -(zj(I)+0.d0)*mult) !Mirror to -x
ENDDO
call fglEnd()
call fglFlush()
call fglClear(GL_DEPTH_BUFFER_BIT)
call fglClear(GL_COLOR_BUFFER_BIT)
my problem is that as long as i dont touch it, it will display perfectly, however as long as i click on any other windows or move this display window, the whole screen will turn blank thereafter. Hope anyone can assist me in this.
Thanks.
terence