// Author: Brian Alliet
package org.ibex.plat;
-import org.ibex.*;
import org.ibex.js.*;
import org.ibex.util.*;
+import org.ibex.graphics.*;
+import org.ibex.core.*;
+import org.ibex.net.*;
abstract class OpenGL {
static final boolean pretendToBeACrappyVideoCard = false;
//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);
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 Scheduler.Task() { public void perform() { natDeleteTexture(tex); }});
+ Scheduler.add(new Task() { public void perform() { natDeleteTexture(tex); }});
}
private static abstract class GLPicture {
}
private static class MosaicGLPicture extends GLPicture {
- private static final int overlap = 8;
-
int psize;
GLPicture[][] pics;
private static final int min(int a, int b) { return a < b ? a : b; }
public void draw(int dx, int dy, int cx1, int cy1, int cx2, int cy2) {
- int totalWidth = width;
- int totalHeight = height;
// *{x,y}{1,2} key: d=dest s=src, p=bounds of this picture, i=intersection of s and p, pd = dest of this pic
for(int i=0;i<pics.length;i++) {
for(int j=0;j<pics[i].length;j++) {