Fortran and OpenGL (+ GLU and GLUT) can now cooperate well, and it is
not so hard as before thanks to F2003 interoperability with C -already
implemented in most Fortran compilers, including the free ones- and
thanks to some useful packages:
F03GL
is a pioneering work by Anthony Stone and Alexandar Donev for
interfacing Fortran to OpenGL through F2003 ISO_C_BINDING module. It
can interoperate both with FreeGLUT and OpenGLUT, unlike the F90
interface F90GL which
required a custom GLUT library, so it is much easier to build. The
best way to build it on a Linux or Unix-like system is to download the
latest tar
package and my autotools patches,
unpack them together, then it may be just a matter of
./configure; make; make install.
AntTweakBar
is a simple and nice looking Graphical User Interface for 3d
applications, including OpenGL/GLUT, developed by Philippe
Decaudin. Here you can
download a version which I
completed with Autoconf/Automake support, a Fortran interface based on
F2003 and F03GL, and TwPlotfunc, a port of William
F. Mitchell plotfunc application to AntTweakBar, a screenshot
of which you can see below. AntTweakBar can be used, in principle, as
a generic Graphical User Interface (GUI) for Fortran, even for non
OpenGL applications, making it one of the few free options of this
kind.