I am working on creating a routine that will create a 3D object based on the number of sides. 3 sides = pyramid, 4 sides = cube, etc.
I am trying to use the TRIANGLE_FAN option to create a side of the 3D object.
glColor3f( 1.0f, 0.0f, 1.0f )
glVertex3f( 0.0f, 0.0f, 0.0f)
for(i=sides; i < sides; i++)
radi = ((360/sides)/360)* PI // convert rad to deg
glVertex3f(mx, my, 0.0f)
The thing is after the routine run’s there is nothing drawn… Is there something missing? in order to use Triangle_fan?