Rats, I was afraid that might happen. I originally had put the initGlut()
where you have now put it, but it crashes on my Linux box (which does not
use freeglut), which is why I ended up putting it in that other place.
Morally it should of course go where you have put it. But since (for
reasons I don't understand) my glut is crashing in one spot and your
freeglut is crashing (or misbehaving) in another spot, then it looks like
we're going to need a horrid #ifdef bit of code (and so yet another flag
to have to specify in environment.txt).
Wayne
On Fri, 26 Aug 2005, Brian Smith wrote:
> Wayne,
>
> We're using freeglut 2.4 which may be different from earlier
> versions. Your suggestion does not seem to cure the problem bizarrely I
> don't know how it manages to call the glut function without driving
> through your modification. By poking about a bit and adding the
> glutInit() call to the "if (first_pass)" section of
>
> Gl_handler new_gl_handler(Tcl_Interp *interp, Tk_Window tk_win)
>
> then I can cure the problem. Looking forward to a tidy fix.
>
> Brian
>
> On Tue, 23 Aug 2005, Wayne Boucher wrote:
>
> > Ah, this shows our ignorance of glut. We haven't come across that before
> > because it must happen automatically with the glut we're using (but it
> > seems not with freeglut, or at least some versions of freeglut).
> >
> > In the file ccpnmr1.0/c/memops/global/gl_handler.c in the function
> > draw_text_gl_handler() below the line:
> >
> > static void *font = GLUT_BITMAP_HELVETICA_10;
> >
> > add the following (white space not crucial):
> >
> > static Bool first_pass = CCPN_TRUE;
> > int argc = 0;
> > char *argv = NULL;
> >
> > if (first_pass)
> > {
> > first_pass = CCPN_FALSE;
> > glutInit(&argc, &argv);
> > }
> >
> > That bit of code does not crash our glut and hopefully will sort out your
> > freeglut. After saving the changes, type "make" in the same directory (it
> > should compile without complaints). Then let us know if that has solved
> > the problem.
> >
> > Wayne
> >
> > On Mon, 22 Aug 2005, SUBSCRIBE CCPNMR ellen fu wrote:
> >
> > > Hi,
> > >
> > > I couldn't use shift+ctrl+left mouse button to pick peaks. every time
> > > analysis just crashed with a message shown below,
> > >
> > > freeglut ERROR: Function <glutBitmapWidth> called without first calling
> > > 'glutInit'.
> > >
> > > any suggestion?
> > >
> >
>
> --
> Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
> Division of Biochemistry & Molecular Biology,
> Institute Biomedical & Life Sciences,
> Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
> Tel: 0141 330 5167/6459/3089 Fax: 0141 330 8640
>
|