Time for changes in main.cpp

Open the main.cpp file. We will have to do a few modifications to it. The first thing we need to actually uncomment out is lampShader:

// Build and compile our shader program Shader lightingShader( "res/shaders/lighting.vs",  "res/shaders/lighting.frag" ); Shader lampShader( "res/shaders/lamp.vs", "res/shaders/lamp.frag" );

This is because we're using the lamp again since we are dealing with the point light.

The next thing we need to change is the light vertex array object because we're using the lamp shader now. So, uncomment the following code block:

 GLuint VBO, boxVAO; glGenVertexArrays( 1, &boxVAO ); glGenBuffers( 1, &VBO );  glBindBuffer( GL_ARRAY_BUFFER, VBO ); glBufferData( GL_ARRAY_BUFFER, sizeof(vertices), ...

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.