I am having issues trying to map a texture properly to gluCylinder(). I am trying to make a “cup” shape where the top diameter is different from the bottom diameter.
I don’t know if it’s possible to do this with gluCylinder()… I am trying to avoid creating my own Cylinder.
Maybe I’m misunderstanding, but it seems like you’re making this problem harder than it really is. Why are the letters and white area in your source image arced? I think you’d get what you want if your source image was simply a white rectangle with horizontal lettering.
For example, if you take a McDonalds cup and unroll it, you will see that the text/pictures are skewed/warped to make up for the uneven radii on each end of the cylinder. I am trying to accomplish the same thing here.
… and it also gives you that nice rainbow-like shape
Maybe I am not giving OpenGL enough credit here? Do you think it will do the warping for me if I just do a straight rectangle and wrap it without warping the text?
Not sure what you mean by ‘warping’. If you like the way your letters appear on the cup now, then you could always insert the arced white image you are starting with into a slightly larger white rectangle, leaving the letters untouched. Then map the rectangle to the cup. That should give you pretty close to what you have now without the black areas on the cup.