OpenAmiga (55/964)

From:Patrick Roberts
Date:5 Sep 2000 at 12:30:01
Subject:Re: AMIOPEN: Dev Questions

Thanks Daniel!

Q&A #008 posted to the Faq-O-Matic under GFX.

-Pat

Daniel Adler wrote:
>
> Hi Pat,
> here's an answer to question 8
>
> >-------------------------------------------------------------------
> >008
> >-------------------------------------------------------------------
> >Q: How can pixels be directly written to a pixmap frame buffer?
>
> 1. Allocate memory for the given size of the pixmap frame buffer.
> 2. Open a specific pixmap instance and give it the pointer of your
> allocated memory
> 3. Write to the memory, and call update on the pixmap-object
>
> example:
> qcall lib/malloc,(640*480*4:buf)
> qcall ave/avo/pix/32bit/open,(buf,640,480,640*4:pix)
>
> cpy $FF000000,[buf]
> ncall pix,update,(pix:-)
> --
> so long,
> plex
> Subscribe/Unsubscribe: open-request@amiga.com
> Amiga FAQ: http://www.amiga.com/faq.html
Subscribe/Unsubscribe: open-request@amiga.com
Amiga FAQ: http://www.amiga.com/faq.html