make core compile with new js stuff and Task replacement class
[org.ibex.core.git] / src / org / ibex / plat / OpenGL.java
index 040556e..3d0e7cd 100644 (file)
@@ -1,8 +1,10 @@
-// Copyright 2004 Adam Megacz, see the COPYING file for licensing [LGPL]
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the GNU General Public License version 2 ("the License").
+// You may not use this file except in compliance with the License.
+
 // Author: Brian Alliet
 
 package org.ibex.plat;
-import org.ibex.*;
 import org.ibex.js.*;
 import org.ibex.util.*;
 import org.ibex.graphics.*;
@@ -84,8 +86,8 @@ abstract class OpenGL {
             //System.out.println("drawString(): " + text);
         }
 
-        public void drawGlyph(org.ibex.Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) {
-            drawPicture_(((org.ibex.Platform.DefaultGlyph)source).getPicture(), dx, dy, cx1, cy1, cx2, cy2, rgb);
+        public void drawGlyph(org.ibex.graphics.Font.Glyph source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int rgb) {
+            drawPicture_(((org.ibex.plat.Platform.DefaultGlyph)source).getPicture(), dx, dy, cx1, cy1, cx2, cy2, rgb);
         }
         public void drawPicture(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2) {
             drawPicture_(source, dx, dy, cx1, cy1, cx2, cy2, 0xffffffff);
@@ -130,13 +132,13 @@ abstract class OpenGL {
         GLPicture realPicture = null;
     }
 
-    public Font.Glyph _createGlyph(org.ibex.Font f, char c) { return new org.ibex.Platform.DefaultGlyph(f, c); }
+    public Font.Glyph _createGlyph(org.ibex.graphics.Font f, char c) { return new org.ibex.plat.Platform.DefaultGlyph(f, c); }
     
     private native void natDeleteTexture(int tex);
     public void deleteTexture(final int tex) {
         // CHECKME: Is this safe to do from finalize()?
         // natDeleteTexture MUST be run from the message queue thread
-        Scheduler.add(new Task() { public void perform() { natDeleteTexture(tex); }});
+        Scheduler.add(new Callable() { public Object run(Object o) { natDeleteTexture(tex); return null; }});
     }
     
     private static abstract class GLPicture {