CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    GluDisk in MS VC++6.0 & glTranslate problem

    I have a cube and I want to draw a circle around each vertex of the node. I'm trying to do:
    glPushMatrix();
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    glTranslatef(vertex->x,vertex->y,vertex->z);
    GLUquadricObj* glObj =gluNewQuadric();
    gluQuadricDrawStyle(glObj,GLU_LINE);
    gluDisk(glObj,0.999,1.0,8,1);
    gluDeleteQuadric(glObj);
    glPopMatrix();

    Whats happening is that the circle doesnt seem to be drawn at the vertex. Its drawn at origin.
    The help for gluDisk states that it is always drawn on the z=0 plane. But isnt the glTranslatef supposed to take
    care of that.

    Any ideas as to why this's happening. Also, if there's another easier method to do this, please let me know.

    Thanks.
    SR


  2. #2
    Guest

    Re: GluDisk in MS VC++6.0 & glTranslate problem

    Yous should get rid of glLoadIdentity(), try again , good luck!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured