Making changes to the main code

Now, if we go to main.cpp, we'll make the following modifications:

  1. We don't need lampShader because we're going to be doing it via a spotlight, so we'll comment out the code. The reason we don't need any sort of lamp shader or anything like that is because what we're going to do in this section is attach the spotlight to, essentially, the camera. You can almost think of it like those helmets with the light on top that people use for rock climbing and that sort of stuff. We're simply going to simulate that because directional light and point lights are great and if you have them static, they're easy to see and understand what is going on. With a spotlight, it really does help if you can move it, and the best ...

Get Learn OpenGL 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.