I have 3 objects on the screen, I want to rotate onll 2 objects the axis
and X,Y,Z. Another line is there which I want not to rotate. But with this
code below all are moving. Check below my DrawScene function.

[code]

void CopenGLCoordView::DrawScene(CDC *pDC)
{
    wglMakeCurrent(pDC->m_hDC, m_hrc);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glEnable(GL_DEPTH_TEST);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();


    if (wd <= ht)
    glOrtho(left, right, top*ht/wd, bottom*ht/wd, znear, zfar);
    else
    glOrtho(left*wd/ht, right*wd/ht, top, bottom, znear, zfar);


    glPushMatrix();
    glRotatef(rot[0], 1.0f, 0.0f, 0.0f);
    glRotatef(rot[1], 0.0f, 1.0f, 0.0f);
    glRotatef(rot[2], 0.0f, 0.0f, 1.0f);
    glCallList(axes);
    glPrintX("X");
    glPrintY("Y");
    glPrintZ("Z");
    glPopMatrix();

    drawLine();  //This is also moving...i want this to not to move...


    glFlush();
    SwapBuffers(pDC->m_hDC);

    wglMakeCurrent(NULL, NULL);
}

[/code]

-- 
Regards
Sujan
http://www.sujantechnologies.com/
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to