home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / amiga / misc / 18505 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.8 KB  |  57 lines

  1. Xref: sparky comp.sys.amiga.misc:18505 comp.sys.amiga.graphics:8022 swnet.sys.amiga:182 alt.sys.amiga.demos:1983 comp.sys.amiga.programmer:17330
  2. Newsgroups: comp.sys.amiga.misc,comp.sys.amiga.graphics,swnet.sys.amiga,alt.sys.amiga.demos,comp.sys.amiga.programmer
  3. Path: sparky!uunet!mcsun!sunic!news.lth.se!newsuser
  4. From: dat91lho@ludat.lth.se (Lars Holmgren)
  5. Subject: Double-buffering, Strange things going on! HELP ME!
  6. Message-ID: <1992Dec14.115926.7670@lth.se>
  7. Sender: newsuser@lth.se (LTH network news server)
  8. Organization: Dept. of Computer Science, Lund University, Sweden
  9. Date: Mon, 14 Dec 1992 11:59:26 GMT
  10. Lines: 45
  11.  
  12. Gutten hute alle leute! :-)
  13.  
  14. I'm  having some problems with double-buffered
  15. graphics!
  16.  
  17. Let's say that I'm doing some 3d-calculations and
  18. some plotting of stars (or vector-graphics.)
  19. The main loop would look something like this (pseudo):
  20.  
  21. loop:    swap_screens(1,2)->(2,1)
  22.     show_screen(1)
  23.     clear_screen(2)
  24.  
  25.     calculate_3d
  26.     draw_on_screen(2)
  27.  
  28.     wait_for_Vertical_blanking
  29.     go_to loop
  30.  
  31. This works perfectly as long as everything runs in
  32. one frame (or is it field?), 1/50th s. in PAL. If
  33. the loop needs more time than that it should run
  34. smooth, but slower! (I know that it's not good, but
  35. that's not the point!) However, it looks terrible!
  36. Imagine that I just draw one star and put a delay
  37. to make the loop slow down enough. This will have
  38. the effect of seeing _TWO_ stars, one at the old
  39. position and one at the new! Even if I make the
  40. delay huge enough to make the loop run just once
  41. a sec. the star will seem double for 1/50th sec!
  42.  
  43. HHEELLPP!!
  44.  
  45. Have you met the same problem?
  46. Is there a solution?
  47. Is it my eyes? (And my friends!)
  48.  
  49. PLEASE HELP!
  50.  
  51. /Lars
  52.  
  53. ---------------------------------------------
  54.     Lars Holmgren - dat91lho@ludat.lth.se
  55.     TopasvΣgen 32    (+46)(0)46- 70 99 02
  56.     S-240 21 L÷ddek÷pinge
  57.