-// Copyright 2003 Adam Megacz, see the COPYING file for licensing [LGPL]
+// Copyright 2004 Adam Megacz, see the COPYING file for licensing [LGPL]
// Author: Brian Alliet
package org.xwt.plat;
import org.xwt.*;
+import org.xwt.js.*;
import org.xwt.util.*;
abstract class OpenGL {
maxRectTexSize = 0;
rectangularTextures = false;
}
- Log.log(this,"Renderer: " + renderer);
- Log.log(this,"Version: " + version);
- Log.log(this,"Vendor: " + vendor);
- Log.log(this,"Rectangular textures: " + (rectangularTextures ? "supported" : "unsupported"));
- Log.log(this,"Max texture size: " + maxTexSize);
- Log.log(this,"Max rectangular texture size: " + maxRectTexSize);
+ Log.diag(this,"Renderer: " + renderer);
+ Log.diag(this,"Version: " + version);
+ Log.diag(this,"Vendor: " + vendor);
+ Log.diag(this,"Rectangular textures: " + (rectangularTextures ? "supported" : "unsupported"));
+ Log.diag(this,"Max texture size: " + maxTexSize);
+ Log.diag(this,"Max rectangular texture size: " + maxRectTexSize);
}
protected abstract void activateSharedInterpreter();
return oglp.realPicture;
}
- public Picture _createPicture(boolean alphaOnly) { return new OpenGLPicture(alphaOnly); }
+ public Picture _createPicture(JS r, boolean alphaOnly) { return new OpenGLPicture(r, alphaOnly); }
public static class OpenGLPicture extends Picture {
- public OpenGLPicture(boolean a) { alphaOnly = a; }
+ public OpenGLPicture(JS r, boolean a) { super(r); alphaOnly = a; }
boolean alphaOnly;
GLPicture realPicture = null;
}
public OpenGLGlyph(org.xwt.Font f, char c) { super(f, c); }
Picture getPicture() {
if (p == null && isLoaded) {
- p = new OpenGLPicture(true);
+ p = new OpenGLPicture(null, true);
p.data = new int[data.length];
for(int i=0; i<data.length; i++) p.data[i] = (data[i] & 0xff) << 24;
data = null;
super(w,h);
psize = gl.maxTexSize;
while(wastedSpace(w,h,psize) > 0.40) psize/=2;
- Log.log(this,"Using psize: " + psize + " for " + w + "x" + h + " image (wasted space: " + wastedSpace(w,h,psize));
+ Log.info(this,"Using psize: " + psize + " for " + w + "x" + h + " image (wasted space: " + wastedSpace(w,h,psize));
int rows = (h+psize-1)/psize;
int cols = (w+psize-1)/psize;