PDA

View Full Version : map a glutSolidSphere?



Alexis V Bahena
04-14-2010, 06:28 PM
Hi,
I have a GLuint _textureId;
and I want to map a glutSolidSphere.
How I can do that I have tried many methods and no luck so far.
The last one was using a gluSphere
glPushMatrix();
GLUquadric *qobj = gluNewQuadric();

gluQuadricTexture(qobj,GL_TRUE);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D,_textureId);

glTranslatef(-1.0 ,-1.0 ,-1.0);
glRotatef(_angle, 0.0, 1.0, 0.0);

glTranslatef(1.5, 1, 1.5);

gluSphere(qobj,.2,40,40);
//glutSolidSphere(0.2,40,40);

gluDeleteQuadric(qobj);
glDisable(GL_TEXTURE_2D);

glPopMatrix();
thanks,
Alex