home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1204 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Amiga programmers in deep shit...
  5. Date: 16 Jan 1996 16:39:53 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Distribution: inet
  8. Message-ID: <4dgkcp$9s5@maureen.teleport.com>
  9. References: <4ccpsd$d8f@maureen.teleport.com> <jdj68ec2xw7.fsf@pulkka.cs.hut.fi>
  10. NNTP-Posting-Host: linda.teleport.com
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Osma Ahvenlampi (Osma.Ahvenlampi@hut.fi) wrote:
  14. : In article <4de1ok$ren@maureen.teleport.com> sschaem@teleport.com (Stephan Schaem) writes:
  15. : > I wrote the above because one claim the OS is all you need to do
  16. : > multimedia software. Writepixel could have been VERY fast if the library
  17. : > supported display list... because the writepixel env would be kept
  18. : > and the speed for the second and next pixel could have been totaly
  19. : > optimal. But CBM only offered that solution... and its plain lame.
  20.  
  21. : WritePixelLine8(), WritePixelArray8(), BltBitMap()....
  22.  
  23.  Read again... do you see your wrong assumtion? Do you know the
  24.  concept of a display list? did you even understand what I was talking
  25.  about?
  26.  
  27.  Having a writepixels(displaylist) is used to write random pixels,
  28.  not to write a Hline...
  29.  
  30.  In the display list you could probably do something like store
  31.  draw(x,y) and setpen(pen). The header sturcture probably hold
  32.  some aray context flag... like defining the type of the
  33.  vsariable x,y,pen. Now here is the inner loop like you would
  34.  see it implemented for type word,word, ubyte on a gfx card supporitng
  35.  a 8bit chunky mode and with no upfront layer.
  36.  (I wont go into the detail unless you are interested)
  37.  
  38. .Loop8    REPEAT    8
  39.     move.w    (a0)+,d0
  40.     bmi.b    .Skyp1
  41.     move.w    (a0)+,d1
  42.     bmi.b    .Skyp2
  43.     cmp.w    d0,d2
  44.     ble.b    .Skyp3
  45.     cmp.w    d1,d3
  46.     ble.b    .Skyp3
  47.     lea    (a1,d0.w),a3
  48.     adda.l    (a2,d2.w*4),a3
  49.     mb    (a0)+,(a3)+
  50.     ENDR
  51.     dbra    d4,.Loop
  52.  
  53.  Now have 5000 pixel in your array... what is faster? The loop above
  54.  calling setpen/writepixel 5000 time?
  55.  
  56.  Real life example: Ploting color coded vector in a 3d modeler
  57.  
  58.  This example apply to lines or any other primitive too,
  59.  but less dramatic.
  60.  
  61.  Stephan
  62.