O'Reilly logo

OpenGL ES 3.0 Cookbook by Parminder Singh

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

Navigating the scene with a camera system

In 3D graphics, a camera allows you to navigate through the 3D space; it can be used to perform the rotation and displacement on any arbitrary axis. In OpenGL ES, there is nothing such as a camera. This has to be implemented programmatically. Implementing a camera is extremely simple. In fact, we do not require any specific OpenGL ES APIs for this and it's all about manipulating matrices. In this recipe, we will simulate a first person camera.

How to do it...

Reuse the last implement recipe and perform the following steps to implement the camera system:

  1. Create a Camera.h/.cpp file and define a Camera class derived from Object. This class contains three unit vectors: Left, Up, and Forward, which store directional ...

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