Fortran-X-glut

I’ve been trying to implement OpenGL into an existing code(F77 and C) which is already using GL and X. The problem is the code already has events handler and window graphics tool. Usually 3 or 4 windows should be opened to use my software.
However I want OpenGL to be used only 1 window out of 4.

  1. Is there any way to avoid using glutMainLoop?
  2. Should the code be started from Main written C or C++?

Thanks.