How to rotate a 2D line in PyOpenGL?
问题 I've written a code to draw a line. Here is the function: def drawLines(): r,g,b = 255,30,20 #drawing visible axis glClear(GL_COLOR_BUFFER_BIT) glColor3ub(r,g,b) glBegin(GL_LINES) #glRotate(10,500,-500,0) glVertex2f(0,500) glVertex2f(0,-500) glEnd() glFlush() Now I'm trying to rotate the line. I'm trying to follow this documentation but can't understand. According to the documentation the rotating function is defined as follows: def glRotate( angle , x , y , z ): I've no z-axis. So I'm