Archived

This topic is now archived and is closed to further replies.

Glut does not refresh screen in Win XP!!

This topic is 5010 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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); } }

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
call GlFinish(); or GlFlush(); after drawing and before swapping the buffers

Share this post


Link to post
Share on other sites