Texture problem

I`m new to OpenGL, i found some tutorials about texturing, but i got some problems…

GLUquadric *name;
GLuint nameTexture;

void test (void) {
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glEnable ( GL_TEXTURE_2D );
glBindTexture ( GL_TEXTURE_2D, nameTexture);

glBegin(GL_QUADS);
// Test!
glVertex3f(-1,-1,-1);
glVertex3f(1,-1,-1);
glVertex3f(1,-1,1);
glVertex3f(-1,-1,1);
glEnd();
glDisable ( GL_TEXTURE_2D );
}
void init (void)
{
name = gluNewQuadric();
gluQuadricTexture( name, GL_TRUE);
pereteTexture = LoadBitmap(“name.bmp”);
}

Right now, i cant see the texture but only the main color thats in it. That`s really strange, because if i add for example a sphere, will show correct texture.

Any ideas will be appreciated.

Thanks

You need to set a different texture coordinate for each vertex. By default it should be something like 0,0
For the sphere, I guess you use something that already generates both texcoords and vertex positions.

I fixed it, thanks.