Archived

This topic is now archived and is closed to further replies.

Qt Problem [wrong source code??]

This topic is 5174 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi people, i have a problem moving from tutorial 2 to tut 3 using Qt. I tried to use smooth coloring for the triangle but it OpenGL (??) just sets the last color i use between the glbegin and glend command. This is my code: glBegin(GL_TRIANGLES); // Drawing Using Triangles glColor3f(1.0f,0.0f,0.0f); glVertex3f( 0.0f, 1.0f, 0.0f); // Top glColor3f(0.0f,1.0f,0.0f); glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left glColor3f(0.0f,0.0f,1.0f); glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glEnd(); // Finished Drawing The Triangle The rest is exactly the code from the Qt/C++ example in the second tut. Why isn''t this working?? Is is a Qt - widget problem?? Thx for any help. VisionD

Share this post


Link to post
Share on other sites