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 6 of 6

Thread: simple animation w/glut

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2000
    Location
    Woodland Hills, CA, USA
    Posts
    6

    simple animation w/glut

    I'm trying to "roll" a ball across a flat surface (something like miniature golf). I'm running into a few issues trying to animate the scene.

    I've been following the example of a rotating cube from ch.1 of the red book. What I've ended up with a lot of flicker.

    The red book doesn't say much else on animation, so I'm somewhat at a loss.

    Thanx to anyone who can help.

  2. #2
    Guest

    Re: simple animation w/glut

    double buffered? code please...

  3. #3
    Intern Newbie
    Join Date
    Jul 2000
    Location
    Australia
    Posts
    48

    Re: simple animation w/glut

    When you initialize glut..... use this....

    glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );

    and in your display code at the end...... your mostly using this line....
    glFlush();

    well replace that with this....
    glutSwapBuffers();

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    547

    Re: simple animation w/glut

    and in your display code at the end...... your mostly using this line....
    glFlush();B]
    sorry to go into annoying teacher mode. "your" should be "you're", short for, "you are". One of the few things that irritates me........

  5. #5
    Junior Member Newbie
    Join Date
    Nov 2001
    Posts
    7

    Re: simple animation w/glut

    Well where is your capital 'S' Rob? Must we get into picky little things like that? I thought this was an OpenGL board?

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    May 2000
    Location
    Oxford, England
    Posts
    547

    Re: simple animation w/glut

    Sorry with a capital S. Good use of grammar and spelling is fairly important from a software engineering side of things. It does make reading code somewhat easier.
    However, the use of "your" as apposed to "you're" is fairly niggly.

    The worst is the use of color instead of the correct spelling colour. The cause of many wasted minutes removing or adding u's in source code.

    [This message has been edited by Rob The Bloke (edited 12-08-2001).]

Posting Permissions

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