106
Bugs / Re: setScale doesn't seem to work for serialized objects.
« on: March 05, 2012, 11:40:09 pm »
Ok, I'll create one now.
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.
tvScore = new TextView(this);
tvScore.setText("-");
ll = new LinearLayout(this);
ll.addView(tvScore);
this.addContentView(ll, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
Runs fine so far @52-57fps on a Nexus S/Android 4.0. Judging from the log output, you might want to consider to use shared data for the meshesThanks. I missed that one. I have now included it and it helped improved fps/load speed.
Maybe the SkyBox-class does something that prevents this from working...i'll look into it.Ok thanks.
skyBox = new SkyBox("stars", "stars", "stars", "stars","stars", "stars", 200);
Object3D skybox3DObj = skyBox.getWorld().getObjects().nextElement();
tileTexture(skybox3DObj, 2);
private void tileTexture(Object3D obj, float tileFactor) {
PolygonManager pm = obj.getPolygonManager();
int end = pm.getMaxPolygonID();
for (int i = 0; i < end; i++) {
SimpleVector uv0 = pm.getTextureUV(i, 0);
SimpleVector uv1 = pm.getTextureUV(i, 1);
SimpleVector uv2 = pm.getTextureUV(i, 2);
uv0.scalarMul(tileFactor);
uv1.scalarMul(tileFactor);
uv2.scalarMul(tileFactor);
int id = pm.getPolygonTexture(i);
TextureInfo ti = new TextureInfo(id, uv0.x, uv0.y, uv1.x, uv1.y,
uv2.x, uv2.y);
pm.setPolygonTexture(i, ti);
}
}
The remaining question is: Why would you want to? A tiled sky isn't a real sky anymore, isn't it?Since some devices are very low in memory this is one way to save memory. Get a tileable texture and it will look perfect(stretching small images are ugly). For example my spaceship game, space can tile easy
It should be possible to improve this. I'll create myself a test case this evening and see if i can improve it.Awesome stuff.
But lines without AA in ES 2.0 are fine?Other than still being just about as slow, yep they were fine.
mGLView.setEGLConfigChooser(new GLSurfaceView.EGLConfigChooser() {...
That problem is solved