HELP! how to use glPolygonMode( ) ?

Hi,
I have a primitive with glBegin(…) & glEnd(). I want to toggle between the shading & wire-frame, I’ve tried glPolygonMode(), but it fails.

So, please HELP me! Thanks a lot.

AQ

Should be pretty straight forward:

glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
or
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);

then

glBegin();

glEnd();

Yeah, thanks

I just solved it.