/[gzz]/gzz/gzz/gfx/gl/GL.java
ViewVC logotype

Diff of /gzz/gzz/gfx/gl/GL.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24 by tjl, Wed Dec 4 09:47:09 2002 UTC revision 1.25 by tjl, Wed Dec 4 10:54:22 2002 UTC
# Line 39  import gzz.client.GraphicsAPI; Line 39  import gzz.client.GraphicsAPI;
39   */   */
40  public class GL {  public class GL {
41      public static boolean dbg = false;      public static boolean dbg = false;
42      private static void pa(String s) { System.err.println(s); }      private static void pa(String s) { System.out.println(s); }
43    
44      /** Initialize the native library by creating      /** Initialize the native library by creating
45       * OpenGL contexts and the like.       * OpenGL contexts and the like.
# Line 142  public class GL { Line 142  public class GL {
142          /** During garbage collection: destroy the C++ object associated with this object.          /** During garbage collection: destroy the C++ object associated with this object.
143           */           */
144          public void finalize() {          public void finalize() {
145              if(this.dbg) pa("Finalizing "+this+" "+id);              if(GL.dbg) pa("Finalizing "+this+" "+id);
146              // Would like to              // Would like to
147              //          deleteObj();              //          deleteObj();
148              // but can't due to thread problems.              // but can't due to thread problems.
# Line 154  public class GL { Line 154  public class GL {
154                              RenderInfo info2                              RenderInfo info2
155                              )  { }                              )  { }
156          public void deleteObject() {          public void deleteObject() {
157                if(GL.dbg) pa("DeleteObj "+this+" "+id);
158              deleteObj();              deleteObj();
159              id = 0;              id = 0;
160          }          }
# Line 198  public class GL { Line 199  public class GL {
199              return addToList(list, cur);              return addToList(list, cur);
200          }          }
201          protected void deleteObj() {          protected void deleteObj() {
202              deleteRenderable1(getId());              deleteRenderable0(getId());
203          }          }
204      }      }
205      static private native void deleteRenderable0(int id);      static private native void deleteRenderable0(int id);

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26