In main program I made simple handle menu in OpenGl Window as:
.........................................
i=winio@('%es%sv%sp%ww[no_caption,no_sysmenu,no_border]%pv%^og[DOUBLE]%lw',xo1,yo1,xo2,yo2,opengl_proc,ctrl)
.........................................
i=glutCreateMenu (menu)
call glutAddMenuEntry ('MAKE BMP',1)
call glutAddMenuEntry ('EXIT',2)
Icall glutAttachMenu (GLUT_RIGHT_BUTTON)
.........................................
and in subroutine I've wroten:
integer function myexit ()
include <opengl.ins>
integer ctrl
write(*,*) 'I AM IN'
call glutDestroyWindow(i)
ctrl = 0
call window_update@(ctrl)
myexit = 0
write(*,*) 'I AM OUT'
end function myexit
By pushing right button mouse th epossition in the menu 'EXIT' I would like to EXIT the program closing OpenGl window too. Bu it doesn't work ?