- void motion(int mousex,int mousey)
- {
- #define num 2220
- GLint h=2;
- GLint winkel=360/h;
- GLintLine list[num];
- static int last=-1;
- list[++last].x =(mousex)-(width/2);
- list[last].y =(mousey)-(height/2);
- glEnable(GL_LINE_SMOOTH);
- if (last>=1) {
- glBegin(GL_LINE_STRIP);
- for(int i=last-1;i<=last;i++){
- glVertex2i(list[i].x,list[i].y);
- }
- glEnd();
- //glRotated(winkel, 0, 0, 1);
- }
- glDisable(GL_LINE_SMOOTH);
- glFlush();
- }
- ....
- int main(int argc, char *argv[])
- {
- ...
- glutMotionFunc(motion);
- ...
- }