Results 1 to 5 of 5

Thread: glutTimerFunc()?

  1. #1
    Member Newbie
    Join Date
    Jan 2002
    Location
    Rolla , MO USA
    Posts
    36

    glutTimerFunc()?

    I used a timer to frequently call glutPostRedisplay() to show the scene dynamically. But only one frame was rendered, Could you tell me detailed usage of glutTimerFunc()?
    Thanks
    Beet

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: glutTimerFunc()?

    inside the func u call with glutTimerFunc
    post another glutTimerFunc() call
    ie glutTimerFunc will only get called once, it doesnt get called even Xseconds until u turn it off

  3. #3
    Member Newbie
    Join Date
    Jan 2002
    Location
    Rolla , MO USA
    Posts
    36

    Re: glutTimerFunc()?

    Sorry not surely got your point; did you mean, I have to use nested glutTimerFunc()?
    Beet

  4. #4
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Nov 2010
    Posts
    2,466

    Re: glutTimerFunc()?

    void f()
    {
    do stuff
    glutTimerFunc( f, 10 ); // call this function again in 10ms
    }

    int main()
    {
    glutTimerFunc( f, 10 );
    }

  5. #5
    Member Newbie
    Join Date
    Jan 2002
    Location
    Rolla , MO USA
    Posts
    36

    Re: glutTimerFunc()?

    Thank you very much, I've got it done!!
    Beet

Similar Threads

  1. How do I use gluttimerfunc .......?
    By karika in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-01-2015, 04:59 PM
  2. glutTimerFunc
    By jsim1982 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-11-2005, 11:26 PM
  3. Need some help with glutTimerFunc
    By ShinGouki in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 05-09-2003, 12:01 AM
  4. glutTimerFunc() ------- NEED HELP PLEASE
    By zaxxy in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 03-05-2003, 01:08 PM
  5. How to use glutTimerFunc()?
    By beet6 in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 01-18-2002, 06:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean