From: <lec...@ya...> - 2003-02-17 10:11:34
|
I tried to do what you said, but there one thing I must be missing, because I don't know how to insure that the termination comes from the canvas. I tried to do it inside a windowClosed event, but it doesn't work... The main problem I have is to stop the GL drawing ! Have you any source code example ? Thanks --- Gary Stewart <gi...@st...> a écrit : > > Anyway, "gljDestroy failed (free)", who knows what > it > > does mean ? > > > > I have a JFrame containing a GLAnimCanvas called > > "canvas", created with > > > GLDrawableFactory.getFactory().createGLAnimCanvas(caps, > > 640, 480); > > > > Then, i add a GLEventListener > > (canvas.addGLEventListener) on it, containing all > the > > init and display methods. But everytime I try to > call > > canvas.cvsDispose(), it tells me that gljDestroy > > Failed. I know that it means he can't destroy the > > GLContext, but i dunno how to correct it... > > > > When I Use a simple GLAnimCanvas, without > > GLEventListener, this error never occur. Is it a > > GLEventListener problem ? Or am i doing something > > wrong ? > > > I don't know exactly what it means but I do know > where it occurs. > Basically, as I'm sure you know, since the event > that terminates the main > window can be called at any time, then the > GLAnimCanvas can be within a > draw() at the time the termination is called, this > causes this error to > appear. The way I got around it was to insure the > termination occured > correctly from within the draw. For example if you > have a window close > event this can set a boolean flag within the canvas > which if found to be > true terminates the application (so effectively your > canvas is responcable > for terminating the application). You could also > maybe set up an event > listener inside the canvas to stop the OpenGL > drawing. > > Hope this helps, > > Gary > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = > Something 2 See! > http://www.vasoftware.com > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > https://lists.sourceforge.net/lists/listinfo/gl4java-usergroup ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com |