Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: glutTimerFunc...strange results? or is it me

  1. #1
    Intern Newbie
    Join Date
    Apr 2001
    Posts
    36

    glutTimerFunc...strange results? or is it me

    Trying to implement a time, it sorta worked but it starts out really slow and then after a few seconds its going super fast, out of control fast...then it slows down..seem random as hell to me. Is it my code?

    void timefunc(int val)
    {
    if(headrotate >= 360) headrotate = headrotate - 360;
    headrotate -= 5.0;
    glutPostRedisplay();
    glutTimerFunc(1000,timefunc,1);
    }

    And towards the end of my
    Display function I have this line of code

    glutTimerFunc(1000,timefunc,1);

  2. #2
    Intern Newbie
    Join Date
    Apr 2001
    Posts
    36

    Re: glutTimerFunc...strange results? or is it me

    Sorry for that last post, I figured it out..
    I needed the
    glutTimerFunc(.......);
    in my Main() function instead of my display function..

Posting Permissions

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