Thread: Get real timing in openGL

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    135

    Get real timing in openGL

    i want to have real timing in openGL such as when I file a projectiles, it would shoot for 3 seconds before disappeared. I serach the web but unsure how to do it. Which function should I used to get the timing for the projectiles. timeGetTime(); or glutGet(GLUT_ELAPSED_TIME) or others?What is the difference between both of the functions.

  2. #2
    Registered User
    Join Date
    Apr 2011
    Posts
    135
    Help!!!!!!!!!!!!!!

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Does it matter which you choose?
    Both seem to return milliseconds of elapsed time since some point in the past.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Apr 2011
    Posts
    135
    So, is there any difference between the 2 functions. I want to use the time to count the amount of seconds for projectile to be launch from a gun.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Please tell me you've actually read the manual page for both those functions.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help With Timing
    By BKW++ in forum C++ Programming
    Replies: 2
    Last Post: 03-27-2009, 05:37 PM
  2. Timing
    By MeGaBiTe1 in forum C++ Programming
    Replies: 1
    Last Post: 08-26-2004, 03:06 PM
  3. Timing in C
    By Konrad in forum C Programming
    Replies: 4
    Last Post: 06-24-2003, 01:51 AM
  4. Replies: 7
    Last Post: 12-12-2001, 10:28 AM
  5. How to timing?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 10-21-2001, 06:47 AM