Twisted cylinders

Hi!
I’ve to draw two twisted cylinders of two different colors, but I can’t import a model because this shape change at runtime.
How can I make this in OpenGL?
Thanks!

Giacomo

Look at the source code for GLU (you can find it for example if you download Mesa www.mesa3d.org))

Adding the twist is very simple (as long as it is along the cylinder center axis) once you figure out how to create the cylinder itself, and that is also very easy.

Give it a try and see for yourself.

I’ve download from mesa3d.org the packagage demos and lib, but I didn’t find any examples of twisted cylinders, can you post some code?
Thanks a lot!

As I said, Mesa has the GLU source for creating a cylinder in OpenGL, to add twisting is pretty simple so you can do that yourself without to much work.