Glut does not refresh screen in Win XP!!
Hi all,
I''ve coded some simple skeletal animation. It uses multimedia timer. It works at office PIV Win 98 but at home at my old PIII , Win XP machine i have to move the mouse on the glut screen while the animation goes on. Is this because glut does not suppport Win XP?
Code is sth like ;
void CALLBACK CAnSequence::TimerFunction(UINT wTimerID, UINT msg, DWORD dwUser, DWORD dw1, DWORD dw2)
{
CAnSequence *seq = (CAnSequence*) dwUser;
seq->m_current_frame++;
if(seq->m_current_frame >= seq->m_frames)
{
seq->m_timer->Stop();
}
seq->Update();
glutPostRedisplay();
}
void animation(void)
{
seq.Play();
glutIdleFunc(NULL);
}
void display(void)
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
seq.m_figure->DisplayDeformed(SOLID);
glutSwapBuffers();
}
void keyboard(unsigned char key, int x, int y)
{
if (key == 27) exit(0);
if( key == ''r'') {
if(xrot == 0) xrot = 4;
glutPostRedisplay();
}
if( key == ''a'') {
glutIdleFunc(animation);
}
}
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement