home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15462 < prev    next >
Encoding:
Text File  |  1992-11-07  |  2.4 KB  |  63 lines

  1. Path: sparky!uunet!olivea!spool.mu.edu!decwrl!concert!rutgers!cbmvax!chrisg
  2. From: chrisg@cbmvax.commodore.com (Chris Green)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: LoadRGB8() ????
  5. Keywords: amiga graphics technical programmer AGA
  6. Message-ID: <36756@cbmvax.commodore.com>
  7. Date: 6 Nov 92 13:42:40 GMT
  8. References: <Bx93A3.B0M@sunlab1.bath.ac.uk>
  9. Reply-To: chrisg@cbmvax.commodore.com (Chris Green)
  10. Organization: Commodore, West Chester, PA
  11. Lines: 50
  12.  
  13. In article <Bx93A3.B0M@sunlab1.bath.ac.uk> ma9tn@sunlab1.bath.ac.uk (T Nettleship) writes:
  14. >
  15. >Having read about the new AGA chipset and it's new graphics
  16. >modes, I have decided to modify a fractal program of my own
  17. >to use the 256 colour register mode.
  18. >
  19. >I have one problem with the conversion. I can open an 8-bitplane
  20. >screen at the appropriate resolutions, and render to it. This
  21. >works fine. However, I can't load the new AGA 24-bit palette
  22. >registers.
  23. >
  24. >I use the graphics library call LoadRGB4(), but this only uses
  25. >12-bit colours, so I am losing a lot of colour definition. What
  26. >I want to know is what is the library offset / registers definition
  27. >for a corresponding 24-bit regs function (which I assume will
  28. >be called LoadRGB8())?
  29. >
  30.     You want to call LoadRGB32.
  31.     LoadRGB32(a0=viewport,a1=table).
  32.  
  33.     "table" is a pointer to a description of what colors to load with
  34. what values. Each entry of the list starts with a word for how many colors
  35. to load, followed by a word for starting color. The color values follow
  36. with 3 longwords for each RGB value. The table is terminated with a 0 count.
  37.  
  38.     So, to load 3 colors the table might be:
  39.  
  40. ULONG table[]={ (3<<16)+0,    /* load 256 color starting at 0 */
  41.         0xffffffff,0,0,    /* color 0=full red    */
  42.         0,0xffffffff,0,    /* color 1=full green    */
  43.         0,0,0xffffffff,    /* color 2=full blue    */
  44.         0        /* terminator */ };
  45.  
  46. a SAS style pragma is:
  47.  
  48. #pragma libcall GBASE LoadRGB32 372 9802
  49.  
  50. for assembly,
  51.  
  52. _LVOLoadRGB32    equ    -$372
  53.  
  54.     Good luck with your program.
  55. -- 
  56. *-------------------------------------------*---------------------------*
  57. |Chris Green - Graphics Software Engineer   - chrisg@commodore.COM      f
  58. |                  Commodore-Amiga          - uunet!cbmvax!chrisg       n
  59. |My opinions are my own, and do not         - icantforgettheimpression  o
  60. |necessarily represent those of my employer.- youmadeyouleftaholeinthe  r
  61. |"A screaming comes across the sky..."      - backofmyhead              d
  62. *-------------------------------------------*---------------------------*
  63.