I want to rotate 2 objects out of 3. One object should remain static. But it’s not happening. Please help. I using glPushMatrix() and glPopMatrix() for the objects that I want to rotate.
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_MODELVIEW);
glLoadIdentity();
drawLine();
glLoadIdentity();
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);
drawAxes();
glPrintX("X");
glPrintY("Y");
glPrintZ("Z");
glPopMatrix();
glFlush();
SwapBuffers(pDC->m_hDC);
wglMakeCurrent(NULL, NULL);
}
With the above code nothing is rotating. I want the drawLine() line should be static while the axis and x,y,z should rotate. Please help how can I achieve this?..Thanks Sujan

Find content
Not Telling