|
From: Robert H. <en...@no...> - 2005-05-02 00:29:10
|
On Sun, 1 May 2005, Ethan Merritt wrote: > Anyhow... > I pursued it a little bit further using the debugger. > The segfault came immediately upon attempting to call > int argc=0; > glutInit(&argc, NULL); ? > My GLUT docs tell me that the arguments to this call > *must* be the original (argc,argv) pair from the actual > invocation of the running program. And indeed if I hack > those in then the program proceeds a little further. ok. is there any clean way of passing the gnuplot argc,argv to this? I couldn't see one, but I also know there isn't anything of interest to glut there anyway. Perhaps I should pass argc=1, and argv[1]="gnuplot"? > However, it then brings down the entire X-server before displaying > anything :=( So with a bit of work I might be able to erase the contents of your hard drive too ;-) There are bugs in my GL_init() code, but I've never been able to get worse than a segv out of it. I have however found that I get different results/behaviour on my nVidia card at work than my ATI card at home, so who knows what is possible. > Perhaps that is due to the glutMainLoopEvent/glutMainLoop difference? This approach really wont work. glutMainLoopEvent takes a single pass through the glutMainLoop and returns. This means everything stays in control of the calling program. glutMainLoop transfers control of the program over to glut, and *NEVER RETURNS*. Everything else is supposed to be done in callbacks. I guess if you make glutMainLoopEvent a no-op, and add a call to glutMainLoop at the end of GL_text(), you would be able to do a single plot, and then gnuplot would stop responding. Rob This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. |