OpenGL Polygon Rendering inconsistency -


i using opengl simple commands demonstration purpose in project. well, project similar mesh rectangle region set of small convex polygons. first, tried render rectangle region in unfilled mode using following code.

void draw_boundary_unfilled(const double line_width,const double red, const double      green, const double blue) const     {         gllinewidth(line_width);         glcolor3d(red,green,blue);          glpolygonmode(gl_front,gl_line);         glbegin(gl_polygon);         (unsigned = 0; < polygon::size(); ++i)         {             const point& pi = polygon::vertex(i);             glvertex2f(pi.x(), pi.y());         }         glend(); } 

note: "polygon" container in stored vertices of either rectangle or convex polygons.

it worked rectangle region. after did mesh thing, tried use same code rendering each small convex polygons within rectangle. showed me, however, whole filled rectangle region in had no way tell edges of each convex polygon . seemed inconsistency. idea problem?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

qt - Errors in generated MOC files for QT5 from cmake -