Git Product home page Git Product logo

Comments (4)

MasDennis avatar MasDennis commented on July 2, 2024

Hi,
Please check this tutorial ("batching geometry"): http://www.rozengain.com/blog/2012/01/16/rajawali-tutorial-4-optimisation/
The key to better performance is shared material, cloning, grouping and setRenderChildrenAsBatch()

from rajawali.

 avatar commented on July 2, 2024

Hello, the example not working too...only one cube showing up...I just copied this stuff to my proejct:

Cube rootCube = new Cube(1.5f);
rootCube.setMaterial(new DiffuseMaterial());
rootCube.addLight(mLight);
rootCube.addTexture(mTextureManager.addTexture(b));
// -- This line indicates that all children will use the same material,
// texture, vertices, indices, etc. The children can have their
// own transformation and color.
rootCube.setRenderChildrenAsBatch(true);
addChild(rootCube);

for(int i=0; i<500; i++) {
// -- Clone from the main object and then set a position and rotation.
BaseObject3D c = rootCube.clone();
c.setPosition(-25f + (float)(Math.random() * 50f), -25f + (float)(Math.random() * 50f), -25f + (float)(Math.random() * 50f));
c.setRotation((float)Math.random() * 360, (float)Math.random() * 360, (float)Math.random() * 360);
rootCube.addChild(c);
}

from rajawali.

MasDennis avatar MasDennis commented on July 2, 2024

Hi,
Are you using one of the Galaxy devices?
If so, please check out the latest code, this was fixed yesterday.

from rajawali.

 avatar commented on July 2, 2024

samunsg galaxy s2, I downloaded the new version, but this still error. not cloning

from rajawali.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.