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?
Quadrics Problem
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:
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.
if (circle == 0) {
...
Maybe that''s the problem, it could be setting it to 0 then trying to use it.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement