Let's follow the below mentioned steps to implement the lightmaps:
- In the main code, the first thing you'll need to change is the vertices, because at the moment we've got position and we've got the normals as well. We also need to specify the texture coordinates because we now are using a texture. You can refer to the updated vertices in the main.cpp file inside the Lighting Maps folder. Copy and paste the updated vertices to our main code.
- Next, go to the location where we're binding the vertex and creating the vertex pointers. As we have added a texture system to our code, we need to modify the vertex pointer and the normal attribute slightly. As we've got eight pieces of information in ...