Original Post
So far I have this: I pulled the coordinates out of a WRL file so my guess is thier garbage and incompatable with OpenGL due to the fact nothing draws whatsoever not even a screwed up geometry...so I need to be pointed in the right direction of where I can find SOURCECODE for a ring preferrably one that I can specify how many sides it has like in 3d studio max... btw this was taken from 3d studio's tube shape exported as a wrl file...I grabbed the coordinates from there thinking it would work...
float ring_coord[][3] = {0, 0, -62.4, 0, 0, -62.4, 0, 0, -43.09, 0, 0, -43.09,
12.17, 0, -61.2, 12.17, 0, -61.2, 8.407, 0, -42.26, 8.407, 0, -42.26,
23.88, 0, -57.65, 23.88, 0, -57.65, 16.49, 0, -39.81, 16.49, 0, -39.81,
34.67, 0, -51.89, 34.67, 0, -51.89, 23.94, 0, -35.83, 23.94, 0, -35.83,
44.13, 0, -44.13, 44.13, 0, -44.13, 30.47, 0, -30.47, 30.47, 0, -30.47,
51.89, 0, -34.67, 51.89, 0, -34.67, 35.83, 0, -23.94, 35.83, 0, -23.94,
57.65, 0, -23.88, 57.65, 0, -23.88, 39.81, 0, -16.49, 39.81, 0, -16.49,
61.2, 0, -12.17, 61.2, 0, -12.17, 42.26, 0, -8.407, 42.26, 0, -8.407,
62.4, 0, 0, 62.4, 0, 0, 43.09, 0, 0, 43.09, 0, 0,
61.2, 0, 12.17, 61.2, 0, 12.17, 42.26, 0, 8.407, 42.26, 0, 8.407,
57.65, 0, 23.88, 57.65, 0, 23.88, 39.81, 0, 16.49, 39.81, 0, 16.49,
51.89, 0, 34.67, 51.89, 0, 34.67, 35.83, 0, 23.94, 35.83, 0, 23.94,
44.13, 0, 44.13, 44.13, 0, 44.13, 30.47, 0, 30.47, 30.47, 0, 30.47,
34.67, 0, 51.89, 34.67, 0, 51.89, 23.94, 0, 35.83, 23.94, 0, 35.83,
23.88, 0, 57.65, 23.88, 0, 57.65, 16.49, 0, 39.81, 16.49, 0, 39.81,
12.17, 0, 61.2, 12.17, 0, 61.2, 8.407, 0, 42.26, 8.407, 0, 42.26,
0, 0, 62.4, 0, 0, 62.4, 0, 0, 43.09, 0, 0, 43.09,
-12.17, 0, 61.2, -12.17, 0, 61.2, -8.407, 0, 42.26, -8.407, 0, 42.26,
-23.88, 0, 57.65, -23.88, 0, 57.65, -16.49, 0, 39.81, -16.49, 0, 39.81,
-34.67, 0, 51.89, -34.67, 0, 51.89, -23.94, 0, 35.83, -23.94, 0, 35.83,
-44.13, 0, 44.13, -44.13, 0, 44.13, -30.47, 0, 30.47, -30.47, 0, 30.47,
-51.89, 0, 34.67, -51.89, 0, 34.67, -35.83, 0, 23.94, -35.83, 0, 23.94,
-57.65, 0, 23.88, -57.65, 0, 23.88, -39.81, 0, 16.49, -39.81, 0, 16.49,
-61.2, 0, 12.17, -61.2, 0, 12.17, -42.26, 0, 8.407, -42.26, 0, 8.407,
-62.4, 0, 0, -62.4, 0, 0, -43.09, 0, 0, -43.09, 0, 0,
-61.2, 0, -12.17, -61.2, 0, -12.17, -42.26, 0, -8.407, -42.26, 0, -8.407,
-57.65, 0, -23.88, -57.65, 0, -23.88, -39.81, 0, -16.49, -39.81, 0, -16.49,
-51.89, 0, -34.67, -51.89, 0, -34.67, -35.83, 0, -23.94, -35.83, 0, -23.94,
-44.13, 0, -44.13, -44.13, 0, -44.13, -30.47, 0, -30.47, -30.47, 0, -30.47,
-34.67, 0, -51.89, -34.67, 0, -51.89, -23.94, 0, -35.83, -23.94, 0, -35.83,
-23.88, 0, -57.65, -23.88, 0, -57.65, -16.49, 0, -39.81, -16.49, 0, -39.81,
-12.17, 0, -61.2, -12.17, 0, -61.2, -8.407, 0, -42.26, -8.407, 0, -42.26};
void ring(double x, double y, double z) {
int i;
Vector3f n;
Vector3f vec[4];
glEnable(GL_DEPTH_TEST);
glDisable(GL_LIGHTING);
gl_BindMaterial2D( white_mat, NO_BLEND);
gl_AmbientColor( white_mat );
gl_DiffuseColor( white_mat );
gl_SpecularColor( white_mat );
gl_EmissiveColor( white_mat );
gl_Shine( 0.0 );
glPushMatrix();
glTranslated(x,y,z);
glBegin( GL_QUADS );
for(i=0; i<8; i+=4) {
vec[0].x = ring_coord[0];
vec[0].y = ring_coord[1];
vec[0].z = ring_coord[2];
vec[1].x = ring_coord[i+1][0];
vec[1].y = ring_coord[i+1][1];
vec[1].z = ring_coord[i+1][2];
vec[2].x = ring_coord[i+2][0];
vec[2].y = ring_coord[i+2][1];
vec[2].z = ring_coord[i+2][2];
vec[3].x = ring_coord[i+3][0];
vec[3].y = ring_coord[i+3][1];
vec[3].z = ring_coord[i+3][2];
n = makeNormalCoord(vec[0],vec[1],vec[2]);
glNormal3f(n.x, n.y, n.z);
glVertex3f(vec[0].x,vec[0].y,vec[0].z);
glVertex3f(vec[1].x,vec[1].y,vec[1].z);
glVertex3f(vec[2].x,vec[2].y,vec[2].z);
glVertex3f(vec[3].x,vec[3].y,vec[3].z);
}
glEnd();
glPopMatrix();
//glFlush();
glEnable(GL_LIGHTING);
}