Jump to content
  • Advertisement

Archived

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

Erunama

Quadrics Problem

This topic is 5893 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

I am currently revising my Pong demo, and I''d like to use an actual circle instead of a square. The program stops when it reaches the gluDisk line however (program has caused an error in GLU32.DLL). So, here''s what I''m doind: GLUquadricObj *circle; Init code:
    circle = gluNewQuadric();
    if(circle = 0) {
        EruLog.Output("   ERROR: Not enough memory to create quadrics object");
        }
    else {
        EruLog.Output("   Quadric object created successfully");
        gluQuadricDrawStyle(circle,GLU_FILL);
        gluQuadricNormals(circle,GLU_NONE);
        gluQuadricTexture(circle,GL_FALSE);
        }
 
Drawing code: gluDisk(circle,0,3,32,32); Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
Erm, shouldn''t it be:

if (circle == 0) {
...

Maybe that''s the problem, it could be setting it to 0 then trying to use it.

Share this post


Link to post
Share on other sites
Ahh, the old C++ brain fart strikes again. Thanks for pointing that out. Didn''t even bother to read through my code thoroughly. I''ve gotten better, but I still assign instead of comparing from time to time. My CS teacher started making people put $0.25 in the poor box everytime she saw a stupid mistake like that.

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!