Making changes to main code to integrate directional light in our world

Now open the main.cpp file, which is used for the actual light and the shaders. Comment out our shader programs, because we're not going to actually use the lamp shader in this section, simply because we don't want any sort of light source with an origin position:

// 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" );

Here we're going to use an array of different cube positions.

// Positions all containers glm::vec3 cubePositions[] = { glm::vec3( 0.0f, 0.0f, 0.0f), glm::vec3( 2.0f, 5.0f, -15.0f), glm::vec3( -1.5f, -2.2f, -2.5f), glm::vec3( ...

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.