O'Reilly logo

Marmalade SDK Mobile Game Development Essentials by Sean Scaplehorn

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

Using IwGx to render 3D graphics

Remember when we were looking at 2D graphics rendering in Chapter 2, Resource Management and 2D Graphics Rendering, I said we would be using IwGx because it would make the transition to rendering 3D graphics that much easier. Now's the time to see if my claim was true!

In this section, we shall look at how we can implement the 3D equivalent of the "Hello World" program—a spinning cube.

Preparing IwGx for 3D rendering

As with 2D rendering, the very first thing we need to do is initialize the IwGx API by calling IwGxInit, and of course we should call IwGxTerminate at the end of our program.

With IwGx ready to go we next need to set up our projection. We're going to be using a perspective projection, so we need to be ...

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