Anyone else having this problem;
http://www.jpct.net/wiki/index.php/Main_Page
The search box can't be clicked in.
Works fine in Opera.
http://www.jpct.net/wiki/index.php/Main_Page
The search box can't be clicked in.
Works fine in Opera.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteIf you want to replace a texture in the tm, why don't you use the replaceTexture-method?
QuoteIf you want to replace a texture in the tm, why don't you use the replaceTexture-method? A faster way (if appropriate) would be to use an ITextureEffect to update the texture's content.
private void updatedTexture(String Texturename, String text) {
Log.i("add", "update texture triggered with:"+Texturename+"|"+text);
paint.setColor(Color.BLACK);
Bitmap.Config config = Bitmap.Config.ARGB_8888;
FontMetricsInt fontMetrics = paint.getFontMetricsInt();
int fontHeight = fontMetrics.leading - fontMetrics.ascent
+ fontMetrics.descent;
int baseline = -fontMetrics.top;
int height = fontMetrics.bottom - fontMetrics.top;
// have to add multiline support here
Bitmap charImage = Bitmap.createBitmap(closestTwoPower((int) paint
.measureText(text) + 10), 32, config);
Canvas canvas = new Canvas(charImage);
canvas.drawColor(Color.WHITE);
canvas.drawText(text, 10, baseline, paint); // draw text with a margin
// of 10
TextureManager tm = TextureManager.getInstance();
Texture testtext = new Texture(charImage, true); // the true specifys
// the texture has
// its own alpha. If
// not, black is
// assumed to be
// alpha!
//
if (tm.containsTexture(Texturename)) {
Log.i("add", "updating texture="+Texturename);
tm.removeAndUnload(Texturename,fb);
Log.i("add", "updated texture="+Texturename);
tm.addTexture(Texturename, testtext);
} else {
tm.addTexture(Texturename, testtext);
}
}
Camera worldcam = world.getCamera();
worldcam.getBack().setIdentity();
float Z = xyzAngles.z;
float Y = xyzAngles.y;
float X = xyzAngles.x;
//worldcam.rotateCameraAxis(new SimpleVector(0,1,0), -Z);
//worldcam.rotateCameraAxis(new SimpleVector(1,0,0), X);
//worldcam.rotateCameraAxis(new SimpleVector(0,0,1), -Y);
worldcam.rotateCameraAxis(new SimpleVector(0,1,0), -0.081920266f);
worldcam.rotateCameraAxis(new SimpleVector(1,0,0), 0.5303804f);
worldcam.rotateCameraAxis(new SimpleVector(0,0,1), 0.84379244f);
Quote from: raft on August 12, 2010, 01:24:46 AM
java.util package greatly simplifies these kind of things
Set<String> oldNames = textureManager.getNames();
// download and load your model here
Set<String> newNames = textureManager.getNames();
newNames.removeAll(oldNames);
// now newNames contains the new texture names
Page created in 0.013 seconds with 9 queries.