|
|
我用下面的函数贴图,可以贴上,但是是乱屏,不知道为什么?
是不是纹理坐标生成的不对?请指教,谢谢!
glPushMatrix();
//bind the texture
glBindTexture(GL_TEXTURE_2D, m_textureObjectOne);
// draw the plane at the world origin
static GLUquadricObj *quadObj1;
quadObj1 = gluNewQuadric();
gluQuadricDrawStyle(quadObj1,GLU_FILL);
gluQuadricNormals(quadObj1,GL_FLAT);
gluQuadricOrientation(quadObj1,GLU_INSIDE);
gluQuadricTexture(quadObj1,GL_TRUE);
gluCylinder(quadObj1,8.0,8.0,10.0,80.0,20.0);
glPopMatrix(); |
|