problem with texture

Haw can I put texture on gluCylinder. I want to put some small texture on one Cylinder.
void studnia(){



GLUquadricObj* studnia;	// pow. wody

glBindTexture(GL_TEXTURE_2D, texture[1]);

studnia = gluNewQuadric();
gluQuadricTexture(studnia, GL_TRUE);
gluCylinder(studnia,4.0, 4.0, 3, 15, 15);


I guess that you should allow GLU to calculate normals for you :

gluQuadricNormals(quadratic, GLU_SMOOTH);

Anyway, you shouldn’t put this :

studnia = gluNewQuadric();

inside the main loop. The quadric object needs to be created only once. You might want to declare ‘studnia’ as a global variable.

Pozdrawiam :wink:

When I was brushing my teeth in the morning and I was thinking what I have done yesterday, I realized that smooth normals don’t have much to do with texture binding. Anyway, it’s worth a try. :wink: