View Full Version : Texture Mapping
flipper
05-07-2001, 02:45 AM
Does anyone know if you can texture map a cylinder (using gluCylinder, not creating your own from quads). If so, do you do it the same way you would to a cube? Thanks.
Either use OpenGL's automatic texture coordinate generation (glTexGen*), or enable texture coordinate generation through glu when drawing your quadric. Don't know how to do that though, but you can do a search on the net.
Deiussum
05-07-2001, 06:13 AM
GLUquadricObj* pCylinder = gluNewQuadric();
// if you use lighting add
gluQuadricNormals(pCylinder, GLU_SMOOTH);
// For texcoords
gluQuadricTexture(pCylinder, GL_TRUE);
// Replace ... with your cylinder parameters
gluCylinder(pCylinder, ...);
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.