Jump to content
  • Advertisement


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


Qt Problem [wrong source code??]

This topic is 5392 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
You code is correct, please post the full draw function.

Leyder Dylan (dylan.leyder@slug-production.be.tf

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!