well jtippets I finally solved my problem here is the code I am using
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
glEnable(GL_TEXTURE_2D);
glGenTextures(8, &texture[1]);
glBindTexture(GL_TEXTURE_2D,texture[0]);
glBegin(GL_POLYGON);
glTexCoord3f(0.0f, 0.0f,0.0f);
glVertex3f(-1.0f, -1.0f, 0.0f);
glTexCoord3f(0.125f, 0.0f,0.0f);
glVertex3f(-1.0f, 1.0f, 0.0f);
glTexCoord3f(0.125f, 1.0f,0.0f);
glVertex3f(1.0f, 1.0f, 0.0f);
glTexCoord3f(0.0f, 1.0f,0.0f);
glVertex3f(1.0f, -1.0f, 0.0f);
glEnd();
glutSwapBuffers();
}