Issue 100: Pb in drawPolygon(points, style=4) for a certain shape
Status:  Fixed
Owner: ----
Closed:  Sep 2009
Reported by awa...@gmail.com, Sep 1, 2009
What steps will reproduce the problem?
1.Draw a polygon based on a list of point this shape (see attached pic)
2.
3.

What is the expected output? What do you see instead?
instead : the displayed inverted v form is not correct

What version of the product are you using? On what operating system?
O.3 win

Please provide any additional information below.
This appears for style=6 but not for style=2

ex :

set_color(0.4,0.4,0.3,0.3)
drawPolygon((100,100,100,50,110,52,115,70,130,60,140,90),6)
set_color(0.5,0.5,0.5,0.4)       
drawPolygon((100,100,100,50,110,52,115,70,130,60,140,90),2)
polygon_pymt.JPG
1.4 KB   View   Download
Sep 2, 2009
Project Member #1 txprog
This is expected, this is how opengl work. Don't use int 2 and 6, but prefer
variables used for GL_BEGIN.

GL_POINTS = 0 	# /usr/include/GL/gl.h:118
GL_LINES = 1 	# /usr/include/GL/gl.h:119
GL_LINE_LOOP = 2 	# /usr/include/GL/gl.h:120
GL_LINE_STRIP = 3 	# /usr/include/GL/gl.h:121
GL_TRIANGLES = 4 	# /usr/include/GL/gl.h:122
GL_TRIANGLE_STRIP = 5 	# /usr/include/GL/gl.h:123
GL_TRIANGLE_FAN = 6 	# /usr/include/GL/gl.h:124
GL_QUADS = 7 	# /usr/include/GL/gl.h:125
GL_QUAD_STRIP = 8 	# /usr/include/GL/gl.h:126
GL_POLYGON = 9 	# /usr/include/GL/gl.h:127

For example.

For your specific problem, when using the GL_TRIANGLE_FAN, start to draw from the
center of your polygon :) (or use GL_POLYGON, it will work)
Sep 2, 2009
Project Member #2 txprog
This issue was closed by revision 97d7e6ea4a.
Status: Fixed