#includeThis code uses the OpenGL library to create a Cube object and displays it in a window. It uses the glBegin and glEnd functions to define the vertices and colors of the Cube's faces, and the glutSwapBuffers function to swap the front and back buffers of the window. The main function initializes the OpenGL window and sets the display function to the function defined earlier. The package library used in this code is OpenGL. OpenGL is a cross-platform graphics API that is widely used in computer graphics and game development.void display() { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_QUADS); glColor3f(1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, 1.0); glVertex3f(1.0, 1.0, 1.0); glColor3f(1.0, 0.0, 0.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glColor3f(0.0, 1.0, 0.0); glVertex3f(1.0, 1.0, 1.0); glVertex3f(-1.0, 1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glColor3f(0.0, 0.0, 1.0); glVertex3f(-1.0, 1.0, 1.0); glVertex3f(-1.0, 1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); glVertex3f(-1.0, -1.0, 1.0); glColor3f(0.0, 1.0, 1.0); glVertex3f(1.0, 1.0, -1.0); glVertex3f(-1.0, 1.0, -1.0); glVertex3f(-1.0, -1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glColor3f(1.0, 0.0, 1.0); glVertex3f(1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, 1.0); glVertex3f(-1.0, -1.0, -1.0); glVertex3f(1.0, -1.0, -1.0); glEnd(); glutSwapBuffers(); } int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH); glutCreateWindow("Cube"); glutDisplayFunc(display); glutMainLoop(); return 0; }