O'Reilly logo

Android NDK Beginner's Guide by Sylvain Ratabouil

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – rendring 3D graphics with Irrlicht

  1. First, let's get rid of all unnecessary stuff. Remove GraphicsSprite, GraphicsTexture, and GraphicsTileMap and Background header and source files in the jni folder.

    First, we need to clean up the code and rewrite the graphics service.

  2. Create a new file jni/GraphicsObject.hpp, which includes Irrlicht.h header.

    GraphicsObject encapsulates an Irrlicht scene node, that is, an object in the 3D world. Nodes can form a hierarchy, child nodes moving accordingly to their parent (for example, a turret on a tank) and inheriting some of their properties (for example, visibility).

    We also need a reference to a location in our own coordinate format (coming from our Box2D PhysicsService) and the name of the mesh, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required