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

  1. Path: informatik.tu-muenchen.de!fischerj
  2. From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: WritePixelArray vs. ClipBlit vs. ...
  5. Date: 30 Jan 1996 15:30:16 GMT
  6. Organization: Technische Universitaet Muenchen, Germany
  7. Distribution: world
  8. Message-ID: <4eldi8$5j9@sunsystem5.informatik.tu-muenchen.de>
  9. References: <oj6ka2yity1.fsf@hpsrk.fc.hp.com> <sqoWx*NA0@mkmk.in-chemnitz.de>  <4e9dju$ron@sunsystem5.informatik.tu-muenchen.de> <oj6n379tmab.fsf@hpsrk.fc.hp.com>
  10. NNTP-Posting-Host: hphalle7g.informatik.tu-muenchen.de
  11. Originator: fischerj@hphalle7g.informatik.tu-muenchen.de
  12.  
  13.  
  14. In article <oj6n379tmab.fsf@hpsrk.fc.hp.com>, koren@hpsrk.fc.hp.com (Steve Koren) writes:
  15. |> 
  16. |> fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) wrote:
  17. |> 
  18. |> > : > This is annoying.  Is there any way to do case D) easier than what I am
  19. |> > : > thinking?
  20. |> > 
  21. |> > I do not quite get what you want to do. Looks like your engine renders
  22. |> > planar on AGA and chunky on gfx-card. This should give 10 times more work
  23. |> > than adapting the copy routines. I'm really wondering...
  24. |> 
  25. |> Right now my engine never renders planar (it will run without a graphics
  26. |> card, but I don't consider systems without graphics cards useful, so I
  27. |> don't care about optimizing for that case).  It renders 24 bit truecolor
  28. |> for 16 and 24 bit gfx card modes, and it renders 8 bit LUT for 8 bit
  29. |> register modes.  WritePixelArray(cybergraphics.library) and
  30. |> WritePixelArray8(graphics.library) are used, accordingly.  I would
  31. |> prefer to *always* render 24 bit, but there doesn't seem to be an easy
  32. |> way to blit a 24 bit bitmap to an 8 bit screen and have the remappinng
  33. |> work.  So, failing that, I do more work in my code to render either 8
  34. |> bit LUT or 24 bit truecolor graphics depending on the screen I'm going
  35. |> to be talking to.
  36. |> 
  37. |> > Also why 24bit mode. you want to play the 8bit chunky game also when
  38. |> > 24bit is present I guess. Or do you even have a 24bit version of your
  39. |> > rendering engine.
  40. |> 
  41. |> Well, it is not a game, it is an application.  It would prefer to always
  42.  
  43. So if you don't do animations where converting to planar cares,
  44. writepixelarray8(gfx.lib) is sufficient for any 8bit screen on any
  45. gfx-system (AGA and cards).
  46.  
  47. |> deal with 24 bit color space.  I did briefly consider always rendering
  48. |> to 24 bit internally, and using ObtainBestPen() on each pixel before
  49. |> displaying to achieve the truecolor->LUT conversion.  However, this is
  50. |> *terribly* slow on a 68040/25.  ObtainBestPen() is no practical for use
  51.  
  52. mhm I don't know, is obtainpen() one of that workbench-colorsharing
  53. routines ? Or is the conversion 24bit-> 8 bit done by you ?
  54. Ever though about using HAM8 ? There is a way on AGA to get Workbench
  55. into HAM8 mode with just clicking on a (selfmade) prefs-icon BTW.
  56. Rendering to HAM also needs its time, but at least the result is better.
  57.  
  58. |> on every pixel in a large image.  So instead I obtain some pens up front
  59. |> and render using them, if I'm on a LUT screen.
  60. |> 
  61. |> > anyway it's no wonder that updating a 256 color window on a 24bitscreen
  62. |> > needs some time (colortable lookup...)
  63. |> 
  64. |> Yes, but it is far slower than I can explain by doing lookups.  If it
  65. |> was just doing one color table lookup per pixel, it should be much
  66. |> faster (compared to WritePixelArray)) than it is.  So I don't understand
  67. |> why it is so slow now.
  68.  
  69. ? I thought you explained 24->8. 8->24 is slow seen from games, but
  70. fast seen from a rendering program.
  71.  
  72. |> 
  73. |> > : I'm afraid not, except waiting for true RTG. As far as I understood
  74. |> > : it, RTG would provide automatic format conversion when blitting
  75. |> > : between any bitmap formats.
  76. |> > 
  77. |> > huh ? Current functions do this, too. writeparr8, blitbitmap...
  78. |> > if they don't, imho the gfxcard driver is not ok.
  79. |> 
  80. |> They do in some cases, but not all.  I can blit an 8 bit array of pen
  81. |> values to a 16 or 24 bit screen (although quite slowly).  But I cannot
  82. |> blit a 24 or 16 bit truecolor array of data to a LUT screen mode.  I
  83. |> believe that's what the poster above means.  Some systems do this -
  84. |> applications can always speak 24 bit, and any necessary remapping is
  85. |> done at display time.
  86.  
  87. if you got multiple windows needing different pallete it becomes
  88. more difficult..
  89.  
  90. |> 
  91. |>    - steve
  92. ------------------------------------------------------------------------
  93.    fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer)   =:)
  94.  
  95.