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 that
s in it. That`s really strange, because if i add for example a sphere, will show correct texture.
Any ideas will be appreciated.
Thanks