In this chapter, we will discuss point lights. We've covered lighting systems in a bit of depth so far. One technique is directional lights, which essentially are light sources that point in a certain direction, hence the name directional light; but they do not have an original location, that is, they are infinitely far away. So, say for example, we have two objects that are exactly the same, rotated exactly the same way, and there's no other lighting affecting those objects; no matter how far they are away from each other, they will not be affected differently by the directional light source.
-
Book Overview & Buying
-
Table Of Contents
Learn OpenGL
By :
Learn OpenGL
By:
Overview of this book
Learn OpenGL is your one-stop reference guide to get started with OpenGL and C++ for game development. From setting up the development environment to getting started with basics of drawing and shaders, along with concepts such as lighting, model loading, and cube mapping, this book will get you up to speed with the fundamentals.
You begin by setting up your development environment to use OpenGL on Windows and macOS. With GLFW and GLEW set up using absolute and relative linking done, you are ready to setup SDL and SFML for both the operating systems.
Now that your development environment is set up, you'll learn to draw using simple shaders as well as make the shader more adaptable and reusable. Then we move on to more advanced topics like texturing your objects with images and transforming your objects using translate, rotate and scale.
With these concepts covered, we'll move on to topics like lighting to enable you to incorporate amazing dynamic lights in your game world.
By the end of the book, you'll learn about model loading, right from setting up ASSIMP to learning about the model class and loading a model in your game environment. We will conclude by understanding cube mapping to bring advance worlds to your game.
Table of Contents (8 chapters)
Preface
Setting Up OpenGL
Drawing Shapes and Applying Textures
Transformations, Projections, and Camera
Effects of lighting , Materials and Lightmaps
Types of light sources and combining of lights
Implementing a Skybox Using a Cubemap
Other Books You May Enjoy