PDA

View Full Version : gluSphere missing faces at end



drarem
10-17-2005, 01:36 AM
Using devc++, nvdia gt 6800, and game programming book.

They use the auxSPhere(), devc++ is missing the glaux.h files - think those are obsolete anyway.

When I draw using gluSphere(), there are faces missing at the end - looks like a pacman. I culled faces, it is definitely a hole there.

here is the code - please help - thank you.


glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();

glTranslatef(0.0f,0.0f,-24.0f);

glPushMatrix ();
glBegin (GL_TRIANGLES);
glColor3f(1.0f, 0.0f, 0.0f);
gluSphere(quadratic,8.2f,16,16);
glEnd ();
glPopMatrix ();

glRotatef(45, 0.5f, 0.5f, 0.5f);
glTranslatef(0.4f,0.2f,tk);
glPushMatrix();
glBegin (GL_TRIANGLES);
glColor3f(0.0f,0.5f,1.0f);
gluSphere(quadratic, 4.8f, 16,16);
glEnd();
glPopMatrix();

drarem
10-17-2005, 02:28 AM
Figured it out, I don't need glBegin() or glEnd() when calling the glu objects.

sorry for the inconvenience.