from OpenGL.GL import * from OpenGL.GLUT import * def display(): glClear(GL_COLOR_BUFFER_BIT) glColor3f(0.5, 0.5, 0.0) glBegin(GL_LINES) glVertex3f(-0.5, 0.0, 0.0) glVertex3f(0.5, 0.0, 0.0) glEnd() glFlush() def main(): glutInit(sys.argv) glutInitDisplayMode(GLUT_SINGLE) glutInitWindowSize(640, 480) glutInitWindowPosition(200, 200) glutCreateWindow("Hello Vilag!") glutDisplayFunc(display) glClearColor(0.0, 0.0, 0.0, 0.0) glutMainLoop() main()