46
Support / different texture on shared mesh
« on: April 05, 2012, 09:57:09 pm »
Can by set different textures on shared mesh? I tried it but texture is same on all objects (or maybe I have something wrong)...
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.
build();
compile(true);
waterMesh = this.getMesh();
waterMesh.setVertexController(new Modificator(), false);
public void apply() {
SimpleVector[] s = getSourceMesh();
SimpleVector[] d = getDestinationMesh();
for (int i = 0; i < polyCount; i++) {
SimpleVector cd = d[i];
SimpleVector cs = s[i];
cd.x = cs.x;
cd.y = height[i];
cd.z = cs.z;
}
}
waterMesh.applyVertexController();
11-30 11:09:33.691: W/dalvikvm(21679): threadid=14: thread exiting with uncaught exception (group=0x40a321f8)
11-30 11:09:33.695: E/AndroidRuntime(21679): FATAL EXCEPTION: Thread-7392
11-30 11:09:33.695: E/AndroidRuntime(21679): java.lang.OutOfMemoryError
11-30 11:09:33.695: E/AndroidRuntime(21679): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
11-30 11:09:33.695: E/AndroidRuntime(21679): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:493)
11-30 11:09:33.695: E/AndroidRuntime(21679): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:549)
11-30 11:09:33.695: E/AndroidRuntime(21679): at com.threed.jpct.util.BitmapHelper.loadImage(BitmapHelper.java:32)
11-30 11:09:33.695: E/AndroidRuntime(21679): at com.threed.jpct.Texture.loadTexture(Texture.java:715)
11-30 11:09:33.695: E/AndroidRuntime(21679): at com.threed.jpct.Texture.loadTexture(Texture.java:703)
11-30 11:09:33.695: E/AndroidRuntime(21679): at com.threed.jpct.Texture.<init>(Texture.java:135)
11-30 11:09:33.695: E/AndroidRuntime(21679): at cz.game.util.ObjectLoader.loadValuesOfObjects(ObjectLoader.java:471)
11-30 11:09:33.695: E/AndroidRuntime(21679): at cz.game.util.ObjectLoader.loadLevel(ObjectLoader.java:314)
11-30 11:09:33.695: E/AndroidRuntime(21679): at cz.game.util.ObjectLoader.load(ObjectLoader.java:203)
11-30 11:09:33.695: E/AndroidRuntime(21679): at cz.game.util.ObjectLoader.run(ObjectLoader.java:116)
11-30 11:09:33.703: W/ActivityManager(188): Force finishing activity com.main/cz.game.main.Demo
for (int i = 0; i < moveMergeIds.size(); i += 2) { // sjednoceni pohybu definovanych objektu (f -> s)
int idf = moveMergeIds.get(i);
int ids = moveMergeIds.get(i + 1);
Object3D object = objectManager.getObject(idf).getDummy();
Object3D dummy = objectManager.getObject(ids).getDummy();
dummy.addChild(object);
}