GL_SMOOTH normals issues

Started by mesomam, March 11, 2011, 13:30:05

Previous topic - Next topic

mesomam

Hi,
I have been looking all over the web for a way to use GL_Smooth in my project and I have found out that it has something to do with vertex normals,
but i wasnt able to make it work for me, can someone in here help me or direct me please to some guide that will tell me how to use them?
My drawing function looks like this:
glClear (GL_COLOR_BUFFER_BIT);
	glPushMatrix();							

	glLoadIdentity();

	x = radius * cos(rotX) * cos(rotY);
	y = radius * sin(rotX);
	z = -radius * cos(rotX)* sin(rotY);

	gluLookAt(x,y,z,0,0,0,0,1,0); 

	glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
	glShadeModel( GL_SMOOTH );

	glutSolidSphere(.5, 20, 20);

	glPopMatrix();
	glutSwapBuffers();


Thanks (=

bobjob

Sorry I dont understand why you are using: glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
how can you tell if its smooth shaded without it being GL_FILL?