From: Jean-Yves B. <jea...@wa...> - 2000-10-26 08:02:38
|
Hello Max. 1. == I tried to call several times gljmakeCurrent(true) in the display method and I didn't get any crash on Windows. I use sun jvm from jdk 1.2.2. 2. == When I need to make gl call outside of display() method, I use the following piece of code: ///// synchronized(MyConstants.synchronizator) // MyConstants.synchonizator is a static String used to // synchronize all gl call. { if (canvas.gljmakeCurrent(true)) { GLFunc gl = canvas.getGl(); GLUFunc glu = canvas.getGlu(); // Here all my gl calls... // .... canvas.glFree(); } /////// Maybe it is too heavy code. I don't know if gljmakeCurrent() and glFree() takes lot of time or not to execute. 3. == Anyway, I agree with you: Checking if a GL context is made already current would be nice. Jean-Yves Max Gilead a *crit : > Hello! > > It seems like this message slipped by unnoticed. Since it is important > issue I'm sending it again. > > -------- Original Message -------- > From: Max Gilead <gi...@li...> > Subject: Activating and freeing GL context > To: GL4Java mailing list <gl4...@li...> > > Hello! > > Is there any way of checking if a GL context is made already current > (gljMakeCurrent())? Calling gljMakeCurrent() twice crashes JVM, haven't > checkeg gljFree() twice... but is there some clean way of checking it? > > BTW, is it possible to change GL4Java's behavior from crashing JVM to > just throwing an exception in case of duplicate context activation? This > is true for GL4J 2.4.0.0 and Sun's JVMs 1.2.2 and 1.3rc1 and IBM's 1.3 / > Linux. > > Max > > -- > Max Gilead (gi...@li...) > http://3d.linart.krakow.pl/OfficinaArtificialis > --- > -- XMage: Image / 3D / OpenGL Java library - > http://xmage.sourceforge.net > ----------------------------------------------------------------------------- > -- This email was published on recyclable bytes and no AI was > harmed -- > -- during its > creation. -- > _______________________________________________ > gl4java-usergroup mailing list > gl4...@li... > http://lists.sourceforge.net/mailman/listinfo/gl4java-usergroup -- -------------------------------------- Jean-Yves BRUD POLYQUARK - Ingenierie & Creation 3D Palahou - 31330 LARRA France Tel: 05.62.79.03.33 Fax: 05.62.79.03.38 Mail: jea...@wa... -------------------------------------- |