[Qt-interest] opengl rendering mesh elements contour problem
Enrico Ros
enrico.qt at email.it
Mon Feb 1 10:58:58 CET 2010
Hello Sujian,
you'll have better results by posting this to an OpenGL forum / mailing
list. This is more specific to Qt.
However:
- if you're running inside a QGraphicsView, make sure you're using
beginNativePainting / endNativePainting
- check your code to see that the array doesn't point to any uninitialized
elements, or to go beyond the actual data set
- I hope the z-buffer is enabled, so you're not referring to back elements
drawn over front elements
My 2 cents,
Enrico
On Monday 01 February 2010 10:51:42 Sujan Dasmahapatra wrote:
> 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);
> //////////////////////////////////////////////////////////////
--
Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
Sponsor:
Conto Arancio ti regala 50 Euro da spendere su Media World on line. Cosa aspetti, aprilo subito!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10036&d=1-2
More information about the Qt-interest-old
mailing list