Tutorial: Create a basic 3-D application
In this tutorial, we'll show you how to create a 3-D, rotating, multicolored cube using OpenGL ES 1.1 or OpenGL ES 2.0. We'll cover several concepts such as defining the geometry of the cube, initializing our model in both versions, adjusting the model per frame, and how this is called from our main() function.
Starting a new project opens the New BlackBerry Project wizard. If you want to complete the tutorial using OpenGL ES 1.1, choose the BlackBerry 10 OS OpenGL ES 1.1 Application Template Project when you create a new BlackBerry C/C++ project in the QNX Momentics IDE. Or, if you want to use OpenGL ES 2.0 for the tutorial, choose the BlackBerry 10 OS OpenGL ES 2.0 Application Template Project when you create a new BlackBerry C/C++ project in the QNX Momentics IDE. Both of these template projects produce an OpenGL ES application that displays a square on the screen. We'll change this template to display a cube instead of a square.
You will learn to
- Create and configure your project
- Create and color your cube
- Draw the cube with OpenGL ES 1.1
- Draw the cube with OpenGL ES 2.0