Hello,
My program uses wxGLCanvas and GLUT to draw polygons. It works great on my own computer.
However, the drawing window has different results when I execute the program on other machine.
The first picture shows the result on my computer, and the second pic shows the results on other computer. There is space between triangles in the second pic. I use gluPartialDisk() to draw the circle, so it's not the floating round off problem.
I use wxWidgets 2.6.3 and VC 2005 express to build the program in static library mode. I tried to copy glut32.dll to other computer, but the results are the same. Can sb tell me what the problem is?
Polygons are not drawn perfectly in Opengl Topic is solved
Hi jjoe,
I got this exact same problem in an application I was writing last year. It seems to be a problem with using the smoothing options in OpenGL.
I had this code in my OpenGL initialisation function:
But found if you comment out the lines to do with polygons and just leave line anti-aliasing in then it solves the problem:
Regards,
Dan
I got this exact same problem in an application I was writing last year. It seems to be a problem with using the smoothing options in OpenGL.
I had this code in my OpenGL initialisation function:
Code: Select all
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
Code: Select all
glEnable(GL_LINE_SMOOTH);
//glEnable(GL_POLYGON_SMOOTH);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
//glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
Dan