home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / rec / games / programm / 5188 < prev    next >
Encoding:
Text File  |  1992-12-25  |  2.9 KB  |  59 lines

  1. Newsgroups: rec.games.programmer
  2. Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!etrog!kjb
  3. From: kjb@cgl.citri.edu.au (Kendall Bennett)
  4. Subject: Re: Triple Buffering: NOT!
  5. Message-ID: <kjb.725341734@godzilla.cgl.citri.edu.au>
  6. Sender: news@etrog.se.citri.edu.au
  7. Organization: Collaborative Information Technology Research Institute
  8. References: <1992Dec21.171731.26731@midway.uchicago.edu> <1992Dec22.202057.18233@blkbox> <709@muller.loria.fr> <1992Dec24.185505.27786@mprgate.mpr.ca>
  9. Date: 26 Dec 92 03:48:54 GMT
  10. Lines: 47
  11.  
  12. vanderby@mprgate.mpr.ca (David Vanderbyl) writes:
  13.  
  14. >eker@loria.fr (Steven Eker) writes:
  15. >>If your frame redraw code takes longer than one video frame, one way of speeding
  16. >>things up is to use triple buffering rather than double buffering.
  17. >[explanation deleted]
  18.  
  19. >Triple buffering is completely useless. (Almost) Here's why.
  20.  
  21. >Let's say your screen redraw takes 0.9 of the frame rate time.
  22. >No problem, right?  You simply draw each frame and wait for
  23. >the vertical retrace.
  24.  
  25. >Now let's say your screen redraw takes 1.1 of the frame rate time.
  26. >If the frame rate is 1/30 second per frame then your redraw takes
  27. >1.1/30 of a second.  So in 1 second you need to draw 30 frames for
  28. >a total of 1.1/30 * 30 = 1.1 seconds.  It doesn't matter how many
  29. >buffers you use, you can't do 1.1 seconds worth of drawing in 1
  30. >second.
  31.  
  32. Right, so using double buffering in your example, it takes 1.1/30 seconds
  33. to draw the frame, which is longer than a single frame video refresh.
  34. Note, you _cannot_ flip the page unless the video in inside a vertical 
  35. refresh. In this case, it is not, and you will need to wait an extra
  36. 0.9/30 of a second waiting for the refresh to flip the page, which could
  37. be spent redrawing the next frame in the third buffer. Think about it.
  38.  
  39. >To the person who posted their triple buffering idea:
  40. >Please state that you idea is just that, an idea. (and in this
  41. >case not a very good one.)  It will save a lot of people from
  42. >being misled.
  43.  
  44. Could I please ask that people like you who like to express your
  45. opinons on subjects, continue to do so in a manner that does not offend
  46. anyone. It is very easy to _think_ you know the answer to a subject, but
  47. it is quite possible that your answer is incorrect (MORAL: never take
  48. anything anyone says at face value, always add that pinch of salt...)
  49.  
  50.  
  51. +------------------------------------------+-------------------------------+
  52. | Kendall Bennett                          | Internet:                     |
  53. | RMIT Advanced Computer Graphics Centre   | kjb@citri.edu.au              |
  54. | CITRI Building, 723 Swanston Street      | rcskb@minyos.xx.rmit.oz.au    |
  55. | Carlton Victoria 3053 AUSTRALIA.         |                               |
  56. +------------------------------------------+-------------------------------+
  57. | CoSysop (Bossman), PC Connection Australia:               +61 3 688 0909 |
  58. +--------------------------------------------------------------------------+
  59.