2003/11/27 05:05:09
[org.ibex.core.git] / src / org / xwt / plat / OpenGL.java
index 359e17a..16f8d75 100644 (file)
@@ -28,7 +28,7 @@ abstract class OpenGL {
         }
     }
     
-    // This MUST be called after OpenGL is instansiated (and activateSharedContext is functioning)
+    // This MUST be called after OpenGL is instansiated (and activateSharedInterpreter is functioning)
     public void init() throws NotSupportedException {
         natInit();
         glVersion = parseVersion(version);
@@ -46,7 +46,7 @@ abstract class OpenGL {
         Log.log(this,"Max rectangular texture size: " + maxRectTexSize);
     }
     
-    protected abstract void activateSharedContext();
+    protected abstract void activateSharedInterpreter();
 
     public static class NotSupportedException extends Exception {
         public NotSupportedException(String s) { super(s); }
@@ -66,7 +66,7 @@ abstract class OpenGL {
         }
         
         // This should activate the drawing context and prepare the double buffer for drawing
-        protected abstract void activateContext();
+        protected abstract void activateInterpreter();
         
         protected static native void drawableInit(int w, int h);
         
@@ -88,7 +88,7 @@ abstract class OpenGL {
         }
 
         private void drawPicture_(Picture source, int dx, int dy, int cx1, int cy1, int cx2, int cy2, int color) {
-            activateContext();
+            activateInterpreter();
             setColor(color);
             GLPicture p = (GLPicture) source;
             p.draw(dx,dy,cx1,cy1,cx2,cy2);
@@ -120,9 +120,7 @@ abstract class OpenGL {
     public void deleteTexture(final int tex) {
         // CHECKME: Is this safe to do from finalize()?
         // natDeleteTexture MUST be run from the message queue thread
-        Message.Q.add(new Message() { public void perform() {
-            natDeleteTexture(tex);
-        }});
+        Scheduler.add(new Scheduler.Task() { public void perform() { natDeleteTexture(tex); }});
     }
     
     private static abstract class GLPicture extends Picture {