FLTK logo

freeglut compatibility issue

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.opengl  ]
 
Previous Message ]New Message | Reply ]Next Message ]

freeglut compatibility issue Martin Kroeker Apr 21, 2006  
 
As most Linux distributions appear to be switching to freeglut as
a replacement for Mark Kilgard's original GLUT, I have come across
a compatibility problem between FLTK's implementation and the current
freeglut-2.4. With earlier versions of freeglut, it was trivially possible to use GLUT functions like glutSolidSphere (or more importantly glutStrokeCharacter) that have no counterparts in FLTK's emulation by simply linking libglut.
The current 2.4 release of freeglut, however, has introduced an
internal state variable that is set by its own glutInit() precisely
to track if glutInit() has been called, and all its functions will
abort with a fatal error message when they do not find fgState.Initialised == 1. For most other (non-fltk-based) projects, this is probably not much of an issue, as they did forgot to call glutInit() in the first place, so they have a bug in their own code
to fix.
With FLTK providing its own replacement, i am not sure how to solve
this issue - i am currently using an ugly hack in my own code to
overwrite freeglut's supposedly private fgState structure, but it
might be necessary to at least document this unexpected incompatibility.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.