next up previous contents index
Next: 13.3 NULL Callback Up: 13 FORTRAN Binding Previous: 13.1 Names for the

13.2 Font Naming Caveat

Because GLUT fonts are compiled directly into GLUT programs as data, and programs should only have the fonts compiled into them that they use, GLUT font names like GLUT_BITMAP_TIMES_ROMAN_24 are really symbols so the linker should only pull in used fonts.

Unfortunately, because some supposedly modern FORTRAN compilers link declared but unused data EXTERNALs, ``GL/fglut.h'' does not explicitly declare EXTERNAL the GLUT font symbols. Declaring the GLUT font symbols as EXTERNAL risks forcing every GLUT FORTRAN \ program to contain the data for every GLUT font. GLUT Fortran programmers should explicitly declare EXTERNAL the GLUT fonts they use. Example:

        SUBROUTINE PRINTA
#include "GL/fglut.h"
        EXTERNAL GLUT_BITMAP_TIMES_ROMAN_24
        CALL glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, 65)
        END



next up previous contents index
Next: 13.3 NULL Callback Up: 13 FORTRAN Binding Previous: 13.1 Names for the



Mark Kilgard
Fri Feb 23 08:05:02 PST 1996