tags:

views:

96

answers:

1

I am working on a project where I have to create a chain with 12 links in it. I want to create the chain out of two curved segments for the top and bottom of the link ad two cylinders for the straight segments, I intend to use a display list to create one link and then display it over and over after applying some rotation transformations. My question is how can I construct the curved sections?

One idea was to use gluPartialDisk(); swept thru 180 degrees to construct the top and bottom portions. is there a more efficient way of doing this?

PS: Forgot to mention that this was to be in 3D, I guess gluPartialDisk() will not work in this case. I want to use basic OpenGL shapes to create this rather than using 3D modeler, this way I will be able to learn more about OpenGL.

+1  A: 

Assuming you want to use display lists, gluPartialDisk() is probably efficient enough (and it's not worth the effort to implement it yourself).

However, there are methods that are even faster than using display lists themselves. I would highly suggest using vertex arrays or vertex buffer objects.

Zifre