For a simple OpenGL code:
Qt Code:
  1. void display(void)
  2. {
  3. glClear(GL_COLOR_BUFFER_BIT);
  4.  
  5. glColor3f (0.0, 1.0, 0.0);
  6. glPushMatrix();
  7. glRotatef(-rotAngle, 0.0, 0.0, 0.1);
  8. glBegin (GL_LINES);
  9. glVertex2f (-0.5, 0.5);
  10. glVertex2f (0.5, -0.5);
  11. glEnd ();
  12. glPopMatrix();
  13.  
  14. glColor3f (0.0, 0.0, 1.0);
  15. glPushMatrix();
  16. glRotatef(rotAngle, 0.0, 0.0, 0.1);
  17. glBegin (GL_LINES);
  18. glVertex2f (0.5, 0.5);
  19. glVertex2f (-0.5, -0.5);
  20. glEnd ();
  21. glPopMatrix();
  22.  
  23. glFlush();
  24. }
To copy to clipboard, switch view to plain text mode 

I mean, whether I could add the lines drawn by OpenGL as a path defined by QPainterPath ?

Then I could operate using the "path" more easily.

Thanks a lot