filled quadric problem

I’m trying to draw a filled cylinder, but it doesn’t seem to be working. Here’s what I have:

GLUquadricObj *quad = gluNewQuadric();
gluQuadricDrawStyle(quad, GLU_FILL);

then, a little bit later,

gluCylinder(quad, 1, 1, 2, 10, 10);

It’s drawing a cylinder, but it’s not filled in. Is there something I’m missing here?

Does anyone have any ideas? I’m considering just drawing circles, at this point, to cap the cylinders, but I’d rather just use GLU_FILL.

I did a quick example which worked and I find it weird yours that it doesn’t fill. By default the quadric should be GLU_FILL so there should be no need to call it.

did you make a glPolygonMode(GL_FRONT_AND_BACK, GL_LINE) call if not you could try and use glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)

try commenting out gluQuadricDrawStyle(quad, GLU_FILL) and see if it works.

I tried commenting it out, but that didn’t make a difference. I also tried adding in the glPolygonMode call, but that didn’t work either. I really have no idea what’s going on…

I put gluDisks on the top of the cylinders, which at least makes it look right, but it’s still very strange that the fill isn’t working.