PDA

View Full Version : This is driving me crazy!



10-12-2002, 10:02 AM
When I uncomment the call to glutWireCone, which makes a pyramid, nothin happens! No pyramid's drawn. But when I comment it out and call glutWireCube, the cube is drawn. What's happening? I ain't got the time. Gotta invade Iraq.

void display()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
//glLoadIdentity();

glPushMatrix();
glColor3f(0.98, 0.625, 0.12);
glTranslatef(housetrans[0], housetrans[1], housetrans[2]);
glutWireTeapot(20.0);
glPopMatrix();

glPushMatrix();
glColor3f(0.0, 1.0, 0.0);
glTranslatef(pyratrans[0], pyratrans[1], pyratrans[2]);
glutWireCube(30);
//glutWireCone(100.0, 50.0 * sqrt(3), 4, 0);
glPopMatrix();

glutSwapBuffers();
}

jmg
10-12-2002, 10:22 AM
> I ain't got the time.

If you don't, then what makes you think someone else here does? http://www.opengl.org/discussion_boards/ubb/smile.gif

10-12-2002, 12:55 PM
Sorry, if I sound pushy. I don't intend to be. Just trying to add some humor to this board.

*Aaron*
10-12-2002, 01:09 PM
Try giving the message subject a more descriptive name next time.

nexusone
10-12-2002, 01:30 PM
To add humor, you would have to be funny...



Originally posted by George W. Bush:
Sorry, if I sound pushy. I don't intend to be. Just trying to add some humor to this board.

jmg
10-12-2002, 07:28 PM
> To add humor, you would have to be funny...

Oooo that's cold. http://www.opengl.org/discussion_boards/ubb/smile.gif

Ok, anyhow, what happens when you comment out the cube and just draw the cone?

Is it possible the cone is being drawn inside the cube? Why not?

Are you using depth testing? Should it matter with glutWireFOO()?

10-12-2002, 07:45 PM
When I comment out the call to glutWireCube and include only glutWireCone, the wire cone is not drawn, but the teapot is. And what is depth testing? I am a beginner. I have glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) in my main function. Is that it?

zeckensack
10-12-2002, 09:25 PM
Originally posted by George Bush:

glutWireCone(100.0, 50.0 * sqrt(3), 4, 0);

I guess that's the problem.
Try using 1 or 2 (I've never used these glut object drawing functions but it seem logical that zero stacks is wrong).

10-13-2002, 05:59 AM
I changed the zero to one, and it drew the pyramid. Thanks. However, when I compiled the program in my college using GNU C on NetBSD, OpenGL drew the pyramid with the number of stacks being zero. At home, using Borland C++ 5.5 on Windows 2000, it didn't draw the pyramid with zero stacks.

Bob
10-13-2002, 06:48 AM
Since a cylinder need at least one stack, I would guess the behaviour with zero stacks is undefined. Some implementations may ignore the solid, some may draw it with one stack. If it's undefined, any behaviour is "correct".

Jan
10-13-2002, 11:04 AM
Originally posted by George Bush:
Gotta invade Iraq.


Funny, really funny. Next time you should note that this is not an "americans-only" board. There are people in this world, who may have different opinions about war, than you do (but those will be dead in some years, because as Bush expressed: "either you are a friend or an enemy").
Also i donīt like your name, and i donīt think G. W. Bush writes OpenGL-Apps in his free time.

I think we all should stick to OpenGL stuff on this board.

Jan.

10-14-2002, 03:30 PM
I don't support the war on Iraq. In fact, I will attend the March on Washington on October 26 to protest the war on Iraq. It was just trying to imitate Bush. End of discussion. Also, when I call glWireCube with one stack, the same picture is drawn as with zero stacks.

10-14-2002, 03:33 PM
I meant glWireCone.

10-14-2002, 03:38 PM
On NetBSD, that is.

jmg
10-14-2002, 04:18 PM
> when I call glWireCube with one stack,
> the same picture is drawn as with zero
> stacks.

As Bob said, the behaviour with 0 stacks is undefined. The correlation you note is simply a coincidence.