QT-OpenGl Vertex not redrawing -


I have a simple open glow program that I change spinner again. When the PentGL method changes the color of my top triangle, but the number of them (which is based on spinner) does not.

My code is as follows:

  zero GLWidget :: paintGL () {glLoadIdentity (); GlMatrixMode (GL_MODELVIEW); GlychLear (GLCOLORBUUFFARBAB | GL_DEPTBUFFABABT | GLOOLOR OR); Glucaller (0.0, 0.0, 0.0, 0.0); {GlBegin (GL_TRIANGLE_FAN) for (int i = 0; i & lt; numVertex; i ++); DrawTriangle (i); GlEnd (); } QDebug ("numVetex% d", numVertex); }; Zero GLWidget :: drawTriangle (int iteraction) {float theta = liveincrement * interaction; Float x = radius * qCos (theta); Float y = radius * qSin (theta); Double R = ((double) rand () / (RAND_MAX)); Double G = ((double) rand () / (RAND_MAX)); Double B = ((double) rand () / (RAND_MAX)); GlColor3f (R, G, B); GlVertex3f (0.0f, 0.0f, 0.0f); GlVertex3f (x, y, 0.0f); Theta = thetaIncrement * (iteraction +1); X = radius * qCos (theta); Y = radius * qSin (theta); GlVertex3f (x, y, 0.0f); }   

Even if I do not attract anything for example, then at the top, I also return to PaintAge, Is still shown on the screen.

Any recommendation?

Delete your GL_COLOR part in your glacular call is not a valid argument:

  Glitchier (GL_Collo_b_BFFER_BIT | GL_DEPTH_BUFFER_BIT);    

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

c# - How to clone a HttpRequestMessage when the original request has Content? -

split - php explode string with Uppercase if lowercase letter exists before it without space -