if(m_drawview==4)
  {   glColor3ub(100,100,100);
       auxSolidCylinder(40,200);
//  auxWireCylinder(40,200);
  //        Draw2PipesNodeTool();
  }
为什么我用 auxSolidCylinder(40,200);跟 auxWireCylinder(40,200);
画出的都是网格形式的柱体。 是不是 还需要别的设置啊 ?

解决方案 »

  1.   

    你画的应该是在同一个位置吧,分别在不同的位置画,看看效果。
    辅助库已经过时了,而且没有更新。建议使用glut。
      

  2.   

    当然不是同一个位置了, 我每次屏蔽一个,显示另外一个
    GLUquadricObj *qobj;
            gluCylinder(qobj,40,40,150,2000,2000);
    我这样作图  ,系统告诉我无法为读 ,不知道什么意思
      

  3.   

    GLUquadricObj *qobj;
          
     qobj = gluNewQuadric();
     gluCylinder(qobj,40,40,150,2000,2000);
      

  4.   

    auxSolidCylinder(r,h)
    glPushMatrix(); 
          glRotatef(90,0.0f,0.0f,1.0f);
          glTranslatef(0.0,l,0);
     //   gluCylinder(qobj,r,r,h,10,10);
           auxSolidCylinder(r,h);
    glRotatef(-2*90,0.0f,0.0f,1.0f);
            auxSolidCylinder(r,h);
      // gluCylinder(qobj,r,r,h,10,10);
    glPopMatrix();为什么我用 AUX做的图 转轴命令 起到了作用 而GLU 做的图 却跟第一个圆同心呢????
      

  5.   

    GLUquadricObj *qobj;
          
     qobj = gluNewQuadric();
     这些命令 我都有在前面
      

  6.   

    还是不可以,我的意思是。我用  auxSolidCylinder(r,h);画圆柱的时候 前面的旋转 平衣 都起了作用
    但是 不管是 auxWireCylinder(r,h)还是用auxSolidCylinder(r,h);都是线框式的。  如果用
    gluCylinder(qobj,r,r,h,10,10);则前面的 旋转 命令 不起作用,平移起作用了。我更换了 顺序也没有什么变化
      

  7.   

    是不是 gluCylinder(qobj,r,r,h,10,10);的方向就只能是全局坐标的Z轴啊 
      

  8.   


    我在auxSolidCylinder(r,h);前面加上了glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
    然后 就可以画了,但是如果换成gluCylinder(qobj,r,r,h,10,10);命令的问题 我还是没有能解决