PDA

View Full Version : opengl rendering mesh elements contour problem



sujan.dasmahapatra
1st February 2010, 09:53
Dear Friends
I am creating a set quad elements in opengl QT....assigning each point a distinct color and I am creating these elements in GL_FILL mode so I am getting a contour with different colors for different points. These colors are distributed smoothly over all the element. But in someportions I can see a thin black lines black circles are coming.My background color is black.The mesh is circular..I am not able to find the reason why these black lines or patches are appearing that affecting the overall looks of my contour.

Please help me someone in sorting out this.Any suggestions would be highly appreaciated. Thanks

Please see the code below.
//////////////////////////////////////////////////////
GLuint newlist = glGenLists(1);
glNewList(newlist, GL_COMPILE);
glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(3,GL_FLOAT,0,colorPtr);
glVertexPointer(2, GL_FLOAT, 0, mesh_geom2.vertices);
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
glNewList(newlist, GL_COMPILE);
glDrawElements(GL_QUADS, ptsInBlock*ptsInBlock*blocks*4, GL_UNSIGNED_INT, indices);
glEndList();
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
//////////////////////////////////////////////////////////////

sujan.dasmahapatra
2nd February 2010, 07:07
Dear All Please check the pictures added you can see the contour plot where some lines are seen in black color in the normal direction.
How can I remove them .??