I made this program to give an example of working code in C++.
I implemented everything including the shaders (very simple ones).
I generate the cubes and the disposition using one class to handle the generation and a class representing the cubes.
Every frame the camera moves (not the cubes) around the circle.
I generate the colors of the cubes according to their position in the circle.
The light is hardcoded in the shader.
The source code is in the subfolder OpenGLDemo.