O'Reilly logo

Beginning Python Games Development : With Pygame, Second Edition by Will McGugan, Harrison Kinsley

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

CHAPTER 12

image

Setting the Scene with OpenGL

You’ve come quite far with OpenGL, having learned how to render and manipulate objects in a 3D scene. In this chapter, we will cover lighting in more detail and introduce you to other OpenGL features that will help you to add polish to your game.

Understanding Lighting

I introduced you to OpenGL’s lighting capabilities in Chapter 7, but glossed over some of the details. In this section, we will explore how to work with lights and use them to add greater realism to a 3D scene.

OpenGL uses the normals that you assign to the vertices or faces of a model to calculate the color of light that will be seen by ...

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