Question: 1A. Write a C or C++ program that draws a triangle and a box. The triangle should be placed on top of the box and
1A. Write a C or C++ program that draws a triangle and a box. The triangle should be placed on top of the box and just touching the box (see the picture below). Your program shall have one window with the two objects displayed in the center.
1B. Write comments for each line of code, explaining what this line does.
1C. On Windows, you must use freeglut, glew, glm, and SOIL libraries. On other platforms, if you are unable to make OpenGL work, you may use WebGL.
1D Must use shader-based OpenGL (OpenGL 3.x) to implement the program. DO NOT use old, fixed-function OpenGL APIs (OpenGL 1.x or 2.x) such as glBegin(), glVertex3f(), glTranslate(), glPushMatrix(), etc.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
