From: sven g. <sgo...@ja...> - 2000-01-24 10:33:15
|
Jean-Yves BRUD wrote: > > Hello, > > I use GL4 to make 3D playing game for children > on both platform mac and pc. > > Thank you for that product, it is very nice. > THANXS ! > I have 2 questions > > 1- In the GLCanvas documentation, it is said that function > public void doCleanup() > is usefull if user needs any cleenUp prior to deleting the GL context. > > I was wondering what king of deleting may be useful since GC do the work > > for us ? Just to cleanup your stuff - memory, your own state variables, ... You do not have to use it ;-) > > 2- I have some memory problem using gljFree but it not easy to isolate > the problem. It seem's to ocure when I create display list between > display calls ... I will try to send more information later. > But what is the real use of this function and is there any restriction ? > > Thanxs, Bye :-) > In the lower example, taken from the demo glLogoCvs.java, gljFree is used to free the gl context. This should be always done, to make this window being avaiable for other threads. public void display() { int i; /* Standard GL4Java Init */ if( glj.gljMakeCurrent(true) == false ) { System.out.println("problem in use() method"); return; } // just render it gl.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); SetCamera(); draw_logo(); /* For your animation dutys ;-) */ glj.gljSwap(); glj.gljCheckGL(); glj.gljFree(); animationCalc(); } > --- > Jean-Yves BRUD Palahou, 31330 LARRA - France > > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > http://lists.sourceforge.net/mailman/listinfo/gl4java-usergroup -- mailto:sgo...@ja... www : http://www.jausoft.com voice : +49-521-2399440, +49-170-2115963; fax: +49-521-2399442 |