What just happened?

We added a few objects to our scene graph. First, the FirstPersonCameraController object allows the user to freely control the camera. This is quite useful for testing the game while you don't have your own camera controlling code yet. Next, an entity with a single DirectionalLight component works as a light source in the scene. We use the properties of this component to set the color, intensity, and direction of the light.

Finally, we added an entity that represents a regular 3D object. Its shape is provided by the CuboidMesh component that generates a unit cube. The appearance of its surface is defined by the DiffuseSpecularMaterial component that conforms to the widely used Phong reflection model. You can use ambient ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.