O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

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

Lighting

Some of the available materials will take the lighting into account. Qt 3D allows you to add different types of lights to the scene and configure them. You can do that by adding a new Entity to the scene and attaching a DirectionalLightPointLight, or SpotLight component to it. Each of these components has the color property that allows you to configure the color of the light and the intensity property that allows you to choose how bright the light is. The rest of the properties are specific to the light type.

Directional light (also called "distant light" or "sunlight") casts parallel rays in the direction defined by the worldDirection property of the DirectionalLight type. Position and rotation of the entity have no influence ...

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