// shows one face of a cube #include "stdafx.h" #using using namespace System; #include void display() { glClear(GL_COLOR_BUFFER_BIT); glutWireCube(0.5); glutSwapBuffers(); } void init() { glClearColor(0.0, 0.0, 0.0, 0.0); glColor3f(1.0, 1.0, 1.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1.0, 1.0, -1.0, 1.0,-1.0,1.0); } void main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB); glutInitWindowSize(500, 500); glutInitWindowPosition(0, 0); glutCreateWindow("wire cube"); glutDisplayFunc(display); init(); glutMainLoop(); }